cockpit-machines
cockpit-machines copied to clipboard
Can't create a new volume when creating a new VM when the default pool is LVM2
Using Cockpit version provided in RHEL8.8:
cockpit 286.1 cockpit-bridge 286.1 cockpit-machines 286.2 cockpit-packagekit 286.2 cockpit-storaged 286.2 cockpit-system 286.1 cockpit-ws 286.1 subscription-manager-cockpit 1.28.36
When creating a new VM:
and if the default pool is of a LVM2 kind:
# virsh pool-dumpxml default
<pool type='logical'>
<name>default</name>
<uuid>dc865b7b-a97a-4162-bff8-55ffb43e4663</uuid>
<capacity unit='bytes'>3200627245056</capacity>
<allocation unit='bytes'>375809638400</allocation>
<available unit='bytes'>2824817606656</available>
<source>
<name>vg-libvirt</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/vg-libvirt</path>
</target>
</pool>
creation of the VM fails because, it seems, the format of the new volume is forced to qcow2:
Creation of VM test failed ERROR Error: --disk size=10,format=qcow2: Format attribute not supported for this volume type
@pawelmoll Hey. In newer versions of cockpit, you can choose a volume to be created as "RAW":
In cockpit-machines 286 (which is present in rhel 8.8), however there seems to be no workaround for your issue. If this bug is a significant blocker for you, please report an issue towards RHEL, and we could try to get an exception to fix it.
May I ask in what version was this change merged? I can see a 300.1-1.el8_9 package - if it's new enough, I'm happy to upgrade to 8.9 on my side.
For the record - the problem is not a blocker. We just create a VM with no storage and add it manually before kicking off the installation.
May I ask in what version was this change merged? I can see a 300.1-1.el8_9 package - if it's new enough, I'm happy to upgrade to 8.9 on my side.
Yes, that should be new enough. The feature to select "Raw" volume during VM creation is available since machines-291 (https://cockpit-project.org/blog/cockpit-291.html)
After upgrading to RHEL8.9 I've realised that the 300.1-1.el8_9 package comes from the beta repos, but I've pulled it individually:
cockpit 286.1 cockpit-bridge 286.1 cockpit-machines 300.1 cockpit-packagekit 286.2 cockpit-storaged 286.2 cockpit-system 286.1 cockpit-ws 286.1 subscription-manager-cockpit 1.28.36
and tried using the "Create new raw volume" options:
but I still get:
Danger alert: Creation of VM test failed ERROR Error: --disk size=10,format=raw: Format attribute not supported for this volume type
By defaulting to qcow2 or raw we allowlet the VM boot from lvm partitions. This is a valid bug report.