Share via


IVMNetworkAdapter::EthernetAddress property

The EthernetAddress property contains the Ethernet (MAC/Physical/Network) address of the virtual NIC.

This property is read/write.

Syntax

HRESULT put_EthernetAddress(
  [in]  BSTR ethernetAddress
);

HRESULT get_EthernetAddress(
  [out] BSTR *ethernetAddress
);

VB
VMNetworkAdapter.EthernetAddress( _
  ByRef ethernetAddress, _
  ByVal ethernetAddress _
)

Property value

The Ethernet address of the virtual NIC. It is in MAC address form of XX-XX-XX-XX-XX-XX where X is a hexadecimal digit with a value in the range of 0-9 or a-f.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The ethernetAddress parameter was NULL.
E_INVALIDARG
The ethernetAddress parameter is not in the correct format.
VM_E_CANT_SET_DYNAMIC_MAC_ADDRESS
The Ethernet address for a network interface can either be generated dynamically by virtual server or can be set to a static address by the user. This method cannot be called when the address is set to be generated dynamically. The IsEthernetAddressDynamic property is used to change the generation behavior of the Ethernet address.
VM_E_VM_UNKNOWN
The virtual machine was not found. This may occur if the machine was removed after the IVMNetworkAdapter object was created.
DISP_E_EXCEPTION
An unexpected error has occurred.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMNetworkAdapter