The dpmhv-addVMNic command lets you add network adapter to a VM and provides an option to connect it to a virtual switch.
This command has the following format:
dpmhv-addVMNic -host hostname -vm vmname|-vmid vmguid [-mac_address macaddress] [-switch switchname] [-legacy] [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the name of the VM.
Specifies the unique ID of the VM.
(Optional) Defines the MAC address of the new network adapter. Valid entry: 12 digit hexadecimal values (for example, A-F, 0-9, a-f) in the format: 0013724C2140 or 00:13:72:4C:21:40.
Note: If the macaddress is not specified, Hyper-V automatically generates it.
Specifies the virtual network switch name to connect the network adapter of the VM. If you do not specify this option, the network adapter of the VM is not connected to the virtual network.
Default: None
(Optional) Creates legacy network adapter instead of Hyper-V synthetic adapter.
Note: Use this option when installing operating systems that do not have Hyper-V integration services.
Returns a value for further processing.
Specifies not to direct the output to the screen.
Example: Add a Network Interface Controller to a VM
This example adds NIC to a VM," TestVM."
dpmhv-addVMNic -host hvserver -vm TestVM -switch "Local Area Connection - Virtual Network"
Copyright © 2013 CA. All rights reserved. |
|