VMware Fusion Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[VMware Fusion#Subjects|VMWare Fusion]]
* [[VMware Fusion#Subjects|VMWare Fusion]]


=Location of the Virtual Machine Images=
=Location of the Virtual Machine Bundle=


By default is ~/Documents/Virtual Machines.
By default location for the [[VMware_Fusion_Concepts#VM_Bundle|VM bundles]] is ~/Documents/Virtual Machines.


However, each VM image can be placed in an arbitrary location during creation, in the "Finish" screen -> Customize Settings -> Save As: -> Browse button.  
However, each VM bundle can be placed in an arbitrary location during creation, in the "Finish" screen -> Customize Settings -> Save As: -> Browse button.  


Recommended location: ~/VMware Fusion VMs.
Recommended location: ~/VMware Fusion VMs.
To figure out where the files of an existing VM are, go to VMware Fusion -> Window -> Virtual Machine Library -> Select the VM -> Right Click -> Show in Finder.
=Networking=
==Configuration Files==
/Library/Preferences/VMware Fusion/networking
/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
/Library/Preferences/VMware Fusion/vmnet8/nat.conf
/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf
==Configure a Static IP Guest to be Externally Routable==
The guests, even those configured with static IP addresses, get unroutable addresses, so if we want a guest to be able to establish connections with external servers, we need to configure it with the IP of the [[VMWare_Fusion_Networking_Concepts#Gateway|gateway]] that performs the NAT translation. This is not 172.16.153.1, but 172.16.153.'''2'''.
==Configure DHCP to Serve a Static Address==
{{External|https://willwarren.com/2015/04/02/set-static-ip-address-in-vmware-fusion-7}}
1. Get the MAC address for the VM's network interface: Virtual Machine -> Settings -> Network Adapter -> Advanced options -> MAC Address.
You may want to do that when the VM is down, so you can copy-and-paste.
2. Edit <tt>/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf</tt>.
{{Warn|As root}}
Add at the bottom of the file:
<pre>
host centos-docker-server {
        hardware ethernet 00:0C:29:41:82:0F;
        fixed-address 172.16.153.10;
        option broadcast-address 172.16.153.255;
        option domain-name-servers 172.16.153.2;
        option domain-name local;
        option routers 172.16.153.2;
}</pre>
Use the actual MAC address as read from the network adapter, and the actual host name.
The address does not necessarily have to be DHCP the range declared at the top of the file. However, the other network settings (subnet, gateway, etc.) should be consistent with the DHCP section settings, to allow the new host to use the default gateway and communicate with the DHCP-addressed hosts.
3. Restart VMware Fusion networking runtime, to re-initialize the DHCP server.
{{Warn|Execute vmnet-cli as root, otherwise you will get "Failed to initialize".}}
<pre>
cd /Applications/VMware Fusion.app/Contents/Library
./vmnet-cli --stop
./vmnet-cli --start
</pre>

Latest revision as of 21:53, 29 April 2018

Internal

Location of the Virtual Machine Bundle

By default location for the VM bundles is ~/Documents/Virtual Machines.

However, each VM bundle can be placed in an arbitrary location during creation, in the "Finish" screen -> Customize Settings -> Save As: -> Browse button.

Recommended location: ~/VMware Fusion VMs.

To figure out where the files of an existing VM are, go to VMware Fusion -> Window -> Virtual Machine Library -> Select the VM -> Right Click -> Show in Finder.

Networking

Configuration Files

/Library/Preferences/VMware Fusion/networking

/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

/Library/Preferences/VMware Fusion/vmnet8/nat.conf

/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf

Configure a Static IP Guest to be Externally Routable

The guests, even those configured with static IP addresses, get unroutable addresses, so if we want a guest to be able to establish connections with external servers, we need to configure it with the IP of the gateway that performs the NAT translation. This is not 172.16.153.1, but 172.16.153.2.

Configure DHCP to Serve a Static Address

https://willwarren.com/2015/04/02/set-static-ip-address-in-vmware-fusion-7

1. Get the MAC address for the VM's network interface: Virtual Machine -> Settings -> Network Adapter -> Advanced options -> MAC Address.

You may want to do that when the VM is down, so you can copy-and-paste.

2. Edit /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf.


As root

Add at the bottom of the file:

host centos-docker-server {
        hardware ethernet 00:0C:29:41:82:0F;
        fixed-address 172.16.153.10;
        option broadcast-address 172.16.153.255;
        option domain-name-servers 172.16.153.2;
        option domain-name local;
        option routers 172.16.153.2;
}

Use the actual MAC address as read from the network adapter, and the actual host name.

The address does not necessarily have to be DHCP the range declared at the top of the file. However, the other network settings (subnet, gateway, etc.) should be consistent with the DHCP section settings, to allow the new host to use the default gateway and communicate with the DHCP-addressed hosts.

3. Restart VMware Fusion networking runtime, to re-initialize the DHCP server.


Execute vmnet-cli as root, otherwise you will get "Failed to initialize".

cd /Applications/VMware Fusion.app/Contents/Library
./vmnet-cli --stop
./vmnet-cli --start