Open luminostech1089 opened 8 years ago
Perhaps the documentation doesn't mention it, but once you attach a VM to that portgroup, it will be of type virtualMachine automatically (which means you won't be able to add a vmknic to it). I haven't checked, but once all the VMs are off the portgroup, it might revert back to 'host'.
Basically, i want to add VLAN to vSwitch. The exact manual steps are mentioned here : http://www.rustyhann.com/ESXi-06-Create-vLAN.pdf
I thought of the using AddPortGroup() of host.configManager.networkSystem but blocked at how to set vim.host.PortGroup.port.type to desired connection type. Probably i am taking a wrong approach.
Could anybody suggest how can i achieve it. Any suggestions in this regard will be a great help. Thanks.
I am able to create port group using AddPortGroup() method of host.configManager.networkSystem object. But the port group type (vim.host.PortGroup.PortConnecteeType) is 'host' by default. AddPortGroup How can i change this value to some other value e.g. to 'virtualMachine'?
As per documentation : A Port data object type is a runtime representation of network connectivity between a network service or virtual machine and a virtual switch. This is different from a port group in that the port group represents the configuration aspects of the network connection. The Port object provides runtime statistics. What does this mean? Does it mean i can't change this value?