Virtual Machine’s Hard Disk greyed out – Unable to resize

Virtual Machine’s Hard Disk greyed out – Unable to resize

 

I have been asked by an application owner to increase the size of a disk on his applications virtual machine. So I went through the motions of logging into vCenter expecting to undertake a simple task of expanding the disk.  However when editing the settings of the VM I noticed the hard disk settings were greyed out as below.

 

As the Disk File is showing a suffix of “-000001.vmdk” this would imply that there is a snapshot of the VM. So I headed over to snapshot manager to consolidate and no snapshots were present!

 

I did some forum reading on this issue and found some hints to remove the “lost” snapshot using vmkfstools. However, before trying this method I created a new snapshot for the VM and the consolidated. This returned the vmdk to its expected naming format and I was now able to increase the size of the disk as requested by our application team.

I used powerCLI to consolidate the snapshot but can be done through the GUI too, here is the PowerCLI command I used if anyone prefers that method of working:

 

$VM = get-vm vmname | get-view

$VM.RemoveAllSnapShots(1)

 

 

Virtual Machine showing as invalid

I recently had a Virtual Machine showing as invalid within a vSphere environment.

Invalid Virtual Machine

To fix the issue you need to reload the Virtual Machine. Run the following command from PowerCli.

 

(Get-VM [VM-Name] | Get-View).Reload()

 

Once you run the command you should see your Virtual Machine back in the inventory as normal and no invalid status.