Skip to content

Instances volumes stored on linstor are of format qcow2 instead of raw #9176

@wornet-mwo

Description

@wornet-mwo
ISSUE TYPE
  • Bug Report
COMPONENT NAME
storage
database
linstor
CLOUDSTACK VERSION
4.19.0.1
CONFIGURATION

N/A

OS / ENVIRONMENT
  • KVM/libvirt as Virtualization is used
  • linstor as primary storage is required
SUMMARY

Volumes attached to instances created in a primary storage backed by linstor are set to format QCOW2. That leads to unmigratable Instances.

STEPS TO REPRODUCE
  • install a linstor storage as primary storage
  • create instance using a storage offering which guarantees usage of linstor (with tags)
  • find volume in database
  • column format is set to QCOW2 instead of RAW (drbd devices are raw by definition)
  • (optional: try to migrate the instance to another storage e.g. an nfs -> fails because of wrong qemu-img parameters)

EXPECTED RESULTS
The correct format is used, when creating an instance.
ACTUAL RESULTS

The migration of an instance from a linstor to nfs storage failed. The failed command pointed me to the database. Migrating an instance to the linstor storage works great and does not cause the issue, only creating an instance is affected.

root@rz0-vh01:~# zgrep qemu-img /var/log/cloudstack/agent/agent.log.2024-06-04.gz
2024-06-04 10:04:56,779 WARN  [utils.script.Script] (agentRequest-Handler-4:null) (logid:0af75212) Execution of process [28987] for command [qemu-img convert -O qcow2 -U --image-opts driver=qcow2,file.filename=/dev/drbd1001 /mnt/f8a61f1d-8644-31f2-a519-83ac3f94c267/eaf6e6cb-50c9-4cb0-9368-e757fa488d79.qcow2 ] failed.
2024-06-04 10:04:56,779 WARN  [utils.script.Script] (agentRequest-Handler-4:null) (logid:0af75212) Process [28987] for command [qemu-img convert -O qcow2 -U --image-opts driver=qcow2,file.filename=/dev/drbd1001 /mnt/f8a61f1d-8644-31f2-a519-83ac3f94c267/eaf6e6cb-50c9-4cb0-9368-e757fa488d79.qcow2 ] encountered the error: [qemu-img: Could not open 'driver=qcow2,file.filename=/dev/drbd1001': Image is not in qcow2 format].
2024-06-04 10:04:56,780 ERROR [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-4:null) (logid:0af75212) Failed to convert /dev/drbd1001 to /mnt/f8a61f1d-8644-31f2-a519-83ac3f94c267/eaf6e6cb-50c9-4cb0-9368-e757fa488d79.qcow2 the error was: qemu-img: Could not open 'driver=qcow2,file.filename=/dev/drbd1001': Image is not in qcow2 format

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions