Pages

Total Pageviews

Monday, December 10, 2012

Change Memory limit of All the VMs

I had a requirement to change the limit of all the virtual guests  to Unlimited .

Limit can be an issue when we upgrade the virtual machine memory to a higher value . For OS it would look like it has the memory but host will not allow to use the memory above the limit ( previous configured value in my case).

We have a misconception above the unlimited memory . Unlimited memory means using all the allocated memory . It will never be above the configured or allocated memory.

Following power shell script can be used to change the Limit to Unlimited.



Connect-VIServer vcenterserver -User "vcenter_admin" -Password "Password"

Get-VM | Get-VMResourceConfiguration | where {$_.MemLimitMB -ne '-1'} | Set-VMResourceConfiguration -MemLimitMB $null

Disconnect-VIServer vcenterserver -Confirm:$false

No comments:

Post a Comment