次の方法で共有


IVMNetworkAdapter::IsEthernetAddressDynamic property

The IsEthernetAddressDynamic property contains whether the Ethernet (MAC/Physical/Network) address of a virtual NIC can either be set to a static address or it can be generated dynamically to avoid conflicts with other virtual machines.

This property is read/write.

Syntax

HRESULT put_IsEthernetAddressDynamic(
  [in]  VARIANT_BOOL isDynamic
);

HRESULT get_IsEthernetAddressDynamic(
  [out] VARIANT_BOOL *isDynamic
);

VB
VMNetworkAdapter.IsEthernetAddressDynamic( _
  ByRef isDynamic, _
  ByVal isDynamic _
)

Property value

Contains vbTrue if the Ethernet address is dynamically generated, vbFalse if the Ethernet address is static.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The isDynamic parameter was NULL.
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.

Remarks

This property is used to determine whether the Ethernet address will be generated dynamically.

The DynamicEthernetAddress property should be set to TRUE (default) for most virtual network interfaces. If software in the guest requires a static Ethernet address, this property should be set to FALSE.

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