-
-
Save pjkelly/1068716 to your computer and use it in GitHub Desktop.
I've been trying to get this going for a couple days down OS X 10.9.1 (Maverick) w/ Ubuntu 12.04 LTS guest. My if I try this /etc/network/interfaces file on the guest...
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
...I don't get any IPs (as I would expect). When I try this...
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.78.10
netmask 255.255.255.0
network 192.168.78.0
broadcast 192.168.78.255
gateway 192.168.78.1
...things seem to work properly. I get the IPs I would expect and can SSH into the box. The problem is that it hangs when I try to get outside to the Internet. I've tried adding a "dns-nameservers 192.168.78.2" and that seems to get me a little farther as it lets me resolve domain names to their IP address. That said it won't connect to anything. I can't "telnet 8.8.8.8 53" or "curl google.com" or anything as it just hangs. I sort of feel at the end of the rope. Any ideas?
Wahooo! Found the solution via a forked gist. :p I just had to restart services (https://gist.github.com/mgutz/1b8b5569190155dc31b9).
sudo /Applications/VMware\ Fusion.app/Contents/Library/services.sh --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/services.sh --start
Restarting w/VMWare Fusion 7
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --start
thank you @bryancallahan that's exactly the piece I was missing, now everything works as it should :)
I was having a problem finding the correct "VM name" as I thought it was the name of the VM itself. Then I discovered the actual name that the DHCP Client was sending to the virtual DHCP Server was the system hostname, e.g. the output of the command hostname. To verify which name the system is using, look into the DHCP Client configuration.
ps -ef | grep dhc
In the output, find the name of the .conf file and look into it.
cat /var/lib/NetworkManager/dhclient-ens33.conf
...
send host-name "master";
...
The line shown shows you the exact hostname to use in Fusion's vmnet8/dhcpd.conf file as described above. Hope that helps.
VMWare Fusion 11.0.2 w/ OSX 10.14:
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh --start
For Windows hosts (at least tested with 10 and Fusion 12.1), you need to ensure that in the dhcp.conf
the hostname is the Windows Computer Name as given in a cmd window by the hostname
command.
host SQLServer-W10x64 {
hardware ethernet 00:0c:29:9d:2a:38;
fixed-address 172.16.179.102;
}
You might also need to delete the DHCP leases entry in /var/db/vmware/vmnet-dhcpd-vmnet1.leases
or /var/db/vmware/vmnet-dhcpd-vmnet8.leases
depending on whether you're dealing with the private/Host-only or NAT DHCP server.
There seem to be issues with Big Sur but I haven't upgraded yet. See here and here. Seems Big Sur doesn't allow Fusion to have its own DHCP servers and therefore manages it for Fusion.
Very helpful, especially the comments thanks.
This was the best resource I found online to help me configure a guest VM with a static IP on MacOS. It's kind of surprising VMWare doesn't have better documentation for Fusion's networking.
This was the best resource I found online to help me configure a guest VM with a static IP on MacOS. It's kind of surprising VMWare doesn't have better documentation for Fusion's networking.
I totally agree... I spent so much time on setting static IPs on vms...
On OS X 10.9.1 (Maverick) + VMware Fusion 6.0.2 I found the dhcp.conf there:
/Library/Preferences/VMware\ Fusion/vmnet8