the maximum vlue for this field is 131072

dugravot6

Member
Jun 14, 2022
2
0
6
Hi folks,

What is the maximum value for the disk size of a VM, in a shared storage environment with LVM type ?

In our environment (multiple host, with a shared lvm storage type - DELL ME5084), when i try to create a new hard drive from the GUI, it said : "the maximum vlue for this field is 131072", so 140 TB
If i try the command from cli (here a 180 TB disk ), i get another error :
Code:
# qm set 122 --scsihw virtio-scsi-pci --scsi1 vg_vm:180000
update VM 122: -scsi1 vg_vm:180000 -scsihw virtio-scsi-pci
  Rounding up size to full physical extent <175.81 TiB
  Logical volume "vm-122-disk-1.qcow2" created.
Formatting '/dev/vg_vm/vm-122-disk-1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=193273528320000 lazy_refcounts=off refcount_bits=16
  Logical volume "vm-122-disk-1.qcow2" successfully removed.
unable to create image: qemu-img: /dev/vg_vm/vm-122-disk-1.qcow2: Could not resize image: Cannot grow device files

It seems for example with lvm-thin, we should create hard drive with more size but lvm-thin is not able to run on shared storage ...
So it seems with shared LVM Storage type, i can't go further than 140 TB, is there another solution to bypass this ?
Thank you !
V.
 

Attachments

  • 2025-11-19 18_10_13-Clipboard.png
    2025-11-19 18_10_13-Clipboard.png
    61.9 KB · Views: 11
Last edited:
Hello, exact same issue here, but even for 120tb

Code:
update VM 123: -scsi1 Truenas-HDD:120000,format=qcow2,cache=none
  Rounding up size to full physical extent <117.21 TiB
  Logical volume "vm-123-disk-1.qcow2" created.
Formatting '/dev/Truenas-HDD/vm-123-disk-1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=128849018880000 lazy_refcounts=off refcount_bits=16
  Logical volume "vm-123-disk-1.qcow2" successfully removed.
TASK ERROR: unable to create image: qemu-img: /dev/Truenas-HDD/vm-123-disk-1.qcow2: Could not resize image: Cannot grow device files

I'm having a hard time creating big drives with LVM in iscsi shares. Trying half now, 60TB, we'll se..
 
BTW, it is possible to create the harddrive with CLI in RAW format :
Code:
qm set 122 --scsihw virtio-scsi-pci --scsi1 vg_vm:180000,format=raw

V.
 
Hi,
thank you for the reports! I can reproduce the issue here. When the disk size is 15000 GiB it still works, with 17000 GiB it fails, so likely 16 TiB is where it gets problematic. We use qemu-img measure to calculate the size of the underlying logical volume for the qcow2 image, but that seems to give a too small value with such large images. I'll try to find out the reason in the code when I get around to it.