[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH 1/3 version 2] Add inspection thread.



On Tue, Apr 19, 2011 at 02:58:02PM +0100, Richard W.M. Jones wrote:
> On Tue, Apr 19, 2011 at 12:01:41PM +0100, Richard W.M. Jones wrote:
> > +        for disk in vm.get_disk_devices():
> > +            path = disk.path
> > +            driver_type = disk.driver_type
> > +            g.add_drive_opts(path, readonly=1, format=driver_type)
> 
> Oops - turns out that if the VM has any disks without <source/>
> elements (eg. CD-ROMs), then path == None here.  The updated patch
> attached fixed this.

One other thing - the <disk type='XXXX'> attribute can take various
values, and you only want to use disks type='block' or type='file'.
Skip any with type='dir' (eg, used for QEMU's VVFat feature) or
type='network' (used for NBD, RBD or Sheepdog disks). Unless of course
libguestfs can actually generate a suitable QEMU command line arg for
those types of disk..

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]