root@myserver:ls
vm-4155-disk-1.qcow2 vm-4155-disk-2.vmdk
root@myserver:/var/lib/vz/images/4155# qm resize 4155 vm-4155-disk-2.vmdk +100G
400 Parameter verification failed.
disk: value 'vm-4155-disk-2.vmdk' does not have a value in the enumeration 'ide0, ide1, ide2, ide3, scsi0, scsi1, scsi2, scsi3, scsi4, scsi5, scsi6, scsi7, scsi8, scsi9, scsi10, scsi11, scsi12, scsi13, virtio0, virtio1, virtio2, virtio3, virtio4, virtio5, virtio6, virtio7, virtio8, virtio9, virtio10, virtio11, virtio12, virtio13, virtio14, virtio15, sata0, sata1, sata2, sata3, sata4, sata5'
qm resize <vmid> <disk> <size> [OPTIONS]
root@myserver:/var/lib/vz/images/4155# qemu-img resize vm-4155-disk-2.vmdk +100GB
qemu-img: This image does not support resize
root@myserver:/var/lib/vz/images/4155#
.vmdk file with text editor (e.g. vim, nano, etc.);RW and change the value between RW and VMFS. This value is the number of 512 bytes sectors (e.g. for а 16 GB disk it would be (16 * 1024 * 1024 * 1024) / 512 = 33554432, so the line should become RW 33554432 VMFS "disk-flat.vmdk").parted or gparted) and resize the partition(s) on disk. With the resize the flat file of the VMDK disk image is enlarged according to the new size indicated in the .vmdk file;@gdsotirov I gave this a try but it didn't work for me. I noticed that the line in your .vmdk file looks like this: RW 33554432 VMFS "disk-flat.vmdk" and mine looks like this RW 67108864 SPARSE "VM-200-disk-0.vmdk" Do you know if it makes a difference if it's VMFS or SPARSE in that line of the file? When I boot into SystemRescue and run gparted there is no free space to resize the partition even though I increased the size in the .vmdk file.Just in case someone else like me stumbles upon this thread. You could manually resize VMDK disk like this:
It's rather strange that such a simple operation is not implemented into Proxmox.
- Detach the disk from the VM;
- Open the
.vmdkfile with text editor (e.g. vim, nano, etc.);- Find the line starting with
RWand change the value betweenRWandVMFS. This value is the number of 512 bytes sectors (e.g. for а 16 GB disk it would be(16 * 1024 * 1024 * 1024) / 512 = 33554432, so the line should becomeRW 33554432 VMFS "disk-flat.vmdk").- Re-attach the disk in the VM;
- Boot with some image (e.g. SystemRescue) having partition tools (e.g.
partedorgparted) and resize the partition(s) on disk. With the resize the flat file of the VMDK disk image is enlarged according to the new size indicated in the.vmdkfile;- Reboot the VM and use the newlly allocated disk space.
We use essential cookies to make this site work, and optional cookies to enhance your experience.