Marco1111
Contributor
Contributor

How to set Hardware virtualization --> expose

Hi,

Does anybody know how to set Hardware virtualization --> expose hardware assisted virtualization to the guest OS via powercli?

Thanks in advance,

Marco

5 Replies
LucD
Leadership
Leadership

Try like this

$vmName = 'MyVM'

$vm = Get-VM -Name $vmName

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec

$spec.nestedHVEnabled = $true

$vm.ExtensionData.ReconfigVM($spec)


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

Marco1111
Contributor
Contributor

Ok thanks this works ! Smiley Happy

Br.Marco

0 Kudos
Techstarts
Expert
Expert

Thanks so much LucD

With Great Regards,
0 Kudos
ganeshadmin
Contributor
Contributor

How to list the VMs in cluster which is already nestedHVEnabled is enabled ...Tried few steps but didn't work ...

0 Kudos
ganapa2000
Enthusiast
Enthusiast

you can try as below

Get-VM | Where-Object {$_.ExtensionData.config.nestedhvenabled -eq $true} | Select Name, @{N="NestedHV"; E={@($_.ExtensionData.config.nestedhvenabled)}} | ft -auto

0 Kudos