5

I'm looking to build a series of VMWare Virtual Machines as my client needs them.

The hostnames and IPs have been pre-assigned. But I'm going to need to add rules to our switches for each host's MAC address.

I'm trying to find out if I can predict the MAC addresses that are going to be generated.

3
  • Out of curiosity, why add rules to the switches? Security policy or something else? Nov 22, 2010 at 23:02
  • Yeah, only known mac addresses inside specific networks can communicate outside of that network. Nov 22, 2010 at 23:26
  • I have no knowledge of how VMWare generates MAC addresses but I do know that security by MAC address is an absolute nightmare and massively prone to error. I can't think of a single circumstance when this would be preferable to using ACLs on the router.
    – blankabout
    Apr 22, 2011 at 6:34

3 Answers 3

6

You can hard code them in a VM, but you can't predict them if you allow vmware to auto-generate them. VMware has a lot of different KB articles that mention this topic, but I think this one is the best place to start.

Some things to keep in mind:

  1. If you statically assign them, you must use the allowed range that VMware defines.

  2. If you replicate/copy/duplicate a VM that has a static assignment, you will have problems if it is on the same broadcast domain.

3
  • 1
    As I'm sure @Jed knows, that should be broadcast domain, not collision domain.
    – blankabout
    Apr 22, 2011 at 4:48
  • @blankabout Thanks! Yea, I do know better, but I wasn't really paying attention. So noted, and corrected. +1 on the comment. Apr 22, 2011 at 6:08
  • No, you don't need to use the allowed range that VMware defines for statically assigned MAC addresses. You can instead import VMs from other hypervisors like VirtualBox including the MACs generated there or you can keep the MACs from real hardware if you do P2V. Of course only if you don't continue to use the source of the copy in the same network.
    – Juergen
    Feb 28, 2021 at 15:45
3

You can set a static MAC by following the instructions in this link. That should give you all the control you're looking for.

0

Another thing to keep in mind is that the static MACs can be fragile. I can't remember the exact situations, but upgrading the guest's tools, changing the vNIC type, or doing a VMWare Convert could trigger the MAC address to change.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .