A management computer for managing configuration of servers for connection to a switch comprises a port discovery module to: instruct a target server, for connection to a target switch port, to create a virtual adapter on a virtual switch associated with a physical NIC in the target server; obtain a list of VLAN IDs on all switch ports; select one or more VLAN IDs from the list based on a preset policy; set one such VLAN ID onto the virtual adapter; instruct the target server to manipulate the virtual adapter to send a packet with the set VLAN ID to the target switch port; if the switch accepted the packet sent to the target switch port, update a switch port mapping using the set VLAN ID as a discovered VLAN ID to map the physical NIC associated with the virtual adapter to the target switch port having the discovered VLAN ID.
展开▼