Last active
August 29, 2015 14:17
-
-
Save hedleysmith/8835063418a99201659e to your computer and use it in GitHub Desktop.
Accessing a vagrant vm from another guest (guest to guest vm access)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Configure your Vagrant box to use a private network and assign an IP: | |
| config.vm.network 'private_network', ip: 192.168.56.101 | |
| 2. Open the guest VM and add an entry to the hosts file (/system32/drivers/etc/hosts on Windows) | |
| 192.168.156.101 mysite.local | |
| 3. You may need to add a hosts-only network adapter to the second guest VM (this can be done in the VirtualBox config for that VM) | |
| This can be very useful for testing a website served by a vagrant box on a Windows VM with Internet Explorer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment