VMware Cloud Community
RTmxa
Contributor
Contributor

Exposing physical NIC's MAC address to Guest OS

Hi guys,

I was wondering if there is a way for the guest OS to get the MAC address of the physical NIC. I am using ESXi as my hypervisor.

Appreciate the help

Thanks...

Reply
0 Kudos
8 Replies
a_p_
Leadership
Leadership

Not on the ESXi side, sorry.

The only option you have is to set it in the guest OS's network settings (LAA).

André

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

Welcome to the VMware Communities forums. A guest OS will essentianlly be blind to the hardware that the host is using. Is there a reason why you want to know the MAC address for the host's NIC? If it's for a reporting purpose you could query the API for the host to get that info.




Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

Reply
0 Kudos
a_p_
Leadership
Leadership

Sorry , guess I misunderstood your question. I was thinking about using the physical MAC address of the original host after P2V.

Please ignore my previous post.

André

Reply
0 Kudos
RTmxa
Contributor
Contributor

HI Dave,

What I need to do is license some software and I need to tie license to the MAC address of the NIC card to ensure that people can't just install the SW on a different box with the same NIC for the VM. Is there a way I can force the VM NIC to be somehow tied to the physical NIC or HW on which the VM is created and not allow the user to change the NIC once the VM is created? So for instance the NIC will be 00:50:56:aa:bb:cc when the physical nic has an address of xx:xx:xx:aa:bb:cc.

I am open to other alternative ways to achieve some sort of SW to HW binding.

Thanks

Reply
0 Kudos
a_p_
Leadership
Leadership

In my opinion all HW checking does not make any sense in a virtual environment.

Even if you were able to do this, all of the advantages (NIC failover, vMotion, ...) of the VMware environment would not work and I think your clients would not be very happy with this.

If you need to protect your software, you could create an encrypted license files, with different unique information about the customer E.g. Customer name, domain name, hostname, virtual MAC address. Then check for domain name, hostname and virtual MAC address at program start and display a splash screen (or a footer in your application) with the customers name. I think no company would use software where all employees could see that it is not licensed to the own company.

André

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

As André mentions in a virtual environment it's best to take an agnostic approach to hardware. You could pass a physical NIC into a VM, but that would tie it to a specific host. A USB dongle could overcome that as you could employ a USB over IP device but that's adding complexity. A license file or contact with a central license server might be best.

If you were to go with the MAC, with Windows for example you can set the MAC at the OS level which might get around your MAC address check.




Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

Reply
0 Kudos
RTmxa
Contributor
Contributor

Guys, thanks for your answers

Just to clarify couple things.

This VM is dedicated to my application only.

I probably don't need to know the physical NIC MAC at the Windows (Guest)OS level, but is there a way to know the MAC while creating the OS. If so I can use that to assign the Virtual MAC based on the physical MAC and achieve the SW to HW binding. I could then disable modification of this MAC address.

Unfortunately I cannot use a centralized server thought that would make things much simpler Smiley Happy

Thanks

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

There are a couple of options here to set a static MAC address - http://www.vladan.fr/static-mac-address-set-in-vmware/.




Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

Reply
0 Kudos