Previous Topic: dpmvc delete Command--Destroy a VMNext Topic: dpmvc entermaintenancemode Command--Set to the Maintenance Mode


dpmvc distributedswitch Command--Manage Virtual Distributed Switches

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 [;hostname1:nic2,…nicn ]]
[-uplink_port_names uplink1[,uplink2,…,uplinkn]]
[-maxports maxports]
[-sc sc_url] 
[-wait timeout] 
[-pre] 
[-post] 
[-locale iso639value]
dpmvc distributedswitch -vds_remove
-vc_server vcservername
-switch_name switchname
[-sc sc_url] 
[-wait [timeout]] 
[-pre] 
[-post] 
[-locale iso639value]
dpmvc distributedswitch -add_portgroup
-vc_server vcservername 
-switch_name switchname
-portgroup_name portgroupname
[-bindtype earlyBinding | ephemeral | lateBinding]
[-vlan vlanID]
[-numports numberofports]
[-sc sc_url] 
[-wait [timeout]] 
[-pre] 
[-post] 
[-locale iso639value]
dpmvc distributedswitch -update_portgroup
-vc_server vcservername
-portgroup_name portgroupname
[-portgroup_newname portgroupnewname]
[-bindtype  earlyBinding | ephemeral | lateBinding]
[-vlan vlanID]
[-numports numberofports]
[-sc sc_url] 
[-wait [timeout]] 
[-pre] 
[-post] 
[-locale iso639value]
dpmvc distributedswitch -remove_portgroup
-vc_server vcservername
-portgroup_name portgroupname
[-sc sc_url] 
[-wait [timeout]] 
[-pre] 
[-post] 
[-locale iso639value]
dpmvc distributedswitch -rename_portgroup
-vc_server vcservername
-portgroup_name portgroupname
-portgroup_newname portgroupnewname
[-sc sc_url] 
[-wait [timeout]] 
[-pre] 
[-post] 
[-locale iso639value]
-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 data center where the VM is located.

-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 [;hostname1: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.

-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 (vlanid) to use for the virtual portgroup operations.

-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-wait timeout

(Optional) Indicates whether to display the status of the job and not return until the operation completes, fails, or the timeout period is met (if you specify a timeout value). If you do not specify this option, the CLI returns without waiting for completion. If there is no response, the optional timeout value defines the timeout period in minutes. If you enter the wait option with no timeout value, the CLI uses the default wait time from the caimgconf.cfg file or defaults to 120 minutes. In addition to any positive integer, the following timeout values are also possible:

""

No timeout value.

0

Wait indefinitely.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

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:
-ws_user admin -ws_password ca_admin -post

The command updates vdistSwitch: