Friday, August 7, 2015

Configuring VMWare Player Virtual Networks

When we use VMWare Player to run guest operating systems, we sometimes want to automatically configure guest operating systems, such as, to assign fixed IP addresses to guest operating systems based on guest systems' network interfaces' MAC addresses.

This post discusses two items,
  1. to assign fixed IP address to interfaces of guest systems via VMWare's DHCP server
  2. and to change virtual subnet setting for virtual Ethernet segments using the vmnetcfg tool

Assigning Fixed IP Address


VMWare Player comes with a DHCP server that allows the guest systems to automatically configure their IP network settings. By configuring the DHCP server, we can achieve the auto-configuration purpose.

On Windows hosts, the configuration file of the DHCP server is located at directory %ProgramData%\VMWare. As an example, I show the value of  %ProgramData%\VMWare below,



C:>echo %ProgramData%\VMWare
C:\ProgramData\VMWare



In the directory is the configuration file, i.e., vmnetdhcp.conf. We can add host entries to the configuration file to assign fixed IP addresses to guest operating systems. Below is an example that assigns IP address 192.168.101.127 to MAC address 00:0c:29:22:12:4c in the virtual Ethernet segment 8.



# Virtual ethernet segment 8
# Added at 08/06/15 10:57:08
subnet 192.168.101.0 netmask 255.255.255.0 {
range 192.168.101.128 192.168.101.254;            # default allows up to 125 VM's
option broadcast-address 192.168.101.255;
option domain-name-servers 192.168.101.2;
option domain-name "localdomain";
option netbios-name-servers 192.168.101.2;
option routers 192.168.101.2;
default-lease-time 1800;
max-lease-time 7200;
}
host VMnet8 {
    hardware ethernet 00:50:56:10:00:01;
    fixed-address 192.168.101.1;
    option domain-name-servers 0.0.0.0;
    option domain-name "";
    option routers 0.0.0.0;
}

host Ubuntu {
    hardware ethernet 00:0c:29:22:12:4c;
    fixed-address 192.168.101.127;
    option domain-name-servers 192.168.101.2;
    option domain-name "";
    option routers 192.168.101.2;
} 


Changing Virtual Subnet Setting

One particular problem I often encounter is that the IP subnet setting is always changed when I upgrade or reinstall VMWare Player. For instance, in the above IP assignment example, the virtual Ethernet segment 8 is assigned a subnet of 192.168.101.0 with net mask 255.255.255.0 (i.e., 192.168.101.0/24); however, when I reinstall VMWare Player, the Ethernet segment 8's subnet assignment may become 192.168.157.0 with net mask 255.255.255.0 or some other value.

A simple method to change the Ethernet segment's subnet assignment back to the original value or any other valid value is to use the vmnetcfg tool.

The vmnetcfg tool is a part of VMWare Workstation; however, it does not come with VMWare Player. Since we can download VMWare Workstation trial version from VMWare's website, we can extract the tool from the installation package and use it with VMWare Player.

Two excellent posts that helped me and detail how one may extract the vmnetcfg tool from VMWare Workstation installation package and how one may use the tool to reassign a subnet to a virtual Ethernet segment are,

  1. Download vmnetcfg.exe & vmnetcfglib.dll for VMware Player 6.x & 7.x
  2. VMWare Interfaces Tutorial
For the impatient, the user interface of the vmnetcfg tool looks as follows,



It is obvious that one can change the subnet assignment to a selected virtual Ethernet segment.

28 comments:

  1. thanks for giving wonderful such a information about vmware technical information with its real time issues. keep share more tech kind possibilty rules and regulations.
    VMware Training in Chennai

    ReplyDelete
  2. This is ansuperior writing service point that doesn't always sink in within the context of the classroom. In the first superior writing service paragraph you either hook the reader's interest or lose it. Of course your teacher, who's getting paid to teach you how to write an good essay, 
    Data Science course in Chennai
    Data science course in bangalore
    Data science course in pune
    Data science online course
    Data Science Interview questions and answers
    Data Science Tutorial
    Data science course in bangalore

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Beautiful Blog.

    The Blog is very Impressive.

    ReplyDelete
  6. Really awesome blog!!! I finally found a great post here.I really enjoyed reading this article. Nice article on data science . Thanks for sharing your innovative ideas to our vision. Your writing style is simply awesome with useful information. Very informative, Excellent work! I will get back here.Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  7. Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing, data scientist courses

    ReplyDelete
  8. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.Best data science courses in hyerabad

    ReplyDelete
  9. Astounding Blog! I might want to thank for the endeavors you have made recorded as a hard copy this post. I am trusting a similar best work from you later on too. I needed to thank you for this sites! Much obliged for sharing. Extraordinary sites!
    data scientist course in hyderabad

    ReplyDelete
  10. Cool stuff you have and you keep overhaul every one of us, Great work.
    pmp course

    ReplyDelete
  11. Awesome blog post,
    SEO Training In Hyderabad
    SEO stands for search engine optimization. It is the process of ranking your website at the top of the search results for a particular set of keywords. SEO experts will try to rank a specific page on the top of the search results. SEO can increase your brand’s visibility, thus creating brand awareness.

    ReplyDelete
  12. Thanks for the best blog. it was very useful for me.keep sharing such ideas in the future as well. data analytics course in mysore

    ReplyDelete
  13. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..
    full stack developer course with placement

    ReplyDelete
  14. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. business analytics course in kanpur

    ReplyDelete
  15. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    data science training

    ReplyDelete
  16. data science training institute in Chennai
    Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share. . data science training institute in chennai

    ReplyDelete