Thanks a lot Rechard for your inputs. 

On Fri, Sep 12, 2014 at 11:23 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Fri, Sep 12, 2014 at 10:40:14PM +0530, Priyanka Ranjan wrote:
> Hello Experts,
>
> I need a help from you . I am using CentOS 6.4 and using guestfish
> to modify an ESX image.
>
> I am adding a disk, executing "run" command and mounting it.  the
> "run" command is taking around 50 seconds . Is there any way to
> minimize it.

So first of all, measure the performance.  Run the simple
baseline tests here:

http://libguestfs.org/guestfs-performance.1.html#baseline-measurements

If, after several runs, this stays at ~ 50 seconds, then it's likely
because you are running this inside a virtual machine, on Amazon EC2,
or on a machine which has virtualization disabled (eg in the BIOS
settings).  You can fix that by using baremetal (or maybe nested virt).

You will find other tips in the guestfs-performance(1) man page that I
linked to above.

> If we can not minimize it then Can we create and keep the guestfish
> virtual shell open so that we can just add a disk , mount and modify
> the image in few seconds.

Yes, but unfortunately not on CentOS 6.  On RHEL / CentOS 7 we support
hotplugging in both libguestfs and guestfish, and that lets you do
exactly what you describe above.

  http://libguestfs.org/guestfs.3.html#hotplugging

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org