|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-users
Re: [Xen-users] Using CD drives with Xen 3.0.3 on CentOS 4.4 
| 
M.A. Williamson wrote:
 Hmm. That seems only fully workable for already mounted drives, but I'll 
check it out.I'd like to be able to use a CD drive on the Dom0 to be accessible on 
the DomU systems. I do see some notes involving cdrom drives in the 
Xen 3.1 Enterprise notes, and in the VT notes, but not for systems 
without that on-board virtualization feature. And the syntax of the 
cdrom command options are documented nowhere in 3.0.3.
 
You can export the CD-ROM drive to the guest by using the file: 
directive, as you would for other disks. This will work for iso files 
and for /dev/cdrom 
e.g. something like
disk = [ 'file:/dev/cdrom,hdd,r', <your entries for other disks go 
here> ]
 
I am amused and confused by the use of  
'file:/var/lib/xen/images/file.img,hda,w ' as opposed to 
'file:/var/lib/xen/images/file.img,hda1,w'  and the fascinating 
partition adventures involved. It could also use some documentation. 
Having to deduce that sort of thing from scratch is asking for pain and 
work out the tradeoffs for yourself is asking for pain. will give the domain access to the contents of the real physical 
CD-ROM drive. Note that you'll want to have the CD-ROM you want to use 
in the drive when the domain boots, otherwise it'll confuse the 
guest's probing of disk size. Using an ISO file is probably more 
straightfoward and convenient. If you want to change ISO file you 
should be able to use xm block-detach and xm block-attach to add a new 
ISO to the guest. If you change the CD-ROM in an exported physical 
drive, I'd suggest doing xm block-detach, then changing the CD, then 
xm block-attach, so that the guest knows something has changed.
ISO files are great, but wind up taking space on your Dom0 to build. And 
creating them from DVD's becomes even more burdensome, and *burning* 
CD's or DVD's from the guest domain would be even more awkward. Note that the Xen paravirtualised block drive doesn't provide full 
CD-ROM emulation: you should be able to mount the filesystem, but you 
won't be able to treat it entirely like a CD drive because some of the 
special operations will not be supported (eject springs to mind, but 
there are other CD-ROM specific operations).
Yeah, that's why I hadn't even considered the file: approach. I may have 
to use it after all. 
 
Hopefully the above method will be sufficient from your needs. I run 
my development machine on CentOS 4.4 (albeit running xen-unstable 
built from source for my purposes) so can try to replicate and resolve 
any specific problems you run into. 
Hope that helps some. You're quite right that this sort of thing 
should be documented more thoroughly. Since the next release of RHEL 
will include Xen, hopefully CentOS (5) integration will be an 
improvement - sorry you had problems with the existing packages. 
 
Thanks. How are you downloading the unstable source?
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
 | 
 |  | 
  
    |  |  |