Previous Topic: dpmvc-delete Command--Destroy a VM (Funclet)Next Topic: dpmvc-entermaintenancemode Command--Set to the Maintenance Mode (Funclet)


dpmvc-distributedswitch Command--Manage Virtual Distributed Switches (Funclet)

The dpmvc distributedswitch command lets you manage virtual distributed switches.

The command has the following formats:

dpmvc-distributedswitch {-vds_add | -vds_update}
-vc_server vcservername
-datacenter_name datacentername
-vds_folder vdsfolder 
-switch_name switchname
[-hostnics hostname1:nic1,nic2,…nicn [;hostname2:nic2,…nicn >]*]
[-uplink_port_names uplink1[,uplink2,…,uplinkn]]
[-maxports maxports] 
dpmvc-distributedswitch -vds_remove
-vc_server vcservername
-switch_name switchname 
dpmvc-distributedswitch -add_portgroup
-vc_server vcservername 
-switch_name switchname
-portgroup_name portgroupname
[-bindtype  earlyBinding | ephemeral | lateBinding]
[-vlan vlanID]
[-numports numberofports] 
dpmvc-distributedswitch -update_portgroup
-vc_server vcservername
-portgroup_name portgroupname
[-portgroup_newname portgroupnewname]
[-bindtype  earlyBinding | ephemeral | lateBinding]
[-vlan vlanID]
[-numports numberofports] 
dpmvc-distributedswitch -remove_portgroup
-vc_server vcservername
-portgroup_name portgroupname 
dpmvc-distributedswitch -rename_portgroup
-vc_server vcservername
-portgroup_name portgroupname
-portgroup_newname portgroupnewname 
-vc_server vcservername

Specifies the vCenter Server to access when you have multiple vCenter Servers. Optional for single vCenter Server environments.

-datacenter_name datacentername

Specifies the datacenter to which the virtual distributed switch belongs.

-vds_folder vdsfolder

Specifies the folder of the virtual distributed switch in the CA Virtual Assurance Explorer pane.

-switch_name switchname

Specifies the switch name to perform the operation on.

-hostnics hostname1:nic1,nic2,…nicn [;hostname2:nic2,…nicn >]

(Optional) Specifies lists of NICs associated with the ESX host members.

-uplink_port_names uplink1[,uplink2,…,uplinkn]

(Optional) Specifies a comma-separated list of uplink port names to use.

-maxports maxports

(Optional) Specifies the maximum number of ports for the switch. This number limits the total number of ports (numports) from all of the portgroups on the switch.

-bindtype earlyBinding | ephemeral | lateBinding

(Optional) Specifies the bind type of the port group. Valid values are:

earlyBinding

Assigns the ports when the VM binds to the portgroup. This type of binding ensures connectivity at all times, but permanently reserves the port. This binding type is the default.

lateBinding

Assigns a port to a VM if the VM is powered on and its NIC is in connected state. This binding type reassigns the port when the VM is powered off or its NIC is disconnected. LateBinding is configurable through vCenter.

ephemeral

Assigns a port to a VM if the VM is powered on and its NIC is in connected state. This binding type reassigns the port when the VM is powered off or its NIC is disconnected. Ephemeral binding is configurable through the ESX Host and vCenter.

-numports numberofports

(Optional) Specifies the number of ports of the port group.

-portgroup_name portgroupname

Specifies the port group name.

-portgroup_newname portgroupnewname

Specifies the new port group name.

-vlan vlanID

(Optional) Specifies an Integer value (vlan ID) used for the virtual portgroup operations.

Example: Create a New Virtual Distributed Switch

This example creates a new virtual distributed switch.

dpmvc-distributedswitch -vds_add -vc_server vc5master -datacenter_name dc3 
-vds_folder vds -switch_name vdswitch1 

Example: Updates an Existing Virtual Distributed Switch

This example updates a virtual distributed switch. It specifies NICs for MYSERVER1, and removes MYSERVER2 from the virtual distributed switch. When you want to delete a host from a virtual distributed switch, specify the servername without NICs assigned to it (server name followed by colon, for example, MYSERVER2:).

dpmvc-distributedswitch -vds_update -vc_server VAS-VC5 -datacenter_name VC5 
-switch_name vdistSwitch -hostnics MYSERVER1:nxmgt2,tmp2;MYSERVER2:

The command updates vdistSwitch: