wreedMH
Hot Shot
Hot Shot

New-VMHostNetwork Adapter no option to enable provisioning?

Hey guys, I noticed there is not option to enable provisioning on a vmkernel interface with New-VMHostNetwork Adapter. Any ideas how to enable it with PowerCLI?

Online Documentation - Cmdlet Reference - VMware {code}

0 Kudos
1 Reply
LucD
Leadership
Leadership

Try like this

$esxName = 'MyEsx'

$vssName = 'MySwitch'

$pgName = 'MyPG'

$ipAddr = '192.168.1.1'

$ipMask = '255.255.255.0'

$esx = Get-VMHost -Name $esxName

$vmk = New-VMHostNetworkAdapter -VMHost $esx -PortGroup $pgName -IP $ipAddr -SubnetMask $ipMask -VirtualSwitch $vssName

$vnicMgr = Get-View -Id $esx.ExtensionData.ConfigManager.VirtualNicManager

$vnicMgr.SelectVnicForNicType('vSphereProvisioning',$vmk.Name)


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

0 Kudos