VSwitches and promiscuous mode
See original GitHub issueI can create a vswitch and a portgroup. I can set security policy for the port group and set the promiscuous mode for it. But if I set the security policy for vswitch, I get an error. Is there a way to set VSwitch promiscuous mode?
vss_spec = vim.host.VirtualSwitch.Specification()
vss_spec.numPorts = 32
vss_spec.bridge = vim.host.VirtualSwitch.BondBridge(nicDevice=["vmnic1"])
# security_policy = vim.host.NetworkPolicy.SecurityPolicy()
# security_policy.allowPromiscuous = True
# security_policy.forgedTransmits = True
# security_policy.macChanges = False
# vss_spec.policy = vim.host.NetworkPolicy(security=security_policy)
host_network_system.AddVirtualSwitch(vswitchName=vss_name, spec=vss_spec)
Issue Analytics
- State:
- Created 8 years ago
- Comments:11
Top Results From Across the Web
Configuring promiscuous mode on a virtual switch or ...
Click the Configuration tab. ; In the Hardware section, click Networking. ; Click Properties of the virtual switch for which you want to...
Read more >Configuring a vSwitch with promiscuous mode
Configuring a vSwitch with promiscuous mode · Click on Add Networking · Select Virtual Machine Port Group for a Standard Switch · Confirm...
Read more >vNetwork : reject-promiscuous-mode - 'vswitch' | Tenable®
Promiscuous mode is disabled by default on the ESXI Server, and this is the recommended setting. However, there might be a legitimate reason...
Read more >Why should I enable promiscuous mode? - Server Fault
In a nutshell, promiscuous mode allows a VM to use arbitrary MAC addresses and to listen to all traffic on the vSwitch (still...
Read more >The virtual switch Promiscuous Mode policy must be set to ...
Promiscuous Mode is disabled by default on the ESXi Server, and this is the recommended setting. Promiscuous Mode can be set at the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jeffreyxie888 if you have access to the vswitch config, then this should be relatively easy to do.
For brevity I’ve just picked the first host of the first datacenter, and the first vswitch out of the list. The HostVirtualSwitchConfig is: http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.wssdk.apiref.doc/vim.host.VirtualSwitch.Config.html (and in my above snippet that is what vswitch0 is)
Ok. I got it. You need to set every parameter if you want to configure one of the policies on a standard switch. If you forgot a single parameter or have a wrong value, you will get Invalid Argument without any hint what the error could be…
This sample code works for me:
Beacon, LDP, and MTU doesn’t need to be set. Everything else needs to be set.