[libvirt-users] How to burn a CD using libvirt?

Steve Ross sross at trustedcs.com
Wed Mar 25 22:02:33 UTC 2015


Hi,

My first e-mail... my apologies if this is not the appropriate e-mail list.

My goal is to *write* from the guest OS to a CD or DVD reader/writer on
my host system.  Currently, the write operation is failing.  I believe
it is because the virtual CD-ROM device is set to be "readonly".  Is it
possible to write to a QEMU CDROM device and, if so, how?  (The host 
machine's CD-ROM drive does support writing/burning.)

I'm using the "virt-manager" GUI to start the virtual machine.  Once
started, the "qemu" command line from my virtual machine process
includes the following, where the host's built-in CD reader/writer is
"/dev/sr0".

    /usr/bin/qemu-system-x86_64 ... -drive
          file=/dev/sr0,if=none,id=drive-ide0-0-1,readonly=on,format=raw

This obviously says that the device is "readonly".

A snippet of XML from my virtual machine from the CDROM is:

<domain type='kvm'>
...
  <devices>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sr0'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>


I've tried removing the <readonly/> tag from the above VM definition,
and then running the VM, but the tag magically reappears in the VM
definition when it runs.

Also, the "virt-manager" GUI shows the CDROM device as having the option
of "Readonly" being checked (and the GUI does not allow me to uncheck it.)

Other details:

  * qemu version 2.1.3 on Fedora 21.
  * libvirt version 1.2.0.2


Thanks for any help or pointers you can provide,
-- Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150325/087487ab/attachment.htm>


More information about the libvirt-users mailing list