|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-users
Re: [Xen-users] Using CD drives with Xen 3.0.3 on CentOS 4.4
 
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> ]
 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.
 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).
 I found completely useless notes at 
http://www.xensource.com/support/3.1/xenserver-userguide.html. 
Unfortunately, the Xen 3.0.3 RPM's for RHEL4 and which seem quite usable 
for CentOS 4.4 do not include even the manual pages of the 
documentation, not even the manual pages or HTML docs, and attempting to 
build them from the SRPM fails miserably. Note that the Fedora SRPM's 
seem to have fixed this: bad RPM's hurt your credibility in the 
developer's world, folks, as badly as poor documentation! Unfortunately, 
the Fedora RPM's have a whole plethora of requirements not easily 
available on RHEL 4.x or CentOS 4.x.
 The samples in the xmexample.hvm and xmexample.vti files seem to be 
unhelpful as well. Using the same kernel as Dom0, or the DomU kernel, 
I'm simply not seeing the /dev/hdb or /dev/cdrom entry for the CD drive, 
and it's not showing up in /proc on the DomU at all.
 
 A domU won't have any drives unless they're configured in it's config file 
(or attached to the domain at runtime). There's not a default CD-ROM device 
for paravirtualised guests. Using the above method you should be able to 
export the CD-ROM's contents to the guest, although it won't actually be 
specifically aware that it's a CD-ROM drive.
 Has anyone else been through this with a non-virtualized CPU as well, or 
with Xen 3.0.3, not the enterprise version?
 
 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.
Cheers,
Mark
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
 
 |   
 
 | 
    | 
  
  
    |   | 
    |