VMware

Ethernet Namespace

The Ethernet namespace provides commands for configuring the virtual Ethernet adapters of a virtual machine.

List of commands:



List Command

dcli com vmware vcenter vm hardware ethernet list

Description

Returns commonly used information about the virtual Ethernet adapters belonging to the virtual machine.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.

Example

dcli com vmware vcenter vm hardware ethernet list --vm testId


Get Command

dcli com vmware vcenter vm hardware ethernet get

Description

Returns information about a virtual Ethernet adapter.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
nic string Yes Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.

Example

dcli com vmware vcenter vm hardware ethernet get --vm testId --nic testId


Create Command

dcli com vmware vcenter vm hardware ethernet create

Description

Adds a virtual Ethernet adapter to the virtual machine.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
type string No Ethernet adapter emulation type. If unset, defaults to a guest-specific type. Valid values are: {E1000, E1000E, PCNET32, VMXNET, VMXNET2, VMXNET3}
upt‑compatibility‑enabled bool No Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter. If unset, defaults to false.
mac‑type string No MAC address type. If unset, defaults to GENERATED. Valid values are: {MANUAL, GENERATED, ASSIGNED}
mac‑address string No MAC address. Workaround for PR1459647
pci‑slot‑number int No Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change when it the VM is started or as the device is hot added. If unset, the server will choose an available address when the virtual machine is powered on.
wake‑on‑lan‑enabled bool No Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter. Defaults to false if unset.
backing‑type string No Backing type for the virtual Ethernet adapter. Valid values are: {STANDARD_PORTGROUP, HOST_DEVICE, DISTRIBUTED_PORTGROUP, OPAQUE_NETWORK}
backing‑network string No Identifier of the network that backs the virtual Ethernet adapter. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: Network. When commands return a value of this class as a output, the option will be an identifier for the resource type: Network. This option is optional and it is only relevant when the value of type is one of STANDARD_PORTGROUP, DISTRIBUTED_PORTGROUP, or OPAQUE_NETWORK.
backing‑distributed‑port string No Key of the distributed virtual port that backs the virtual Ethernet adapter. Depending on the type of the Portgroup, the port may be specified using this field. If the portgroup type is early-binding (also known as static), a port is assigned when the Ethernet adapter is configured to use the port. The port may be either automatically or specifically assigned based on the value of this option. If the portgroup type is ephemeral, the port is created and assigned to a virtual machine when it is powered on and the Ethernet adapter is connected. This option cannot be specified as no free ports exist before use. May be used to specify a port when the network specified on the network option is a static or early binding distributed portgroup. If unset, the port will be automatically assigned to the Ethernet adapter based on the policy embodied by the portgroup type.
start‑connected bool No Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if unset.
allow‑guest‑control bool No Flag indicating whether the guest can connect and disconnect the device. Defaults to false if unset.

Example

dcli com vmware vcenter vm hardware ethernet create --vm testId


Update Command

dcli com vmware vcenter vm hardware ethernet update

Description

Updates the configuration of a virtual Ethernet adapter.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
nic string Yes Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.
upt‑compatibility‑enabled bool No Flag indicating whether Universal Pass-Through (UPT) compatibility should be enabled on this virtual Ethernet adapter. This option may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If unset, the value is unchanged. Must be unset if the emulation type of the virtual Ethernet adapter is not VMXNET3.
mac‑type string No MAC address type. This option may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If unset, the value is unchanged. Valid values are: {MANUAL, GENERATED, ASSIGNED}
mac‑address string No MAC address. This option may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If unset, the value is unchanged. Must be specified if Ethernet.UpdateSpec.mac-type is MANUAL. Must be unset if the MAC address type is not MANUAL.
wake‑on‑lan‑enabled bool No Flag indicating whether wake-on-LAN shoud be enabled on this virtual Ethernet adapter. This option may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If unset, the value is unchanged.
backing‑type string No Backing type for the virtual Ethernet adapter. Valid values are: {STANDARD_PORTGROUP, HOST_DEVICE, DISTRIBUTED_PORTGROUP, OPAQUE_NETWORK}
backing‑network string No Identifier of the network that backs the virtual Ethernet adapter. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: Network. When commands return a value of this class as a output, the option will be an identifier for the resource type: Network. This option is optional and it is only relevant when the value of type is one of STANDARD_PORTGROUP, DISTRIBUTED_PORTGROUP, or OPAQUE_NETWORK.
backing‑distributed‑port string No Key of the distributed virtual port that backs the virtual Ethernet adapter. Depending on the type of the Portgroup, the port may be specified using this field. If the portgroup type is early-binding (also known as static), a port is assigned when the Ethernet adapter is configured to use the port. The port may be either automatically or specifically assigned based on the value of this option. If the portgroup type is ephemeral, the port is created and assigned to a virtual machine when it is powered on and the Ethernet adapter is connected. This option cannot be specified as no free ports exist before use. May be used to specify a port when the network specified on the network option is a static or early binding distributed portgroup. If unset, the port will be automatically assigned to the Ethernet adapter based on the policy embodied by the portgroup type.
start‑connected bool No Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If unset, the value is unchanged.
allow‑guest‑control bool No Flag indicating whether the guest can connect and disconnect the device. If unset, the value is unchanged.

Example

dcli com vmware vcenter vm hardware ethernet update --vm testId --nic testId


Delete Command

dcli com vmware vcenter vm hardware ethernet delete

Description

Removes a virtual Ethernet adapter from the virtual machine.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
nic string Yes Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.

Example

dcli com vmware vcenter vm hardware ethernet delete --vm testId --nic testId


Connect Command

dcli com vmware vcenter vm hardware ethernet connect

Description

Connects a virtual Ethernet adapter of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the Ethernet.update command may be used to configure the virtual Ethernet adapter to start in the connected state when the virtual machine is powered on.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
nic string Yes Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.

Example

dcli com vmware vcenter vm hardware ethernet connect --vm testId --nic testId


Disconnect Command

dcli com vmware vcenter vm hardware ethernet disconnect

Description

Disconnects a virtual Ethernet adapter of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the Ethernet adapter is not connected to its backing resource. For a powered-off virtual machine, the Ethernet.update command may be used to configure the virtual Ethernet adapter to start in the disconnected state when the virtual machine is powered on.

Options

Option Name Type Required Description
vm string Yes Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
nic string Yes Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.

Example

dcli com vmware vcenter vm hardware ethernet disconnect --vm testId --nic testId