VMware Cloud Community
mchuta
Contributor
Contributor
Jump to solution

New-HardDisk and Overcommitment Warning

I'm attempting to add a new HardDisk to a VM on an NFS datastore that enforces thin provisioning. Our NFS volumes are set to auto grow if they reach a certain threshold. This normally isn't a problem, and so we over-provision like crazy.

Recently, however, we've run into an issue where the size of a new Harddisk exceeds the free space of the datastore. It responds with the following error (creating a 1.99TB VMDK):

PowerCLI D:\> New-HardDisk -VM $vm -CapacityGB (1.99 * 1024) -Datastore $datastore

New-HardDisk : 4/8/2014 10:44:09 AM    New-HardDisk        The operation for the entity VirtualMachine-vm-10964 failed with the following message: "Insufficient disk space on datastore 'datastore1'."

Performing the same task in the vSphere Client produces the following warning, which can be bypassed by clicking "OK":

2014-04-08 10-14-21_Add Hardware.jpg

I've attempted to create a smaller disk and increase it, but I get the same error. I don't see a -Force parameter or anything equivalent. Is it possible to overcommit via PowerCLI?

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Is the ThinProvisioned switch an option, or does that conflict with the NFS setup ?


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

View solution in original post

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

Is the ThinProvisioned switch an option, or does that conflict with the NFS setup ?


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

Reply
0 Kudos
mchuta
Contributor
Contributor
Jump to solution

In the client it's not an option, so I didn't even try specifying the Storage Format.

The following command works!:

New-HardDisk -VM $vm -Datastore $datastore -CapacityGB (1.99 * 1024) -StorageFormat Thin

Thanks, Luc!

Edit: By not an option, I mean it's grayed out:

2014-04-08 12-34-37_Add Hardware.jpg

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

It's indeed grayed out, but I notice that the default is Thin in the client.

It looks like the cmdlet doesn't have this intelligence, so adding it explicitly seems to do the trick.

Perhaps the PowerCLI Dev Team should have a look at this ?

Btw, the ThinProvisioned switch is deprecated, and you should indeed use the StorageFormat parameter like you did.


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

mchuta
Contributor
Contributor
Jump to solution

That was my thought, too. At some point, the enforcement from the storage controller does come into play. Even without the switch, new harddisks are thinly provisioned on these NFS datastores, but thickly-provisioned on SAN datastores that we have.

I'd be happy to submit this to the Dev Team. I'll look into how to do that.

Thanks again, Luc.

alanrenouf
VMware Employee
VMware Employee
Jump to solution

You just did, thanks for letting us know about this.

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com