Friday, September 2, 2016

VMware Virtual Machine Disk Management

Finally wait is over and here is the interactive PowerCLI scipt to increase any hard disk (VMDK) of Virtual Machine online w/o login into vCenter Server or Windows Guest VM.

I have tested it on Powershell 5.0, PowerCli 6.3, vSphere 6.0, Windows 2003, Windows 2008, Windows 2012.

After executing this script, there will be a popup asking for vCenter Credetials and Windows Guest Credentials (obviously with enough permission to increase disk/s).

Combo box will automatically populate all the VMs from vCenter inventory as soon as you click on login so please be patience after pressing Login button.

You can select the any of disk populated in Grid View row and put the increased size of the disk (it will choose to ignore if you put less than the existing size of disk ;) ). It will help you to figure out the relation of VMDK and Drive Letter...cool han?

And voilla, disk increased in VM configuration and within guest system to use.

Note: you need to login into Windows 2003 VM to increase the C Drive (boot partition). In other words, it will increase the disk size of System Partition in VM Configuration but leave it to you increase it within Windows.