Hyper V Mac Address Manual Static

After enabling the Hyper-V role a static IP address was assigned. This does not change de MAC address pool anymore. When installing the Hyper-V role on another server, the server received the same IP address. This results in the same MAC address pool on both servers which means that VMs gets duplicate MAC addresses. Quick tip today on a static MAC address assignement, How to set a static MAC address in VMware Environment? Or rather what to look after when having alarms showing VM MAC conflict. MAC address “Spoofing” if you prefer, is well known. Sometimes you may need to “mess” with MAC address.

Oct 22, 2008  Hyper-V allows a virtual machine to be created with a static or dynamic MAC address. A static MAC address is one that the Hyper-V administrator assigns to the virtual machine. A dynamic address is one that Hyper-V assigns from its MAC address pool. When Hyper-V is installed, a MAC address pool is created and stored in the registry at. Since Hyper-V inception back in 2008, you can configure a virtual machine to use a dynamic or a static MAC address for any given network adapter. By default, Hyper-V use dynamic MAC address – which means that Hyper-V will generate an initial MAC address for each network adapter, either for VM.

Active5 years, 11 months ago

I have a scenario that involves building out a ton of virtual machines in Hyper-V, I cannot use SCVMM and must use a scripted method to create these VMs. I have a CSV with all required information filled out so my Create-VM code works and creates the VMs with no problem.

My issue is, I would like to assign a static MAC address to the VM NICs during creation. This will help me setup DHCP IP reservations as per my lab requirements. Once I create the VM, I do this command:

At this time I have a NIC already added to this VM and in theory it should set the MAC address to whatever $Config.intMAC holds but it does not, the radio box is still selected for dynamic MAC address and the static value remains unselected and all 0's.

Hyper V Mac Address Manual Static

How would I assign the MAC pro-grammatically?

AddressKPSKPS
2291 gold badge5 silver badges18 bronze badges

1 Answer

try:

remember that if you use a variable that the mac address is a string.

Jim B

Hyper-v Set Ip Address

Jim B
23.3k3 gold badges29 silver badges58 bronze badges

Hyper-v Static Mac

Not the answer you're looking for? Browse other questions tagged scriptingpowershellhyper-vwindows-server-2012 or ask your own question.