James' Blog

James’ personal blog

You are currently browsing the archives for January, 2010.

Increase ESX Virtual Machine Size (ubuntu linux)

These instructions are to allow you to increase the size of a virtual machine’s harddrive.  This was done on an ESX 4.0 system running ubuntu 8.10 with thin provisioning, meaning the harddrive only takes up as much space as it uses.  The main problem was that the swap partition was created after the primary partition, so it would not allow the primary to expand to the “right” of the swap.  The solution was to delete the swap and then reallocate the partition, then recreate the swap.

This command may be done via ssh access to ESX to change the VM to use thin provisioning.

vmkfstools -i Ubuntu-s001.vmdk new.vmdk -d thin -a lsilogic
-increase the size from the vsphere client of the hardrive in question
-load gparted iso and set it to boot on startup from vsphere client
-Make sure the cd-rom is “conenct at power on”
-I deleted the linux swap partition (turned it off first) by right clicking on the swap partition
-then I was able to resize my primary partition
-recreated the swap partition at the end [primary + additional partition][swap]

Doing a “df -h” shows that the disk space was automatically recognized by Ubuntu after running gparted.

Posted 7 months, 2 weeks ago at 12:49 pm.

Add a comment