VMware Cloud Community
DaddyDee
Enthusiast
Enthusiast
Jump to solution

VM Hot-Add, Hot-Plug List

Hi community,

Can anyone provide me with a PowerCLI script which will identify Guest VMs within vCenter which have Hot-Add, Hot-Plug enabled?  We've recently migrated a group of Linux VMs (RHEL 6) into a new vCenter Server and enabled feature, but have come across one where Hot-Plug was missed!!  Just want to ensure there are not others we've missed too.

Thanks in advance.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

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


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

0 Kudos
DaddyDee
Enthusiast
Enthusiast
Jump to solution

LucD, you're the dogs bollocks!!! :smileycool:

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Thanks (after consulting the Urban Dictionary) :smileygrin:


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

0 Kudos
DaddyDee
Enthusiast
Enthusiast
Jump to solution

Haa-haa.. No worries.

Just one other thing?  How would I incorporate desired operating system to run below script against, in this case Red hat 6?

Get-VM | Get-View | Select Name, `

@{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}}, `

@{N="CpuHotRemoveEnabled";E={$_.Config.CpuHotRemoveEnabled}}, `

@{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}} |

This is the only reliable RHEL version in production that fully supports Hot-add, Hot-plug.

Thanks in advance.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Do you mean to filter on only VMs with that guest OS?

Assuming you have VMware Tools installed on all VMs, you can do the following.

Note I used the Get-View directly, should be a bit faster.

Get-View -ViewType VirtualMachine -Filter @{'Guest.GuestFullName'="^Red Hat Enterprise Linux 6"} |

Select Name, `

@{N='OS';E={$_.Guest.GuestFullName}},

@{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}},

@{N="CpuHotRemoveEnabled";E={$_.Config.CpuHotRemoveEnabled}},

@{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}}


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

DaddyDee
Enthusiast
Enthusiast
Jump to solution

Magic!! That did the trick!!

Many thanks as always LucD.

0 Kudos