VMware Cloud Community
aryan14in
Enthusiast
Enthusiast

How to Inflate vmdk

Hi All,

I am trying to inflate few specific vmdks of a VM. 

I tried

Get-HardDisk -VM $vmname |Set-HardDisk -HardDisk "hard disk 1" -Inflate

this is not working, can you suggest what i am missing.

Thanks!

Vinod

0 Kudos
4 Replies
LucD
Leadership
Leadership

The Harddisk parameter does not seem to do Object By Name (OBN).

Try it like this

Get-HardDisk -VM $vmname -Name "Hard disk 1" | Set-HardDisk -Inflate -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
aryan14in
Enthusiast
Enthusiast

Hi LuCD,- Thanks for the reply. I got below message after running the command

Get-HardDisk : A parameter cannot be found that matches parameter name 'Name'

0 Kudos
LucD
Leadership
Leadership

Are you running PowerCLI 5 ? Do a

Get-PowerCLIVersion

If you can't do the upgarde right now, use this alternative

Get-HardDisk -VM $vmname | where {$_.Name  -eq "Hard disk 1"} | Set-HardDisk -Inflate -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
aryan14in
Enthusiast
Enthusiast

I was on 4.1, i upgraded to 5.

On 4.1 i ran the command and get message to connect to ESX host directly for the operation. But on 5 i am able to do without connecting to ESX host specifically.

Thanks again.

Vinod

0 Kudos