[ovirt-devel] why can't a virtual machine with a lock file snapshot?

maokexu at 126.com maokexu at 126.com
Tue Sep 6 02:30:18 UTC 2016


hi,all:
        why can't a virtual machine with a lock file snapshot?
        the code is this:
4490 
4491             if vmDrive.hasVolumeLeases:
4492                 self.log.error('disk %s has volume leases', vmDrive.name)
4493                 return errCode['noimpl']
4494 
[./vdsm/virt/vm.py]    
       If I deleted the above code,a snapshot is successfull,the lock  is also successful.      
       the vm xml of part  is this:
<devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='qcow2' cache='none' error_policy='stop' io='threads'/>
      <source file='/rhev/data-center/ab1ad4e8-e69e-47e2-af48-aa6bd64ba9e2/f6c878db-e530-415e-a0d8-b5b89027c297/images/0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/55e40a24-be89-4325-a5e1-a5fecc3b1f46'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore type='file' index='1'>
        <format type='qcow2'/>
        <source file='/rhev/data-center/ab1ad4e8-e69e-47e2-af48-aa6bd64ba9e2/f6c878db-e530-415e-a0d8-b5b89027c297/images/0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/../0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/dadecfd8-feda-4dfa-a0a4-b99490f33c46'/>
        <backingStore type='file' index='2'>
          <format type='raw'/>
          <source file='/rhev/data-center/ab1ad4e8-e69e-47e2-af48-aa6bd64ba9e2/f6c878db-e530-415e-a0d8-b5b89027c297/images/0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/../0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/../0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/d467c150-1576-4ced-89af-f2e6ebe897ee'/>
          <backingStore/>
        </backingStore>
      </backingStore>
      <target dev='hda' bus='ide'/>
      <serial>0b4d3165-8d34-42f0-b2b3-efdf79ac60c3</serial>
      <boot order='1'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source startupPolicy='optional'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <serial></serial>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0' ports='16'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <lease>
      <lockspace>f6c878db-e530-415e-a0d8-b5b89027c297</lockspace>
      <key>55e40a24-be89-4325-a5e1-a5fecc3b1f46</key>
      <target path='/rhev/data-center/mnt/192.168.8.100:_data_maokx/f6c878db-e530-415e-a0d8-b5b89027c297/images/0b4d3165-8d34-42f0-b2b3-efdf79ac60c3/55e40a24-be89-4325-a5e1-a5fecc3b1f46.lease'/>
    </lease>                                              



maokexu at 126.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20160906/3c2e6302/attachment-0001.html>


More information about the Devel mailing list