Xen, cdroms, and tricks

One of the things I managed to figure out today is how to get a DVD drive visible in a Xen DomU, and how to tell the DomU that the media has been changed. First off, configuring your VM to have an optical drive in the first place.
disk = [ 'phy:/dev/sdb5,ioemu:hda,w','phy:/dev/sr0,hdc:cdrom,r']
The second command is the one that attached the physical drive to the DomU. That'll give you a CD device in your DomU. Unless you have a disk in the drive when the DomU is started, you won't see anything. Here is where the next bit comes in.

Unknown to me until now, there is a key-combination that allows you to manage the devices in a DomU.

[ctrl]+[alt]+[2]

That will take you to the HVM management screen. Type 'help' for what commands you can issue here. To tell the DomU that the optical device is ejected:
eject hdc
Where "hdc" is the device you configured in your VM config file.

Then change your media, and at the same screen, issue the command:
change hdc /dev/sr0
This tells the DomU that the optical device has new media, and to scan it.

To get back to the graphical screen:
[ctrl]+[alt]+[1]
This screen works similar to the NetWare debugger, in that all processing in the VM stops when you're in there. The eject command causes processing in the VM enough to process the eject, but not enough to run all the other processes. So beaware that time-sync will get screwed if you stay in the screen too long.