1 Reply Latest reply on Jul 26, 2012 7:03 AM by Ashish_Lko

    How to get the host mac id in a program running in a vm?

    Ashish_Lko Lurker

      I am writing a licensing module to ensure that the license is bound to the mac id and the license can not be reused on any other machine. However, this doesnt works well on the virtual machine as the my C# code doesnt  return the physical network adaptor's id in the list. I searched all over , but couldnt find a solution. I tried VMWare VIX but no luck so far.... please help!!!

        • 1. Re: How to get the host mac id in a program running in a vm?
          Ashish_Lko Lurker

          I am writing a licensing module to ensure that the license is bound to the mac id and the license can not be reused on any other machine. However, this doesnt works well on the virtual machine as the my C# code doesnt return the physical network adaptor's id in the list. I searched all over , but couldnt find a solution. I tried VMWare VIX but no luck so far.... please help!!!

           

           

          This is the c# code that I am running on a virtual machine which runs on a normal Win 7 workstation, using VMWare player:

           

          System.Net.NetworkInformation.NetworkInterface[] nis = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces();

          foreach (System.Net.NetworkInformation.NetworkInterface ni in nis)

          Console.WriteLine(ni.Description + " ID:" + ni.Id.ToString()+" Address:" + ni.GetPhysicalAddress().ToString() );

          Console.ReadLine();