VMware Cloud Community
tdubb123
Expert
Expert

Add +2GB to VM

I got hot add enabled on my VMs. how do I use the set-vm -MemoryGB  to add2GB?

 

 

0 Kudos
4 Replies
tdubb123
Expert
Expert

i tried 

 

set-vm -vm (get-vm -name (get-content ./vm.txt)) -MemoryGB ((get-vm -name (get-content ./vm.txt)).MemoryGB + "2")
Set-VM: Cannot convert 'System.Object[]' to the type 'System.Decimal' required by parameter 'MemoryGB'. Specified method is not supported.
PS /Users/twong/Powershell/Vmware>

0 Kudos
LucD
Leadership
Leadership

It looks as if that VM has more than 1 Harddisk, hence the array indication in the error message


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

0 Kudos
tdubb123
Expert
Expert

i only waant set memorygb

0 Kudos
LucD
Leadership
Leadership

In that case, the part get-vm -name (get-content ./vm.txt) is returning more than 1 VM.


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

0 Kudos