Previous Topic: CA Hyper-V CLI CommandsNext Topic: dpmhyperv AddVMSCSIController Command--Create a SCSI Controller for a VM


dpmhyperv AddVMNic Command--Add a Network Adapter Controller to a VM

The dpmhyperv AddVMNic command adds a network adapter to a VM.

This command has the following format:

dpmhyperv AddVMNic 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] 
-hypervHost hostname 
-vm VM_name|-vmguid vm_ID 
[-mac mac_value] 
[-switch switch_name] 
[-legacy] 
[-pre] 
[-post]
[-locale iso639value]
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-vm vm_name

Specifies the VM name.

-vmguid vm_ID

Specifies the unique GUID of the VM.

-mac mac_value

(Optional) Specifies the Media Access Control (MAC) address of the network adapter.

-switch switch_name

(Optional) Specifies the virtual network switch name to connect to the network adapter. If this parameter is not specified, then the network adapter does not have any connectivity.

-legacy

(Optional) Specifies whether to create a legacy network adapter instead of a Hyper-V synthetic adapter. This option must only be used when installing operating systems that do not have Hyper-V integration services available.

-pre

(Optional) Generates an event before the operation is complete.

-post

(Optional) Generates an event after the operation is complete.

-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: Add a Network Adapter Controller to a VM

This example adds a network adapter controller to the VM, "TestVM" and connects to it to the switch, "Local Area Connection - Virtual Network."

dpmhyperv 
-addVMNic 
-ws_user dcaadmin 
-ws_password #test# 
-hypervHost hvserver 
-vm TestVM 
-switch "Local Area Connection - Virtual Network"