On Wed, Nov 09, 2011 at 09:23:57PM +0100, Lars Sjöström wrote: > Hello, > > Proposed patch for BZ#752552 > (https://bugzilla.redhat.com/show_bug.cgi?id=752552) > > Description of problem: > the new feature vm inspection fails when a cdrom is attached to the VM. > > Best regards, > Lars
> From b31a14940e81643b129cfe288feceb1196ed852d Mon Sep 17 00:00:00 2001 > From: Lars Sjostrom <[email protected]> > Date: Wed, 9 Nov 2011 21:05:49 +0100 > Subject: [PATCH] exclude cdrom from vm inspection > > --- > src/virtManager/inspection.py | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/virtManager/inspection.py b/src/virtManager/inspection.py > index 7723c57..0365b52 100644 > --- a/src/virtManager/inspection.py > +++ b/src/virtManager/inspection.py > @@ -140,7 +140,8 @@ class vmmInspection(vmmGObject): > disks = [] > for disk in vm.get_disk_devices(): > if (disk.path and > - (disk.type == "block" or disk.type == "file")): > + (disk.type == "block" or disk.type == "file") and > + not disk.device == "cdrom"): > disks.append(disk) > > if not disks: > -- > 1.7.7 > This is one way to fix the problem, and it's simple so we should probably go with it, so ACK. A more thorough fix would look at not just the first root returned from libguestfs, but would look through all of the roots for the first that has g.inspect_get_format(root) == "installed". http://libguestfs.org/guestfs.3.html#guestfs_inspect_get_format libguestfs is just being very thorough here by finding the installer on the CD-ROM and returning it as an "installer" operating system. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora _______________________________________________ virt-tools-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-tools-list
