VMware Cloud Community
Sivaramsharmar
Enthusiast
Enthusiast

Disable ESXi vmnic

Hi All,

We need to disable the VMNIC from the secondary Ports coming from HP Enclosure.

We have standard vSwitch

2 vmnics per vSwitch and active active configuration

Please do let us know is there any way to achieve it from PowerCli.

Ex: vmnic4 is coming from primary & vmnic5 is secondary

We need to disable only vmnic5

Best Regards,

Ram

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

By disabling, do you mean removing it from the vSwitch teaming?


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

Reply
0 Kudos
Sivaramsharmar
Enthusiast
Enthusiast

Instead of removing the vmnic from teaming.

Diabling vmnic will speed up the process and also avoids to re-adding it to the same standard vSwitch

Currently ESXi are running with ESXi 6.0 and looking similar task is possible as per VMware Knowledge Base

Reply
0 Kudos
LucD
Leadership
Leadership

You could do something like this

$tgtNIC = 'vmnic5'

Get-VMHost -PipelineVariable esx |

ForEach-Object -Process {

    $esxcli = Get-EsxCli -VMHost $esx -V2

    if(($esxcli.network.nic.list.invoke()).Name -contains $tgtNIC){

        $esxcli.network.nic.down.Invoke(@{nicname=$tgtNIC})

    }

}


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

Reply
0 Kudos