Re: virt-manager andd CD isos

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

 



On Tue, Mar 06, 2007 at 10:22:11AM +0000, William John Murray wrote:
>   Hello there,
>          I am trying to install Scientific Linux as a virtual system
> under FC7-T2. There are only multi-CD isos and if I try to install
> from the (RAM) versions of those the installation proceeds to the
> end of the first CD, but then asks for the second one.
>    Does anyone know how I can give it the 2nd?

There is no good way to do this because Xen does not provide any formal
API for virt-manager to call to do a CDROM media change :-( 

There is a really *horrible* hack you can use to trigger a media change
by writing into a special part of the xen virtual filesystem (aka xenstore)
however I won't recommend this unless you're brave. Assuming you are brave,
it goes something like this...

Figure out what virtual device backend number is associated with
the CDROM device in that particular guest. To do this run the tool

      xenstore-ls /local/domain/0/backend/vbd

There will be many entries here, 1 per guest, per virtual disk. You need to 
find the number associated with the (guest, device) tuple you want to change.

In this example I'm only running a single guest, with 2 disks so it is    
reasonably simple - i see:

# xenstore-ls /local/domain/0/backend/vbd 
17 = ""
 768 = ""
  domain = "rhel4x86_64"
  frontend = "/local/domain/17/device/vbd/768"
  uuid = "f84acd8a-d236-c279-e502-e8823767f007"
  dev = "hda"
  state = "2"
  params = "/var/lib/xen/images/rhel4x86_64.img"
  mode = "w"
  online = "1"
  frontend-id = "17"
  type = "file"
  node = "/dev/loop1"
  physical-device = "7:1"
  hotplug-status = "connected"
 5632 = ""
  domain = "rhel4x86_64"
  frontend = "/local/domain/17/device/vbd/5632"
  uuid = "fbed1ba7-7f82-3466-0a14-4bb7d82bd578"
  dev = "hdc"
  state = "2"
  params = "/var/lib/xen/images/disk1.iso"
  mode = "r"
  online = "1"
  frontend-id = "17"
  type = "file"
  node = "/dev/loop0"
  physical-device = "7:0"
  hotplug-status = "connected"

And so in this example, the VBD backend number corresponding to my guest
'rhel4x86_64' and the 'hdc' device is '5632'.

Now before continuing make absolutely 100% sure the guest OS has unmounted
the CDROM device, or bad stuff will happen.

Now we need to update the 'params' field to specify a new filename for
this VDB. This can be done with xenstore-write

     xenstore-write /local/domain/0/backend/vbd/5632/params /var/lib/xen/images/disk2.iso

Wait a few seconds and QEMU should notice that the 'params' field was 
updated and thus attempt a media change in the virtual CDROM - if the
guest OS was still accessing the CDROM device this will likely fail.
Be very careful not to overwrite the wrong VDB device, and don't change
any of the other fields even if you think you want to. In addition this
*only* works for fullyvirtualized guests with CDROM devices. It is not
possible to change regular harddisk media, or to change paravirt devices
with this technique. There is near zero error reporting or checking, so
if this doesn't work you get to keep both halves - or more likely you
don't get to keep either half :-)

BTW, any Xen related questions for Fedora can also be sent to the fedora-xen
mailing lists where there's a large community of knowledge Xen folks to help
out.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

-- 
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
To unsubscribe: 
https://www.redhat.com/mailman/listinfo/fedora-test-list

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]