2009. 4. 2.

Vmware MAC 주소 변경 방법

Vmware MAC 주소 변경 방법

Windows Server 2003 Enterprise Edition.vmx




Setting the MAC Address Manually for a Virtual Machine

VMware ESX Server automatically generates MAC addresses for the virtual network adapters in each virtual machine. In most cases, these MAC addresses are appropriate. However, there may be times when you need to set a virtual network adapter's MAC address manually — for example:

Virtual network adapters on different physical servers share the same subnet and are assigned the same MAC address, causing a conflict.
You want to ensure that a virtual network adapter always has the same MAC address.
This section explains how VMware ESX Server generates MAC addresses and how you can set the MAC address for a virtual network adapter manually.


How VMware ESX Server Generates MAC Addresses

Each virtual network adapter in a virtual machine gets its own unique MAC address. ESX Server attempts to ensure that the network adapters for each virtual machine that are on the same subnet have unique MAC addresses. The algorithm used by ESX Server puts a limit on how many virtual machines can be running and suspended at once on a given machine. It also does not handle all cases when virtual machines on distinct physical machines share a subnet.

A MAC address is a six-byte number. Each network adapter manufacturer gets a unique three-byte prefix called an OUI — organizationally unique identifier — that it can use to generate unique MAC addresses. VMware has two OUIs — one for automatically generated MAC addresses and one for manually set addresses.

The VMware OUI for automatically generated MAC addresses is 00:0C:29. Thus the first three bytes of the MAC address that is automatically generated for each virtual network adapter have this value. ESX Server then uses a MAC address generation algorithm to produce the other three bytes. The algorithm guarantees unique MAC addresses within a machine and attempts to provide unique MAC addresses between ESX Server machines.

The algorithm that ESX Server uses is the following:

We use the VMware UUID (Universally Unique Identifier) to generate MAC addresses. We then check for any conflicts. If there is a conflict, we add an offset and check again, until there is no conflict. (The VMware UUID is based on the path to the virtual machine and the host's SMBIOS UUID.)

Once the MAC address has been generated, it does not change, unless the virtual machine is moved to a different location; for example, a different path on the same server or a different ESX Server machine. We save the MAC address in the configuration file of the virtual machine.

ESX Server keeps track of all MAC addresses that have been assigned to network adapters of running and suspended virtual machines on a given physical machine. ESX Server ensures that the virtual network adapters of all of these virtual machines have unique MAC addresses.

The MAC address of a powered-off virtual machine is not checked against running or suspended virtual machines. Therefore it is possible, but unlikely, that when a virtual machine is powered on again, it can get a different MAC address. This is due to a conflict with a virtual machine that was powered on when this virtual machine was powered off.


Setting MAC Addresses Manually

In order to work around both the limit of 256 virtual network adapters per physical machine and possible MAC address conflicts between virtual machines, the MAC addresses can be assigned manually by system administrators. VMware uses a different OUI for manually generated addresses: 00:50:56. The MAC address range is 00:50:56:00:00:00-00:50:56:3F:FF:FF.

You can set the addresses by adding the following line to a virtual machine's configuration file:

ethernet.address = 00:50:56:XX:YY:ZZ

where refers to the number of the Ethernet adapter, XX is a valid hex number between 00 and 3F, and YY and ZZ are valid hex numbers between 00 and FF. The value for XX must not be greater than 3F in order to avoid conflict with MAC addresses that are generated by the VMware Workstation and VMware GSX Server products. Thus the maximum value for a manually generated MAC address is

ethernet.address = 00:50:56:3F:FF:FF

You must also set the option in a virtual machine's configuration file:

ethernet.addressType="static"

VMware ESX Server virtual machines do not support arbitrary MAC addresses, hence the above format must be used. So long as you choose XX:YY:ZZ uniquely among your hard-coded addresses, conflicts between the automatically assigned MAC addresses and the manually assigned ones should never occur.


Using MAC Addresses

The easiest way to familiarize yourself with MAC addresses is to set the MAC address statically, then remove the virtual machine configuration file options ethernet.address, ethernet.addressType and ethernet.generatedAddressOffset. Check to see that the virtual machine gets a generated MAC address.

We cannot guarantee that a host stays within a specific MAC address range. However, we guarantee that the MAC address never conflicts with any physical host by using our OUIs (00:0C:29 and 00:50:56), that are unique to virtual machines.

http://www.vmware.com/support/esx21/doc/esx21admin_MACaddress.html

댓글 없음: