Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LVM System DS fails to boot due to libvirt disk definition #6212

Closed
3 tasks done
onenhansen opened this issue May 24, 2023 · 0 comments · Fixed by OpenNebula/docs#2665
Closed
3 tasks done

LVM System DS fails to boot due to libvirt disk definition #6212

onenhansen opened this issue May 24, 2023 · 0 comments · Fixed by OpenNebula/docs#2665

Comments

@onenhansen
Copy link
Contributor

onenhansen commented May 24, 2023

Description
When a virtual machine is deployed to an LVM System Datastore, recent libvirt/qemu versions will refuse to boot due to an error concerning the disk's libvirt driver type:

DEPLOY: error: Failed to create domain from /var/lib/one//datastores/123/456/deployment.0 error: erro interno: process exited while connecting to monitor: 2023-05-22T23:11:38.691030Z qemu-kvm-one: -blockdev {"driver":"file","filename":"/var/lib/one//datastores/123/456/disk.0","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}: 'file' driver requires '/var/lib/one//datastores/123/456/disk.0' to be a regular file Could not create domain from /var/lib/one//datastores/123/456/deployment.0 ExitCode: 255

This is due to LVM datastores not having a DISK_TYPE definition, which causes images to be created with DISK_TYPE=0 indicating it is a FILE disk.

To Reproduce
Deploy a VM to an LVM System datastore without a DISK_TYPE attribute while running QEMU version above 6.0 and libvirt 7+

Expected behavior
The device definition should be created with the block device type rather than file. This can be remedied by changing the default DISK_TYPE to only allow BLOCK as a value for LVM datastores (fs_lvm, fs_lvm_ssh)

Details

  • Affected Component: Virtualization
  • Hypervisor: KVM
  • Version: QEMU 6.0+, libvirt 7.0+
  • Datastores: fs_lvm, fs_lvm_ssh

Additional context
The problem exists because the deployed virtual machine's template definition at xpath /VM/TEMPLATE/DISK/TYPE is generated as FILE even if the /VM/TEMPLATE/DISK/DISK_TYPE is set to BLOCK. This is due to the image attributes being incorrect from a previous configuration. It also is an issue due to the way newer versions of libvirt are handling virtual disks.

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment