Friday, January 2, 2015

Get report on VM Hot add CPU and Memory feature

This is my first blog in new year 2015

I recently receive query from my colleague on fetching Hot add CPU and Hot add memory feature for all VMs. below is a one liner powercli script which will pull the data in CSV format.

 Get-VM | Select-Object Name, VMHost, @{N="CpuHotAddEnabled"; E={$_.ExtensionData.config.CpuHotAddEnabled}}, @{N="MemoryHotAddEnabled"; E={$_.ExtensionData.config.MemoryHotAddEnabled}} | Export-Csv -NoTypeInformation -Path c:\temp\vcenterlist.csv  

What information above script is collecting?
Name of VM,
VMhost
CPUHOTADDENABLED status (True or false)
MEMORYHOTADDENABLED status (True or false)

Report will look like this xlsx file.


For individual VM you can check this setting at righclick VM > Edit settings > options> Memory/CPU Hotplug





No comments: