How can I convince my VMware Fusion VMs not to change IP address?
-
I'm using VMware Fusion for development (I have a Mac but I run Ubuntu in a virtual machine). I'm usually SSHd in to the vm from several terminals. Every now and then, the IP address of the virtual machine changes - and I have to update various tools that point to it. I can't quite figure out the circumstances under which this happens - sometimes it's when I switch from WiFi to Ethernet, but other times it just seems to happen for no reason at all. It's only every week or so (I usually leave my machine plugged in to Ethernet). Any idea how I can convince VMware Fusion to just stick with one IP address for my VM?
-
Answer:
Set your VM to use a static IP address instead of one assigned by DHCP. Open the Network Connections configuration window. You can do this by right-clicking on the network connection icon on the top bar, or through different menu options depending on your Ubuntu version. Choose your connection and hit Edit. Go to the IPv4 Settings tab. Switch the Method dropdown from "Automatic (DHCP)" to "Manual". Open up a terminal and use the ifconfigifconfigifconfig and routerouteroute utilities to find your current IP address and default gateway. Choose an IP address on the same subnet (mine look like 192.168.58.3), a 255.255.255.0 netmask, and the default gateway (mine is 192.168.58.2). The DNS server is is the same as the default gateway. Enter these values into the manual connection configuration and hit Save. You may need to disable and re-enable networking for it to start working. The above assumes you're running desktop Ubuntu. The process is similar for other operating systems. After assigning a static IP address, I give the VMs an entry in my host machine's /etc/hosts file. That becomes a place you can look to find the next unassigned IP.
Anonymous at Quora Visit the source
Related Q & A:
- How can I connect my VMware virtual machine to the Internet?Best solution by Yahoo! Answers
- How can I convince my parents to let me get a skateboard?Best solution by Yahoo! Answers
- How can I convince my mom to let me lease a horse?Best solution by Yahoo! Answers
- How can I convince my parents to let me get a hamster?Best solution by Yahoo! Answers
- HOW CAN I CONVINCE MY PARENTS A TRAMPOLINE IS SAFE?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.