[Libguestfs] performance between guestfish and qemu-nbd

Richard W.M. Jones rjones at redhat.com
Thu Jul 27 16:31:06 UTC 2017


On Fri, Jul 28, 2017 at 12:23:04AM +0800, lampahome wrote:
> 2017-07-27 20:18 GMT+08:00 Richard W.M. Jones <rjones at redhat.com>:
> 
> > On Thu, Jul 27, 2017 at 06:34:13PM +0800, lampahome wrote:
> > > I can mount qcow2 img to nbd devices through guestfish or qemu-nbd
> > >
> > > I'm curious about which performance is better?
> >
> > They do quite different things, they're not comparable.
> >
> > Can you specifically give the commands you are trying?  We might be
> > able to give more sensible advice.
> 
> guestfish:
> guestfish --rw -a demo.qcow2 -m /dev/nbd0
>
> qemu-nbd:
> qemu-nbd -c /dev/nbd0 demo.qcow2

These don't do the same thing.  In fact the guestfish command doesn't
work at all.

> I just want to mount demo.qcow2 to a device

Still unclear.

You want to export demo.qcow2 as NBD?  Use qemu-nbd.

You want to mount demo.qcow2 on the local filesystem?  (This doesn't
involve NBD.)  Use:

  mkdir /tmp/mnt
  guestmount --rw -a demo.qcow2 -i /tmp/mnt

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list