Skip to content

Commit

Permalink
Added routing info and debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
esimonetti committed Nov 14, 2017
1 parent 8fceb96 commit 6d4fe5b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ The virtual machine contains docker, docker-compose and a NFS server to locally
* Installation of [VirtualBox](https://www.virtualbox.org/wiki/Downloads)

## Installation and configuration
1. Add entry on /etc/hosts - need to use sudo to edit the file: `10.10.10.10 docker.local`
2. Access VirtualBox's network configuration for the Host-only Networks adapter vboxnet0 by accessing the menu VirtualBox -> Preferences -> Network -> Host-only Networks
1. Make sure no other VirtualBox networks adapter are on the subnet 10.10.10.x or you do not run any internal network on that subnet (the routing table be checked with `netstat -rn` and the routing for the subnet 10.10.10.x if exists can be found with `netstat -rn | grep 10.10.10`)
2. Add entry on /etc/hosts - need to use sudo to edit the file: `10.10.10.10 docker.local`
3. Access VirtualBox's network configuration for the Host-only Networks adapter `vboxnet0` by accessing the menu VirtualBox -> Preferences -> Network -> Host-only Networks
1. On Adapter tab:
1. IPv4 Address: 10.10.10.1
2. IPv4 Network Mask: 255.255.255.0
2. On DHPC Server tab:
1. Uncheck "Enable Server"
3. Download the [latest release](https://github.com/esimonetti/DebianDockerMac/releases/latest) of this git repository
4. Import the downloaded VirtualBox appliance by accessing the menu File -> Import Appliance and follow the prompts
5. Access the network configuration of the VirtualBox imported appliance by right clicking on the virtual machine -> Settings -> Network
4. Download the [latest release](https://github.com/esimonetti/DebianDockerMac/releases/latest) of this git repository
5. Import the downloaded VirtualBox appliance by accessing the menu File -> Import Appliance and follow the prompts
6. Access the network configuration of the VirtualBox imported appliance by right clicking on the virtual machine -> Settings -> Network
1. On the Adapter 1 tab:
1. Make sure the Host-only Adapter Name is `vboxnet0` (or the same that has been setup with the settings on step 2)
1. Make sure the Host-only Adapter Name is `vboxnet0` (or the matching adapter setup on step 3)
2. Click OK

To boot the virtual machine double click on the virtual machine and wait few seconds for it to complete.
Expand All @@ -42,3 +43,13 @@ To mount and access the virtual machine folder `/home/docker` from your Mac comp
2. Access the menu Go -> Connect to Server
3. On Server Address enter: `nfs://docker.local:/home/docker`
4. Click Connect

## Network issues
If it is not possible to ssh or connect via NFS to the virtual machine, check the routing by running `netstat -rn | grep 10.10.10`.
The expected output should be similar to:
```
10.10.10/24 link#15 UC 3 0 vboxnet
10.10.10.10 8:0:27:7e:51:3c UHLWI 0 71 vboxnet 1041
10.10.10.255 ff:ff:ff:ff:ff:ff UHLWbI 0 18 vboxnet
```
If the routing table does not look similar to the above, re-check the Host-only Networks adapter settings, and that the virtual machine correct adapter is selected. It might also be the case that VirtualBox requires an OS reboot before applying the routing correctly.

0 comments on commit 6d4fe5b

Please sign in to comment.