[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Using CD drives with Xen 3.0.3 on CentOS 4.4



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> ]
Hmm. That seems only fully workable for already mounted drives, but I'll check it out.

That's the physical device file, so you won't need to actually mount the drive. You will need to have the disk in the drive before you start the domain / block-attach it, otherwise the size probing may go wrong :-(

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.

It is a bit "unconventional", to say the least!

Just to clarify, it's perfectly valid to export as a whole device (e.g. 'file:/var/lib/xen/images/file.img,hda,w ') as you would on other virtual machine systems. The ability to export as a partition (e.g. 'file:/var/lib/xen/images/file.img,hda1,w ') is provided for ease of management: you don't really *need* to have a partition table in a paravirt guest, and it's nice to simply be able to work with individual guest filesystems when configuring from dom0, rather than having to deal with accessing subranges of a guest disk file.

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.

I'm afraid you're not going to be able to burn and optical disks from either paravirt or HVM domains for the time being :-(

You *could* add a second IDE controller card to your system, export that to a guest via the PCI passthrough and then use that to drive a CD writer, but this would be rather heavyweight and imply trust of the guest OS.

When USB virtualisation is working (it may already work in HVM) it should be possible to pass a USB burner through to the guest, and that would enable this kind of use.

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.

Afraid so, sorry :-( For many uses (e.g. just grabbing some files from the disk), it should work OK. But you can't just boot off a CD-ROM in a PV domain, nor can you place CD music, etc.

Thanks. How are you downloading the unstable source?

I get mine using mercurial:
hg clone http://xenbits.xensource.com/xen-unstable.hg

I'd generally recommend using a release version for production systems, 3.0.4 being the latest and (hopefull) greatest. http://xenbits2.xensource.com/xen-3.0.4-testing.hg should contain 3.0.4 + bugfixes that are being tested to be rolled up into the next 3.0.4.x update.

There will be tarballs of 3.0.4 linked off one of the Xen homepages, once they have been updated. Building your own Xen is reasonably straightforward once you know your way around the components, and there should be various HOWTOs hanging around.

Hope that helps. If you still have problems with the CD-ROM we can try and find a workaround for you.

Cheers,
Mark

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.