startupPolicy issue when changing CD

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


when adding support for CD disk on block based storage into oVirt, 
I spotted following issue. When starting VM without CD, we add 
startupPolicy='optional' attribute into <source> element. 
Whole XML looks like this:

    <disk type='file' device='cdrom'>
      <driver name='qemu' error_policy='report'/>
      <source startupPolicy='optional'/>
      <target dev='sdc' bus='sata'/>
      <alias name='ua-d7003457-63c3-4c98-80f0-08ab5042c65e'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>

To change/insert CD we use libvirt.updateDeviceFlags() with XML which 
looks like this (for block based disk):

<?xml version='1.0' encoding='utf-8'?>
<disk device="cdrom" type="block">
    <source dev="/rhev/data-center/mnt/blockSD/cdac2a0c-b110-456d-a988-7d588626c871/images/638247d7-b4b1-4d98-87fa-c90235fcf4b1/145e7cd2-f92d-4eec-a8fb-6835b4b652e1" />
    <target bus="sata" dev="sdc" />

However, updateDeviceFlags() fails with 

    libvirt.libvirtError: XML error: 'startupPolicy' is only valid for 'file' type volume

What is the reason for this error? We don't use `startupPolicy` attribute for block
based disks, as shown on example above.

Thanks in advance.

Attachment: signature.asc
Description: This is a digitally signed message part.

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux