vmdk hdd resize

informant

Renowned Member
Jan 31, 2012
816
11
83
Hi, how can we resize vmdk hdd´s?

webinterface said: can't resize this image format at /usr/share/perl5/PVE/Storage/Plugin.pm line 630. (500)

regards
 
Hi,

resize does not work. i have following error on using resize commands:
Code:
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#

what can i do here?
server is stopped.

regards
 
Hi,
I think you must convert the image and the you can resize.
 
hi wolfgang,

thanks for answer.
but why i can not resize a vmdk file? in vmware it works normal and in man/help of qemu-img resize stay, it works, but it does not work.

you mean also, it does not work right and vmdk can not resize, right?

regards
 
Hi, proxmox and command line tool does also not support resize of vmdk, right?

qcow2 we can resize - right?

best regards.
 
very thanks for information.

i find, you can do a information in wiki, that vmdk can not resize.

regards
 
Just in case someone else like me stumbles upon this thread. You could manually resize VMDK disk like this:
  1. Detach the disk from the VM;
  2. Open the .vmdk file with text editor (e.g. vim, nano, etc.);
  3. Find the line starting with 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").
  4. Re-attach the disk in the VM;
  5. Boot with some image (e.g. SystemRescue) having partition tools (e.g. 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;
  6. Reboot the VM and use the newlly allocated disk space.
It's rather strange that such a simple operation is not implemented into Proxmox.
 
Just in case someone else like me stumbles upon this thread. You could manually resize VMDK disk like this:
  1. Detach the disk from the VM;
  2. Open the .vmdk file with text editor (e.g. vim, nano, etc.);
  3. Find the line starting with 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").
  4. Re-attach the disk in the VM;
  5. Boot with some image (e.g. SystemRescue) having partition tools (e.g. 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;
  6. Reboot the VM and use the newlly allocated disk space.
It's rather strange that such a simple operation is not implemented into Proxmox.
@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.