[SOLVED] VM's with disks without unit (K,M,G,T etc)

Apr 29, 2021
22
1
8
46
Hi.
I have two VM's which have disks with no unit specified. The disks are qcow2 on NFS share, imported from esx and converted from vmdk. Attached to the vm as sata.

One VM has a disk with size 2791726662144, like this: sata0: <storage>:vmid/vm-vmid-disk-0.qcow2,size=2791726662144

The problem is that veeam needs a unit to work, according to their support.

I tried to just put a B afterwards, and start the vm again, but then windows wouldn't recognize the disk at all.

How can I fix this?
 
Last edited:
2791726662144 is not divisible by 1024. Maybe ask veeam to support this? Or try 2726295568K and hope there is nothing important in the last 512 bytes.
Or find out how to grow the qcow2 virtual disk by 512 bytes. I don't know how Proxmox does it, but maybe you can find it in the source code or read some QEMU documentation?

EDIT: According to https://linuxconfig.org/how-to-resize-a-qcow2-disk-image-on-linux try qemu-img resize vm-vmid-disk-0.qcow2 2726295568K (from the directory where it is stored).
 
Last edited:
  • Like
Reactions: markusbernhard
Yeah, I was rather suprised when the support told me this, and a bit upset...

But I could just aswell resize it to 2726295569K then, and not have to worry about the last 512 bytes getting lost, right?

Thanks for the intelligent reply, I wish I'd thought of it myself :D

I believe that qm resize <vmid> <disk> <size> would do the trick..
 
Last edited:
It worked, thanks a lot!

Now I can add the hosts to veeam, but I'm going to tell them that it still is a valid qm config, so they should support it.
 
For reference; I could not "rescan entities" while adding a host to veeam backup & replication, and the following error occured in the veeam logfile:

Code:
2024-11-08 15:20:56.4722 00090 [16596] ERROR | [ProxmoxNode][hostname][00000000-0000-0000-0000-ac1f6bed8a5c][0HN8001R7RINV:0000000C]: Failed getting list of VMs: System.Exception: Unsupported size dimension
2024-11-08 15:20:56.4722 00090 [16596] ERROR | [ProxmoxNode][hostname][00000000-0000-0000-0000-ac1f6bed8a5c][0HN8001R7RINV:0000000C]:    at Veeam.ProxmoxBackup.RestClient.Additional.ProxmoxUtils.ParseDiskSize(List`1 diskDataParts)
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!