Skip to content

Instantly share code, notes, and snippets.

@hedleysmith
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save hedleysmith/8835063418a99201659e to your computer and use it in GitHub Desktop.

Select an option

Save hedleysmith/8835063418a99201659e to your computer and use it in GitHub Desktop.
Accessing a vagrant vm from another guest (guest to guest vm access)
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