Can't attach disk to VM
|Assignee:||Abel Coronado||% Done:|
|Target version:||Release 5.4.1|
|Affected Versions:||OpenNebula 5.4|
Since upgrade to 5.4 when can't attach disk anymore on running VMs.
This is 100% reproductible we have the same bug on all our opennebula.
steps to reproduce:
- Create 1 vm (we are using centos 7 kvm template from marketplace, not relevant for the bug)
- While the VM is running, go to storage tab, click on attach disk
- Choose volatile, type 1 GB for the size (or any size), and just change Filesystem format to qcow2
- Click on attach
OpenNebula will then create an image disk but in raw format.
The XML definition (disk.X.attach) for this attachment is set with this image but with qcow2 specified, so when ONE push it to libvirtd, it fails with the following error:
Image is not in qcow2 format
Since in one remote script we have change the default format from raw to qcow2 we are stuck. We can't add any kind of image. Because if you choose raw, the image is still created in raw, but the XML definition is still using qcow2...
ex for one on our VM:
<disk type=‘file’ device=‘disk’> <driver name=‘qemu’ type=‘qcow2’ /> <source file=’/var/lib/one//datastores/100/2844/disk.2’ > </source> <target dev=‘vdb’/> </disk>
As said, even if we choose raw, type stays on qcow2. We have the same problem on datastores with SSH and QCOW2 types.
This is a regression, this was working fine with OpenNebula 5.2.
- OpenNebula 5.2 upgraded to 5.4 => KO
- Fresh OpenNebula 5.4 => KO