Re: error: unsupported flags (0x4) in function virStorageVolDefParseXML

2024-11-08 Thread Michal Prívozník
On 11/8/24 11:04, Veiko Kukk wrote:
> Hi!

> Questions:
> 1) Why does validation fail? How to debug it?

Yeah, this is a genuine bug.

> 2) Why doesn't libvirt create qcow2 v3 even when specifying compat
> 1.1? When creating an image using virt-manager on the same libvirt
> hypervisor host, v3 images are created.

This one I couldn't reproduce with current master. I think it's because of this 
commit:

https://gitlab.com/libvirt/libvirt/-/commit/f432114d9cf507a4047aa9dc1344b1c13356db08

libvirt.git $ git describe --contains f432114d9cf507a4047aa9dc1344b1c13356db08
v10.2.0-rc1~93


Michal


error: unsupported flags (0x4) in function virStorageVolDefParseXML

2024-11-08 Thread Veiko Kukk
Hi!

Simple volume definition:

  tstlog01-system
  20
  
1.1

  


# virsh vol-create --pool libvirt-ssd0 --file
vm-files/tstlog01/tstlog01-sys
tem-vol.xml --validate
error: Failed to create vol from vm-files/tstlog01/tstlog01-system-vol.xml
error: unsupported flags (0x4) in function virStorageVolDefParseXML

Omitting --validate creates volume
# virsh vol-dumpxml --pool libvirt-ssd0 --vol tstlog01-system

  tstlog01-system
  /var/lib/libvirt/images/tstlog01-system
  21474836480
  200704
  196928
  
/var/lib/libvirt/images/tstlog01-system


  0600
  0
  0
  system_u:object_r:virt_image_t:s0


  1730277533.331347844
  1730277533.329347839
  1730277533.330347841
  0

  


# file /var/lib/libvirt/images/tstlog01-system
/var/lib/libvirt/images/tstlog01-system: QEMU QCOW2 Image (v2),
21474836480 bytes

# virsh vol-create-as libvirt-ssd0 tstlog01-system 20g --format qcow2
Vol tstlog01-system created

# virsh vol-dumpxml --pool libvirt-ssd0 --vol tstlog01-system

  tstlog01-system
  /var/lib/libvirt/images/tstlog01-system
  21474836480
  200704
  196928
  
/var/lib/libvirt/images/tstlog01-system


  0600
  0
  0
  system_u:object_r:virt_image_t:s0


  1730277391.657950326
  1730277391.656950323
  1730277391.657950326
  0

  


It seems both volumes are identical  - the one created without
--validate and the one created with vol-create-as.

Questions:
1) Why does validation fail? How to debug it?
2) Why doesn't libvirt create qcow2 v3 even when specifying compat
1.1? When creating an image using virt-manager on the same libvirt
hypervisor host, v3 images are created.

Alma Linux 9.4, libvirt-10.0.0-6.7.el9_4.alma.1.x86_64,
qemu-kvm-8.2.0-11.el9_4.6.x86_64

With best regards,
Veiko