I'm trying to attach an encrypted volume to a nova instance. Still, I'm facing "libvirt.libvirtError: internal error: unable to execute QEMU command 'blockdev-add': Image is not in qcow2 format" error.
I'm using generic-NFS with luksv1 encryption as a cinder backend.
Steps to reproduce
==================1. Create a nfs encrypted volume
$ cinder list
++--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
| 1a1dc33c-5b99-47b3-9619-4542f6ed5ce0 | available | encrypted-volume5 | 1 | LUKS | false | |
+--------------------------------------+-----------+-------------------+------+-------------+----------+-------------+
2. Attach the volume to the instance
$ nova volume-attach 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb 1a1dc33c-5b99-47b3-9619-4542f6ed5ce0
Expected result
===============
Volume attached successfully.
Actual result
=============n-cpu log=======Traceback (most recent call last):
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/compute/manager.py", line 7151, in _attach_volume
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] bdm.attach(context, instance, self.volume_api, self.driver,
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] ret_val = method(obj, context, *args, **kwargs)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/block_device.py", line 669, in attach
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self._do_attach(context, instance, volume, volume_api,
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/block_device.py", line 654, in _do_attach
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self._volume_attach(context, volume, connector, instance,
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/block_device.py", line 603, in _volume_attach
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] volume_api.attachment_delete(context,
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self.force_reraise()
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] raise self.value
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/block_device.py", line 592, in _volume_attach
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] virt_driver.attach_volume(
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2188, in attach_volume
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self._disconnect_volume(context, connection_info, instance,
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self.force_reraise()
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] raise self.value
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2172, in attach_volume
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] guest.attach_device(conf, persistent=True, live=live)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 321, in attach_device
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] self._domain.attachDeviceFlags(device_xml, flags=flags)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/eventlet/tpool.py", line 193, in doit
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] result = proxy_call(self._autowrap, f, *args, **kwargs)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/eventlet/tpool.py", line 151, in proxy_call
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] rv = execute(f, *args, **kwargs)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/eventlet/tpool.py", line 132, in execute
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] six.reraise(c, e, tb)
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/six.py", line 719, in reraise
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] raise value
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] File "/usr/local/lib/python3.8/dist-packages/eventlet/tpool.py", line 86, in tworker
stance: 9b595d6f-484c-4b38-9a8e-4d2fafe7bceb] rv = meth(*args, **kwargs)
File "/usr/lib/python3/dist-packages/libvirt.py", line 630, in attachDeviceFlags
if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self) libvirt.libvirtError: internal error: unable to execute QEMU command 'blockdev-add': Image is not in qcow2 format
Environment
===========
I'm using generic-NFS with luksv1 encryption as a cinder backend.
I'm using Devstack with the main branch.
Greetings,
Description
===========
I'm trying to attach an encrypted volume to a nova instance. Still, I'm facing "libvirt. libvirtError: internal error: unable to execute QEMU command 'blockdev-add': Image is not in qcow2 format" error.
I'm using generic-NFS with luksv1 encryption as a cinder backend.
Steps to reproduce ======= ====1. Create a nfs encrypted volume ------- ------- ------- ------- -----+- ------- ---+--- ------- ------- --+---- --+---- ------- --+---- ------+ ------- ------+ ------- ------- ------- ------- ----+-- ------- --+---- ------- ------- -+----- -+----- ------- -+----- -----+- ------- -----+ 5b99-47b3- 9619-4542f6ed5c e0 | available | encrypted-volume5 | 1 | LUKS | false | | ------- ------- ------- ------- ----+-- ------- --+---- ------- ------- -+----- -+----- ------- -+----- -----+- ------- -----+ 484c-4b38- 9a8e-4d2fafe7bc eb 1a1dc33c- 5b99-47b3- 9619-4542f6ed5c e0
=======
$ cinder list
++-----
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 1a1dc33c-
+------
2. Attach the volume to the instance
$ nova volume-attach 9b595d6f-
Expected result
===============
Volume attached successfully.
Actual result 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ compute/ manager. py", line 7151, in _attach_volume 484c-4b38- 9a8e-4d2fafe7bc eb] bdm.attach(context, instance, self.volume_api, self.driver, 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/block_ device. py", line 46, in wrapped 484c-4b38- 9a8e-4d2fafe7bc eb] ret_val = method(obj, context, *args, **kwargs) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/block_ device. py", line 669, in attach 484c-4b38- 9a8e-4d2fafe7bc eb] self._do_ attach( context, instance, volume, volume_api, 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/block_ device. py", line 654, in _do_attach 484c-4b38- 9a8e-4d2fafe7bc eb] self._volume_ attach( context, volume, connector, instance, 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/block_ device. py", line 603, in _volume_attach 484c-4b38- 9a8e-4d2fafe7bc eb] volume_ api.attachment_ delete( context, 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ oslo_utils/ excutils. py", line 227, in __exit__ 484c-4b38- 9a8e-4d2fafe7bc eb] self.force_ reraise( ) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ oslo_utils/ excutils. py", line 200, in force_reraise 484c-4b38- 9a8e-4d2fafe7bc eb] raise self.value 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/block_ device. py", line 592, in _volume_attach 484c-4b38- 9a8e-4d2fafe7bc eb] virt_driver. attach_ volume( 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/libvirt/ driver. py", line 2188, in attach_volume 484c-4b38- 9a8e-4d2fafe7bc eb] self._disconnec t_volume( context, connection_info, instance, 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ oslo_utils/ excutils. py", line 227, in __exit__ 484c-4b38- 9a8e-4d2fafe7bc eb] self.force_ reraise( ) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ oslo_utils/ excutils. py", line 200, in force_reraise 484c-4b38- 9a8e-4d2fafe7bc eb] raise self.value 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/libvirt/ driver. py", line 2172, in attach_volume 484c-4b38- 9a8e-4d2fafe7bc eb] guest.attach_ device( conf, persistent=True, live=live) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/opt/stack/ nova/nova/ virt/libvirt/ guest.py" , line 321, in attach_device 484c-4b38- 9a8e-4d2fafe7bc eb] self._domain. attachDeviceFla gs(device_ xml, flags=flags) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ eventlet/ tpool.py" , line 193, in doit 484c-4b38- 9a8e-4d2fafe7bc eb] result = proxy_call( self._autowrap, f, *args, **kwargs) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ eventlet/ tpool.py" , line 151, in proxy_call 484c-4b38- 9a8e-4d2fafe7bc eb] rv = execute(f, *args, **kwargs) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ eventlet/ tpool.py" , line 132, in execute 484c-4b38- 9a8e-4d2fafe7bc eb] six.reraise(c, e, tb) 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ six.py" , line 719, in reraise 484c-4b38- 9a8e-4d2fafe7bc eb] raise value 484c-4b38- 9a8e-4d2fafe7bc eb] File "/usr/local/ lib/python3. 8/dist- packages/ eventlet/ tpool.py" , line 86, in tworker 484c-4b38- 9a8e-4d2fafe7bc eb] rv = meth(*args, **kwargs) python3/ dist-packages/ libvirt. py", line 630, in attachDeviceFlags chDeviceFlags( ) failed', dom=self) libvirt. libvirtError: internal error: unable to execute QEMU command 'blockdev-add': Image is not in qcow2 format
=============n-cpu log=======Traceback (most recent call last):
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
stance: 9b595d6f-
File "/usr/lib/
if ret == -1: raise libvirtError ('virDomainAtta
Environment
===========
I'm using generic-NFS with luksv1 encryption as a cinder backend.
I'm using Devstack with the main branch.