Hi,
Can anybody point me in the direction of official documentation for extending the partition of a VMDK?
I've found a lot of different methods, but was wondering if there's a supported or best practice method.
Thanks in advance,
Sam.
Hi. I'm using gparted tool for all my extend needs and for now it never failed me. hope this help.
This procedure is part me and part link found on (praise this site )
Shutdown the virtual machine you want to resize
Log into the ESX Server console via Putty
Change directory to the Virtual machine directory cd /vmfs/volumes/datastorename/vmservername
Type "vmkfstools -X vmservername.vmdk
New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g
Power on the Virtual Machine and make sure it boots properly, load Disk Management and you will see the new unallocated space
Now to join the unallocated space to the primary partition, first shutdown the Virtual Machine
Connect the Virtual Machine to the GpartEd ISO file and make sure you enable Connected at Power On (generaly on the vmimages datastore and under isotools directory)
Power on the Virtual Machine
Press ESC at the Bios screen to get to the Boot Menu
Select CD-ROM as the Boot device
Gnome Partition Editor will load, press Enter at the boot screen
Once the partition editor loads, click on /dev/sda1 in the partition list
Click the Resize/Move button
Click and drag the arrow to extend the size of the partition, make sure you do a resize (double arrow) and not a move (four way arrow) so you should 0 free space preceding and following and then click the Resize/Move button
Next click the Apply button and then the operation will start, you can expand Details to see the progress, once completed click the Close button
Click the power button in the bottom right corner, then select reboot
Edit the VM and remove the ISO from the CD/ROM device (change to Client)
When the server restarts it will do a Check Disk, let this complete, Windows will prompt for a reboot after you login
Reboot and load Disk Management and your Primary Partion will be the new size without any unallocated space
Turn off the server
ssh to the server and CD to directory of VM
vmkfstools - X 100G vm_name.vmdk (100GigaByte is the new size of the vmdk - you are not adding 100G to the file)
If it is windows then use diskpart to make the new space available.
If you are running VC 2.5 and ESX 3.5 you can do it from Virtual Center. Just edit the VM.
VI 3 Online Documentation, vmkfstools:
http://pubs.vmware.com/vi35/server_config/sc_cover.1.1.html#949594
Using vmkfstools
Option -X
AWo
Adding Space to an ESX Server Virtual Disk
Hi. I'm using gparted tool for all my extend needs and for now it never failed me. hope this help.
This procedure is part me and part link found on (praise this site )
Shutdown the virtual machine you want to resize
Log into the ESX Server console via Putty
Change directory to the Virtual machine directory cd /vmfs/volumes/datastorename/vmservername
Type "vmkfstools -X vmservername.vmdk
New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g
Power on the Virtual Machine and make sure it boots properly, load Disk Management and you will see the new unallocated space
Now to join the unallocated space to the primary partition, first shutdown the Virtual Machine
Connect the Virtual Machine to the GpartEd ISO file and make sure you enable Connected at Power On (generaly on the vmimages datastore and under isotools directory)
Power on the Virtual Machine
Press ESC at the Bios screen to get to the Boot Menu
Select CD-ROM as the Boot device
Gnome Partition Editor will load, press Enter at the boot screen
Once the partition editor loads, click on /dev/sda1 in the partition list
Click the Resize/Move button
Click and drag the arrow to extend the size of the partition, make sure you do a resize (double arrow) and not a move (four way arrow) so you should 0 free space preceding and following and then click the Resize/Move button
Next click the Apply button and then the operation will start, you can expand Details to see the progress, once completed click the Close button
Click the power button in the bottom right corner, then select reboot
Edit the VM and remove the ISO from the CD/ROM device (change to Client)
When the server restarts it will do a Check Disk, let this complete, Windows will prompt for a reboot after you login
Reboot and load Disk Management and your Primary Partion will be the new size without any unallocated space