7 Replies Latest reply on Feb 9, 2019 9:10 AM by Al Koch

    How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?

    Al Koch Novice

      Hello,

       

      I have a notebook running VMware Workstation Pro 15 that has several VM's created and running successfully. The notebook is normally on a wired network with a Static IP and all of these VM's use Bridged Networking and they all have static IP addresses. This is all working in my office environment where the VM IPs are all compatible with the other IPs used in the office network.

       

      Recently I traveled out of the office and had to connect to a "public/foreign/guest" WiFi hot spot. I first got the notebook onto the available WiFi using a DHCP configuration for the notebook and was able to successfully connect the notebook to the WiFi. It then occurred to me that the various VM's needed to be reconfigured in some fashion (since they had Static IPs that were no longer "valid") but I cannot figure out what that should be. Obviously, I cannot leave them set to Bridged since their static IP's are not on the same subnet as the WiFi hot spot and therefore would have no connectivity out of the notebook. I tried experimenting with "Host – only" (which I think would allow me to maintain the current Static IPs) but I was not able to determine how that should be set up.

       

      My question is how do I configure the notebook for WiFi connectivity and how do I change the VM network configurations so that the VM's can access the Internet while maintaining their static IP addresses (various scripts and applications running on the VM's communicate with the other notebook VM's by directly addressing the IP address).

       

      Thank you.

        • 1. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
          wila Guru
          User ModeratorsCommunity Warriors

          Hi,

           

          The only proper solution for that is to use NAT networking.

           

          --

          Wil

          | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
          | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
          | More info at https://www.vimalin.com
          | Twitter @wilva
          | VMware Wiki at http://www.vi-toolkit.com
          • 2. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
            Al Koch Novice

            Hi Wila,

             

            Thanks for replying.  I can use NAT and get connected to the Host (which in turn is using WiFi to connect to the Internet) but I have to set the Guest VM's adapters to DHCP for them to get out to the Internet.  What I need is a way to allow them to maintain their assigned Static IPs so they can continue to use those IPs to communicate among themselves.  Any idea how to do this?

             

            Also, can you explain the difference between NAT and Host-0only?  The descriptions in the Settings page aren't very helpful and I havne't found anything else that makes the difference clear:

            NAT (Use to share the Host's IP address)

            Host-only (A private network shared with the host)

             

            Thank you for the help.

            • 3. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
              sjesse Expert

              Nat - Kinda like a home router, all your vms share your pcs ip

              Host Only - More like a switch, no internet access unless you use another vm as a router using bridged or Nat

               

               

              I'd reconfigure ur vms to use nat networking, they can use static ips, the only time you need bridged is if you want them accessible outside of that vms. In the bridged case static will never work as networks change and will most likely not work.Open the virtual network editor to see the ranges they use if you don't know, just click on edit then virtual network editor

               

               

              In my case I disable workstations dhcp and have my  own dhcp and dns for my lab.

              • 4. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
                wila Guru
                Community WarriorsUser Moderators

                Hi,

                 

                The explanation from Sjesse is probably already helpful, if not then have a look at the doc (it's pretty good in explaining how the networking works)

                 

                Configuring Network Connections

                 

                What I should have mentioned in my original reply is that if you use bridged that the network configuration depends on the network you are connected to.

                This means that the network segment your host's network is in depends on the network you are connecting to. Chances are quite big that the segment does not match your static IP's of the VMs and as such you won't even be able to connect to those VM's. The way to work around that is by using NAT.

                 

                The NAT network that VMware configures is the same everytime you boot your host, so you can indeed setup a bunch of static VM's that use the DNS and gateway addresses of that NAT network to connect to the outside network. If you have a need to connect from the host to one of the VMs in the NAT network then you can use network forwarding rules to do so.

                It's all described in the doc, but if you need more help then just let us know.

                 

                --

                Wil

                | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                | More info at https://www.vimalin.com
                | Twitter @wilva
                | VMware Wiki at http://www.vi-toolkit.com
                • 5. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
                  Al Koch Novice

                  Hi Wil and Sjesse,

                   

                  I apologize for the excessively long delay in responding. My broadband connection failed and an upgrade to a faster vendor took a lot more time than I expected but I'm finally back online.

                   

                  I have experimented with using NAT and I am still having trouble getting a configuration that reliably works. Here are what I think are the relevant points:

                  – I would like to maintain the Static IP's that are associated with my various VMs so that when I copy them to the notebook I won't have to change the IP's. (Again, this is because I have some programs and scripts running in some of the VMs that need to be able to directly access servers running in some of the other VMs).

                  – Since the subnet I am working with is 192.168.1 I used the Virtual Network Editor to modify the default VMnet8 on the notebook in the following way:

                      - Subnet = 192.168.1.0

                      - Subnet mask = 255.255.255.0

                      - Gateway = 192.168.1.254 (this is the network address of the actual router connected to the Internet)

                      - DHCP Start = 192.168.1.128

                      - DHCP End  = 192.168.1.254

                  - The adapters associated with the VMs look like this:

                      - IP address = 192.168.1.25

                      - Subnet mask = 255.255.255.0

                      - Gateway = 192.168.1.254 (this is the network address of the actual router connected to the Internet)

                  - Running an IP Scanner shows that the "notebook" is associated with not only its actual assigned static IP (I'm running a wired configuration at the moment) but also 192.168.1.1 which I am interpreting as being the IP address of the NAT virtual adapter.

                   

                  Once I launch a VM I am prompted not once but twice to specify the Public/Private location of a network (indicating I think that to "new" networks have been found).  If I look at the Network and Sharing Center I see that I now have two networks. In addition if I look at the adapter's properties I see that there are two entries for the Gateway – one is .254 (which is the one I specified) and the other is .1 (which I assume is theVMnet8 Host Virtual Adapter).  The result is that I do not have a connection to the Internet.  If I click on the "X" in the network map (in the Network and Sharing Center) I often see the error message "Windows can't communicate with the device or resource (primary DNS server)".

                   

                  It is interesting if I change the VM adapter to use DHCP instead of the Static IP address because then I do get a connection to the Internet.

                   

                  I suspect that the problem is the Gateway but I cannot figure out what the problem is.

                   

                  Two specific questions I would ask are:

                  - What are the two networks being discovered on the initial launch of the VM?

                  - How should I configure the VMnet8 adapter in this scenario?  Furthermore all of this data has been gathered with the notebook wired into the LAN. When I actually connect using Wi-Fi to a public/foreign hotspot the subnet address is going to be different is not clear how the NAT adapter configuration would be altered.

                   

                  Thank you very much for your help.

                  • 6. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
                    sjesse Expert

                    First click edit on workstation and click on virtual network editor, then click on the change setting button at the bottom, this lets you see all the networks you have.

                     

                     

                    VMnet0 is your bridged adapter, unless you change it. To make sure its always using wireless change it from automatic to your wireless adapter, I've seen it use the wired connection even  though it wasn't in use.

                     

                    VMnet1 is your host only network, dhcp will provide addresses in that subnet range, mine is 192.168.231.0. If you high light it it gives you options at the bottom. The first option connects a virtual adpater to you host, this is used to communicate on that network directly, in most cases you want this but not always. You also have the option to use a local dhcp, which you are seeing work, if you click that button you can change the standard things you would expect..

                     

                     

                    VMnet8 is your nat adapter, its the same as a host only one, except you get nat settings

                     

                    The important part here is this is where the gateway is defined, which is a .2 address by default. You can also do other things like port forwarding, where you forward a port on your host machine into the vm.

                     

                    So what you want to do on your local machine to use static ips, but always have internet access in diferent locations is set your vms to use NAT

                     

                     

                    Then locally set a local address that uses the subnet range of your NAT subnet(these are random), and use the gateway in your nat settings. This means the static ips in your vms will be different the the dhcp address your getting whereever you are.

                    • 7. Re: How do I configure VMware Pro WorkStation v15 on a notebook to work with WiFi and keep VM Static IPs?
                      Al Koch Novice

                      Hi sjesse,

                       

                      Thank you for the detailed response, especially with snapshots.  I seem to understand the concepts you are describing but I am still setting something incorrectly.  Let me ask you a specific question:

                       

                      I transfer a VM to the notebook which is (for simplification) wired into my LAN.  The notebook has the following:

                      IP = 192.168.1.20

                      Mask = 255.255.255.0

                      Gateway = 192.168.1.254 (IP of the physical router on the LAN that is connected to the Internet)

                       

                      The transferred VM has the following configuration that works when running on a host on the LAN and that I need to keep:

                      IP = 192.168.1.25

                      Mask = 255.255.255.0

                      Gateway = 192.168.1.254

                       

                      What do I set for VMnet8:

                      IP = ?

                      Mask = ?

                      Gateway = ?

                       

                      I am wanting to keep all of the VM settings as is (there are actually 10 VMs so changing them is something I'd like to avoid.)  In particular I am wondering if the VM Gateway can retain its value of 192.168.1.254.

                       

                      What are the specific VMnet8 NAT/settings and please confirm I don't have to change the VM Gateway.

                       

                      Thank you very much for the help.