Hello everyone,
I want to know if its possible to desactive vSwitch by start a script (for example with python) ?
For example, i have 3 vSwitch and my goal is just with a script i can desactived (not delete) my vSwitch or maybe vmnic.
Thank you for your help.
Mimo.
You can't disable the vSwitch, but you can 'down' the uplinks of the vSwitch.
esxcli network nic down -n vmnicX
esxcli network nic up -n vmnicX
Keep in mind that the VMs, which are connected to the vSwitch trough their Portgroups can reach each other. Its not clear what you would like to achieve.
- Yes you can shutdown the vnmics
- You can modify the LB/Failover NIC Settings of a portgroup and set the uplinks/nics to "unused"
- You can set a wrong VLAN on the portgroup which isnt accepted by the pSwitch
- You can modify the vNIC setting of the VMs to status "unconnected"
- If you use vDS instead vSS you can block certain Ports
Most of them can configured trough the ESXi command line and all of them can be scriptet trough remote APIs like Powershell or similar.
Regards,
Joerg
You cannot “deactivate“ a vSwitch.
What are you actually trying to achieve, and why?