[libvirt] Mounting a raw DVD

Adam Mooz adam.mooz at gmail.com
Tue Nov 10 03:54:22 UTC 2009

Hello List,

I'm attempting to pass a DVD drive of a headless server into a virtual  
machine.  So far I've managed to mount *something* into the VM, but  
it's being registered as a blank DVD within the VM. When I mount /dev/ 
dvd into the bare-metal machine it registers normally as the DVD.  How  
do I pass physical drives into a VM and back out using libvirt?

Command used:
#virsh attach-disk Montreal /dev/dvd hdc --mode readonly --driver phy  
--type cdrom
Connecting to uri: qemu:///system
Disk attached successfully

VM XML file:

<domain type='kvm'>
     <type arch='x86_64' machine='pc-0.11'>hvm</type>
     <boot dev='hd'/>
   <clock offset='utc'/>
     <disk type='file' device='cdrom'>
       <target dev='hdc' bus='ide'/>
     <disk type='file' device='disk'>
       <source file='(Mangled Purposely)'/>
       <target dev='vda' bus='virtio'/>
     <interface type='bridge'>
       <mac address='(mangled purposly)/>
       <source bridge='br0'/>
       <model type='virtio'/>
     <serial type='pty'>
       <target port='0'/>
     <console type='pty'>
       <target port='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
       <model type='cirrus' vram='9216' heads='1'/>

Thanks in advance,
Adam Mooz
Adam.Mooz at gmail.com
AdamMooz at me.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091109/98887dbc/attachment-0001.htm>

More information about the libvir-list mailing list