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

Re: [Xen-users] devtype and cd/dvd drives



>       Playing with a mainline PVM kernel, I was trying to determine
> whether a virtual device is a cd/dvd.  What do I mean?
>
> - A scsi disk has /sys/block/<name>/device/type.  If that contains '0',
>   it's a hard disk.  If not, it's something else (cd/tape/etc).  This
>   includes SATA, iSCSI, etc.  Anything using sd.c.
> - An IDE disk has /sys/block/<name>/device/media.  If that contains
>   'disk' it's a disk.  It can also contain 'cdrom', 'tape', etc.  This
>   used to live at /proc/ide/<name>/media.
>
>       How do I determine this for xvdX devices?
> /sys/block/xvda/device has "devtype", but does it contain 'vbd' for
> cdroms as well?  Every example I see online suggests using hdc (IDE) for
> cdroms still - will cdroms stay IDE?  Should I assume that xvd devices
> are hard disks always and forever?

Pretty much.

I don't think PV block devices can support most / any of the special 
functionality required to make them really behave like CD-ROM drives from the 
guest's point of view.  It is possible to export a CD-ROM drive from the host 
through a PV block device but the CD-ROM specific behaviour will not be 
passed through.

I've seen greater CD-ROM support for PV block devices stated as a TODO 
occasionally but I don't know of anyone working on it.

CD-ROMs can be more fully emulated for HVM guests, which will know they have 
an IDE CD-ROM drive.

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

_______________________________________________
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®.