VMware Horizon Community
jlmorr2
Contributor
Contributor

Random MACs with multiple network cards

I want to set up a group of virtual machines that have two NICs. One NIC is for the public network and the other is for a private network. Is not possible? I suspect it is, I just haven't seen it implemented.

I can live with a random MAC on my private network. I have my own DHCP server and I can configure it. My domain controller is connected to the private network so when the computer comes online I can have it run scripts.

I have a public network that doesn't like random MACs. I control a switch that connects to the public network. I believe I can control what MAC addresses it will allow to send traffic through.

My idea is to let the virtual machine come online. The public network should be blocked. The private network should be available. The virtual machine should connect to the Domain Controller and run a script. The script should do the following.

Disable the public network NIC.

Modify the registry to change the MAC for the public network NIC to a registered MAC address..

Reenable the public netwrok NIC.

After the public network NIC is reenabled it should be allowed to talk through my switch and contact the DHCP server on the public network.

I should now be able to access the remote desktop over the public network.

Does this sound like it might work? Does anyone have any other ideas on how I can get around the public network requiring registered MACs without installing third party software?

Reply
0 Kudos
4 Replies
admin
Immortal
Immortal

I believe the MAC typically comes from the network card correct? If windows can overwrite the hardware MAC that may work. However in a VMware virtual machine the mac address is stored in the .vmx file of the VM. There are a number of methods to do this. I found a communities link pointing to a few other sources of information on this subject:

http://communities.vmware.com/thread/83777

Also note the first comment on the 'virtrix' link. You can do it through the vCenter UI.

Reply
0 Kudos
jlmorr2
Contributor
Contributor

Yes, the MAC address normally comes from the card. However, you can go into the registry in Windows and change it. I used to do this when I upgraded computers where I work. The process for replacing a MAC address on the network took over a day. Modifying the registry was quick. The people in charge of the network have streamlined the process and it takes about 5 minutes now.

What I read seems to apply to Virtual Machines and not Virtual Desktops. I will read through it more later. I know how to set up a static MACs from vCenter for a Virtual Machine. This is not possible in View.

I am going to try to change the MAC of a vitrtual server I have by modifying the registry. I will do the steps listed above manually as opposed to using script. If is works the IP address should change when it contacts the DHCP. When I reboot it it should get the MAC from the vmx file and get the IP associated with that MAC. I will let you know how it turns out.

Reply
0 Kudos
jlmorr2
Contributor
Contributor

I took an active VM and disabled its network adapter. I then changed the address in the registry. I then reenable it. The VM contacted the DHCP server and got a different address. It appeared to be running just fine.

I rebooted the machine. It kept the registry change and has the MAC I entered in the registry. I removed the registry entry and rebooted it. It boots with the MAC address assigned by vCenter and appears to be running fine.

If this works in View I might be able to get it to work in my environment. I just block the unknown MACs at my public network switch. I logon to the virtual desktop from the private network. I make the changes to the registry to allow connecting to the public network. When the virtual desktop is rebooted I hope it ignores the random MAC and uses the MAC I assigned in the registry.

Any guesses on if this will work?

Does anybody know if I can have multiple NICs in a virtual desktop?

VMbkelly, thanks for giving me the idea to try this. The next step is to try this in View.

Reply
0 Kudos
admin
Immortal
Immortal

Hmm.. ok maybe I'm missing something here, but virtual desktops are just VMs on the back end unless you're using the Connection Server to broker to physical hosts. So if something works with a regular VM it should also work with a desktop VM. Maybe you can elaborate a bit to set me straight. And you're welcome. :smileygrin:

Reply
0 Kudos