WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] devtype and cd/dvd drives
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 2 May 2008 00:04:35 +0100
Cc: Joel Becker <Joel.Becker@xxxxxxxxxx>
Delivery-date: Thu, 01 May 2008 16:05:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080501210135.GF19731@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20080501210135.GF19731@xxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
>       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

<Prev in Thread] Current Thread [Next in Thread>