[Libguestfs] cdrom device handling

Richard W.M. Jones rjones at redhat.com
Fri Oct 12 15:46:44 UTC 2012


On Fri, Oct 12, 2012 at 05:43:58PM +0200, Olaf Hering wrote:
> On Fri, Oct 12, Richard W.M. Jones wrote:
> 
> > virt-rescue should come up with the disk and CD-ROM as /dev/sda and
> > /dev/sdb respectively.  This should be enough to read the data off the
> > CD (/dev/sdb).  What else would you want to do?
> 
> I have not tried it, but I can imagine the following can happen:
> Depending on the order of devices a disk may come after the first cdrom.
> So a disk 'sdb' in the guest may become 'sdc' in the guest. If one does
> a chroot into the guest to do some fixup _and_ if something within that
> guest is configured to use kernel device names (like sdb) instead of
> LABEL/UUID then failures can occur.
> 
> So its just about providing some correctness in virt-rescue.

We add them in the same order that libvirt presents them to us.  I
don't know what steps libvirt takes to preserve that order.

In any case, use labels & UUIDs, not device names!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the Libguestfs mailing list