CD Rom Support in Xen

From Xen
Revision as of 10:40, 4 May 2012 by Lars.kurth (talk | contribs) (Migrated page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


CDROM Support under Xen Guests


This page will give some information about CDROM support under Xen guests.

PV Guest

Currently, there's no paravirtual CDROM driver available. So in PV guest, you can only add a iso image as a disk and cannot change this disk at runtime. But as a workaround, you can detach it and re-attach another iso as the same frontend.

HVM Guest

Adding CDROM to Guest

To add a physical CDROM drive or iso file as CDROM, you need to append ":cdrom" suffix to the target device name. Eg.

disk = ['phy:/dev/hdc,hdc:cdrom,r']
disk = ['file:/test.iso,hdc:cdrom,r']
disk = ['phy:/dev/null,hdc:cdrom,r']
disk = [',hdc:cdrom,r']


Change CDROM for a running guest

If you attached a physical CDROM drive, the CDROM media in the guest will change automatically when you change it physically.

If it doesn't change, execute the following command in Dom0:

# xm block-configure [DomID] phy:/dev/hdc hdc:cdrom r
or: 
# xm block-configure [DomID] file:/test.iso hdc:cdrom r
if you want to bind an iso to a CDROM.

If you are using the SDL viewer, Inside the VM press the following key combination to get into the monitor:

Ctrl-Alt-2

And then use the following command to eject the CDROM:

eject hdc [return]

Now you should be able to eject the cd manually, and put in a different CD. Then type the following command to change CDROM for the guest:

change hdb /dev/hdc [return]

To get back to the VM gui, press:

Ctrl-Alt-1

The new disk should be ready for mounting.

Booting from CDROM

To boot from CDROM, add config parameter "boot=c" to the vm configure file.

Troubleshooting

  • The configure option "cdrom" is obsolete as of Xen 3.0.3.
  • Under certain circumstance, using /dev/cdrom, which is a symbol link to the actual device, doesn't work.