Matthew Booth
2010-Feb-08 17:15 UTC
[Libguestfs] Order of list-devices changes when libguestfs uses virtio
Output from guestfish after upgrading to rawhide libguestfs, compiled with virtio:><fs> add_drive "/dev/Guests/RHEL52PV32" ><fs> add_cdrom "/var/lib/virt-v2v/transfer.iso" ><fs> launch ><fs> list-devices/dev/sr0 /dev/vda Note that the order has swapped. If these aren't consistent we don't have a good way to determine which host devices map to which guest devices. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
Richard W.M. Jones
2010-Feb-09 10:12 UTC
[Libguestfs] Order of list-devices changes when libguestfs uses virtio
On Mon, Feb 08, 2010 at 05:15:27PM +0000, Matthew Booth wrote:> Output from guestfish after upgrading to rawhide libguestfs, compiled > with virtio: > > ><fs> add_drive "/dev/Guests/RHEL52PV32" > ><fs> add_cdrom "/var/lib/virt-v2v/transfer.iso" > ><fs> launch > ><fs> list-devices > /dev/sr0 > /dev/vda > > Note that the order has swapped. If these aren't consistent we don't > have a good way to determine which host devices map to which guest devices.This is not good. Ideas? qemu -drive has a serial=... option. I'm not clear what it does, but if there is a way to assign a UUID to the device on the host side, and read that from the guest then we should be able to restore the ordering. 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
Richard W.M. Jones
2010-Feb-09 12:25 UTC
[Libguestfs] Order of list-devices changes when libguestfs uses virtio
On Mon, Feb 08, 2010 at 05:15:27PM +0000, Matthew Booth wrote:> Output from guestfish after upgrading to rawhide libguestfs, compiled > with virtio: > > ><fs> add_drive "/dev/Guests/RHEL52PV32" > ><fs> add_cdrom "/var/lib/virt-v2v/transfer.iso" > ><fs> launch > ><fs> list-devices > /dev/sr0 > /dev/vdaBTW, while still acknowledging that this is a serious bug, you can work around it easily by adding the ISO image using 'add_drive'. There is no real need to use 'add_cdrom' in any libguestfs client code that I'm aware of, certainly not for adding ISO images which work just as well if they are presented as ordinary drives. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/