CD Rom Support in Xen: Difference between revisions

From Xen
Jump to navigationJump to search
(Migrated page)
 
(Updated xml to xl)
Line 34: Line 34:
If it doesn't change, execute the following command in Dom0:
If it doesn't change, execute the following command in Dom0:
<pre><nowiki>
<pre><nowiki>
# xm block-configure [DomID] phy:/dev/hdc hdc:cdrom r
# xl block-configure [DomID] phy:/dev/hdc hdc:cdrom r
</nowiki></pre>
</nowiki></pre>
or:
or:
<pre><nowiki>
<pre><nowiki>
# xm block-configure [DomID] file:/test.iso hdc:cdrom r
# xl block-configure [DomID] file:/test.iso hdc:cdrom r
</nowiki></pre>
</nowiki></pre>
if you want to bind an iso to a CDROM.
if you want to bind an iso to a CDROM.
Line 74: Line 74:
= Troubleshooting =
= 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.
* Under certain circumstance, using /dev/cdrom, which is a symbol link to the actual device, doesn't work.



Revision as of 13:24, 24 September 2012


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:

# xl block-configure [DomID] phy:/dev/hdc hdc:cdrom r
or: 
# xl 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

  • Under certain circumstance, using /dev/cdrom, which is a symbol link to the actual device, doesn't work.