[Libguestfs] virt-sysprep future

Wanlong Gao gaowanlong at cn.fujitsu.com
Sat Mar 17 12:16:03 UTC 2012


On 03/17/2012 07:49 PM, Richard W.M. Jones wrote:

> On Sat, Mar 17, 2012 at 06:59:34PM +0800, Wanlong Gao wrote:
>> Does RedHat has a plan to support NBD in RHEL in the future?
> 
> Not as far as I know.
> 
> guestmount is fast enough for me.  With inspection:
> 
> $ time sh -c 'guestmount -a /dev/vg_pin/F16x64 -i /tmp/mnt; fusermount -u /tmp/mnt'
> 
> real   0m9.999s
> user   0m0.081s
> sys    0m0.377s
> 
> Without inspection:
> 
> $ time sh -c 'guestmount -a /dev/vg_pin/F16x64 -m /dev/vg_f16x64/lv_root /tmp/mnt; fusermount -u /tmp/mnt'
> 
> real   0m6.681s
> user   0m0.074s
> sys    0m0.339s
> 
> Currently virt-sysprep runs libguestfs twice (once for inspection,
> once to mount).  A virt-sysprep that was rewritten not to be a shell
> script would only run libguestfs once, so there would be ~10 second
> overhead.  This overhead is insignificant compared to the downsides of
> using nbd: having to run as root, (in)security, not supporting all
> guests, creating host device nodes, etc.


[root at Allen ~]# time sh -c 'qemu-nbd -c /dev/nbd0 /dev/sda6; mount /dev/nbd0 ./tmp; umount ./tmp'

real	0m0.146s
user	0m0.009s
sys	0m0.005s

yes, "having run as root" is one of the  shortcomings.
I can't get why nbd causes security problem, do you mean data corruptions in muti-access?
I can't understand the "not supporting all guest", since libguestfs points to look into
the guest disk image, the concept of just read the disk images' format head is better.

Thanks,
Wanlong Gao


> 
> Rich.
> 





More information about the Libguestfs mailing list