Virtual Server MAC Address Auditing
Here’s how to audit and configure virtual MAC addresses on Virtual Server VMs
Can you tell me more about how MAC addresses are assigned with Microsoft Virtual Server. Also, is there an easy way to audit the MAC addresses of the VMs on a Virtual Server host system? We use MAC address filtering on our switches and I’m worried about the impact of virtual MAC addresses on the network infrastructure.
Adam, you raise some very good issues. Virtual MAC address assignments are based on Microsoft’s organizationally unique identifier (OUI) registration with the Institute for Electrical and Electronic Engineers (IEEE). An OUI is a unique MAC address prefix assigned that is assigned to all NIC vendors, both physical and virtual. You can check on the OUI of any vendor by pointing your Web browser to the IEEE Registration Authority – IEEE OUI and Company_id Assignments site.
If you check the IEEE site, you’ll see that Microsoft has the MAC address OUI prefix of 00-03-FF. So by default, Virtual Server VM MAC addresses will range from 00-03-FF-00-00-00 to 00-03-FF-FF-FF-FF. Here are the MAC OUIs of other popular virtualization platforms:
- Virtual Iron: 00-0F-4B
- VMware: 00-0C-29 and 00-50-56
- XenSource: 00-16-3E
By default, Virtual Server generates dynamic MAC addresses for each VM’s virtual network interfaces. Generating addresses dynamically when a VM starts will prevent duplicate MAC addresses from causing virtual network conflicts. Of course, if you’re using MAC address filtering on your network switches, then you'll need to assign static MAC addresses to each VM. To change a MAC address from dynamic to static, you just need to follow these steps in the Virtual Server Management Web page:
- Under the Virtual Machines menu on the left side of the wide, mouse over “Configure” and then select the VM to configure.
- Next, scroll down and click on the Network Adapters link.
- For each virtual network adapter listed, click the Static radio button, enter a MAC address (if you want to change the existing address), and then click OK.
I’m sure that your network infrastructure team would probably want to have a list of all assigned virtual NIC MAC addresses on the Virtual Server system. You can get this information by running the vsmacaudit.vbs script, shown here:
On Error Resume Next
strLogFile = "C:\VirtualMACaddresses.txt"
Const ForWriting = 2
'Create Log File
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile (strLogFile, _
'Connect to virtual server application
Set objVS = CreateObject("VirtualServer.Application")
set colVMs = objVS.VirtualMachines
'Write Virtual MAC Addresses to text file
For Each objVM in colVMS
Set colNetworkAdapters = objVM.NetworkAdapters
For Each objAdapter in colNetworkAdapters
objFile.WriteLine("VM Name: " & objVM.Name)
objFile.WriteLine("MAC address: " &_
If objAdapter.IsEthernetAddressDynamic = _
objFile.WriteLine "*** Warning: Dynamic" &_
"MAC Address Assigned ***"
The script will list write the MAC address of each VM on a virtual server host to a file named “C:\VirtualMACaddresses.txt.” You can change the output file name and location by editing the strLogFile variable in the script. Also you will see the string “***Warning: Dynamic MAC Address Assigned ***” under any MAC address configured as dynamic.
Hopefully, this information will help you to solve your Virtual Server MAC address management problems.