cdrom device handling
Is there a way for the tools to provide a configured cdrom as cdrom to the temporary guest? Right now both disk and cdrom retrived from libvirt will showup as disks in the temporary guest. This happens for bus ide and scsi. It seems on my test system the guest can not start from a scsi disk, but the scsi cdrom appears as scsi cdrom in the guest. So I think its maybe just a matter of generating '<disk type='file' device='cdrom'>' instead of '<disk type='file' device='disk'>'? I'm using this command, which works ok for me: virt-rescue -v -c qemu+ssh:///system -d opensuse12 -r Olaf
On Fri, Oct 12, 2012 at 04:13:56PM +0200, Olaf Hering wrote:
Is there a way for the tools to provide a configured cdrom as cdrom to the temporary guest? Right now both disk and cdrom retrived from libvirt will showup as disks in the temporary guest.
I'm not clear if this is a libvirt question or a libguestfs question? But proceeding on the basis that it's about virt-rescue ...
This happens for bus ide and scsi. It seems on my test system the guest can not start from a scsi disk, but the scsi cdrom appears as scsi cdrom in the guest. So I think its maybe just a matter of generating '<disk type='file' device='cdrom'>' instead of '<disk type='file' device='disk'>'?
I'm using this command, which works ok for me: virt-rescue -v -c qemu+ssh:///system -d opensuse12 -r
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? 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/
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. Olaf
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
participants (2)
-
Olaf Hering -
Richard W.M. Jones