Chrisxxxx
Contributor
Contributor

With PowerCLI how do I see what a VM's allowed CPU/RAM hot add settings are?

  I've seen and used the methods to enable CPU/RAM hot add, but I'd like a report of the equivalent of the grayed out buttons when you edit a VM's settings.  I've searched the Internet and the object model from a "get-vm vmname | get-view" and didn't find anything.  Any idea if that info is available.

tia,

Chris

0 Kudos
5 Replies
CRad14
Hot Shot
Hot Shot

Are you just looking for the aloccated Ram and number of CPUs?

If so...

Get-VM

By Default it shows the vm, powerstate, num of cpus, and ram

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
0 Kudos
LucD
Leadership
Leadership

Check out Arne's post PowerCLI: Check CPU/Memory Hot Add


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

0 Kudos
Chrisxxxx
Contributor
Contributor

  Thanks Luc.  I did see that one.  It reports what the current settings are, but not what the possible settings are.  (I was afraid this might be hard to explain.)  Below is an example.  I'd like to see the extra information you get from the GUI interface.  Which ones are enabled/disabled and which ones can be enabled or not.

PowerCLI

-----------------------------

CpuHotAddEnabled           : False
CpuHotRemoveEnabled        : False
MemoryHotAddEnabled        : False

From the vSphere client, edit VM settings --> Options --> "Memory/CPU Hotplug"

------------------------------------------------------------------------------------------------------------------------


Memory Hot Add

_X_ Disable memory hot add for this virtual machine.

___ Enable memory hot add for this virtual machine.


CPU Hot Plug

_x_ Disable CPU hot plug for this virtual machine.

___ Enable CPU hot add only for this virtual machine.

(gray) enable CPU hot add and remove for this virtual machine.


0 Kudos
LucD
Leadership
Leadership

Afaik, what is available on the hot add/remove is completely determined by the OS you specified for your VM.

Jason Boche has a good overview, albeit a bit old, of which OS supports what in vSphere Memory Hot Add/CPU Hot Plug

The following seems to confirm this:

  • create VM and specify XP 32-bit --> no hot add/remove available
  • install the OS
  • change the OS spec to Windows 2008 R2 64-bit --> hot add/remove becomes available

But when you try to use it, it will fail miserably since the XP OS doesn't support hot add/remove.


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

Chrisxxxx
Contributor
Contributor

  Sounds good.  You've confirmed that there's no known way to get a report of what options are available from the VM itself.  If I had more free time I could use a static CSV of what's allowed with a script that cross-checked against what's set on the VM, but it's easier just to bash through and ignore the errors.  Smiley Happy

Thanks!

0 Kudos