[libvirt-users] could not create snapshotxml on encryption image

18781374080 18781374080 at 163.com
Fri Sep 6 06:39:56 UTC 2019


hi ,everyone!
I am a newcomer to Libvirt, and I don't know if it's a native question,


I create snapshots of virtual machines that use encrypted disk, The console gave me the following error:


Traceback(most recent call last):
    File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py",line 4613, in snapshot
          self._dom,snapshotCreateXML(snapxml, snapFlags)
    File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", in line 98, in f 
           ret = attr(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2620, in snapshotCreateXML
    if ret is None:raise libvirtError('virDomainSnapshotCreateXML() failed', dom=self)
 libvirtError: internal error: unable to execute QEMU command 'transaction': Parameter 'encrypt.key-secret' is required for cipher


And try adding encryption fields to domainsnapshot, as shown below


<?xml version='1.0' encoding='utf-8'?>
<domainsnapshot>
<disks>
<disk name="sda" snapshot="external" type="file">             
<source file="/rhev/data-center/mnt/192.168.1.13:_exports_data/168bc099-3ff1-44e8-ba2f-face1594db63/images/eed78b32-f257-445f-8f2e-b5c969ee38e8/da869c1d-f6bb-4816-be6a-f4d1d2ae2af2" type="file" />        #enc
                 <encryption format="luks">
<secret type="passphrase" uuid="694bdf38-214e-48d3-8c4c-9dbbcf0f5fa0" />
</encryption>
</disk>
   </disks>
<memory file="/rhev/data-center/mnt/192.168.0.91:_exports_data/168bc099-3ff1-44e8-ba2f-face1594db63/images/6236ecf4-0eb5-4879-bb6d-251ae84b55f8/f086c613-d1c2-4ab3-851e-97961173d1d6" snapshot="external" />   # notenc
     </domainsnapshot>


But there are still the same mistakes. I don't know whether the encrypted snapshot supports this operation or whether I added encryption information in the wrong way.


This problem has been bothering me for a long time. Any tips or help will be appreciated. Thank you


| |
18781374080
|
|
18781374080 at 163.com
|
签名由网易邮箱大师定制
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20190906/c637039c/attachment.htm>


More information about the libvirt-users mailing list