Strange Issue resizing KVM Virtio QCOW2 disks

sahostking

Renowned Member
When we resize disks in KVM via the Resize Disk and add say GBs. Note we trying to move it from old Proxmox servers with SATA HW RAID 10 LVM to new SSD ZFS servers.

It changes for example from 50G to some 55834575360

We noticed this occurs when we try to migrate it across to a new ZFS volume where it will fail due to it not being dividable by 8192 etc.

Any way to fix this.

I also tried via command line using qm 100 virtio0 +1G
Same outcome.

Need to get the block size right.

Here is another example on one virtio disk :

55834575360 / 4096
= 13631488125

LVM blocksize is 4096
SSD blocksize is default of 8192
 
Last edited:
Please can you give me exact steps to reproduce the problem? I tried:

# qm create 125 --virtio0 local:10
Formatting '/var/lib/vz/images/125/vm-125-disk-1.raw', fmt=raw size=10737418240
# qm resize 125 virtio0 +5G
Image resized.
# qemu-img info /var/lib/vz/images/125/vm-125-disk-1.raw
virtual size: 15G (16106127360 bytes)

but everything looks correct here.
 
Well all we did was created the KVMs as per normal which worked fine via proxmox. We never use the command line.

Then when a customer requests increase in disks size we go to VM via proxmox and click hardware, click the disk and click resize option and increment it by the size required like 10 or 1 GB etc.

But then the size would change from say 50G to say a long number like that above 55834575360.

These VMs did exist before on a Proxmox 3.1 server and we moved them over after paying for licensing to the Proxmox 4.1 servers a few months ago so not sure if something went wrong there.