- Configure > Hardware > Network 1 > Type: Default Adapter
- Preferences > Advanced > Network: Change Settings > select Shared and click 'Okay'
- In your app's
Gruntfile.js
, set connect server's hostname in the options to0.0.0.0
to allow access to the server from outside
grunt.initConfig({
// The actual grunt server settings
connect: {
options: {
port: 80,
// Change this to '0.0.0.0' to access the server from outside.
hostname: '0.0.0.0',
livereload: 35729
}
}
});
Get IP of host (Mac OSX)
$ ifconfig | grep "inet " | grep -v 127.0.0.1
inet 10.0.1.29 netmask 0xffffff00 broadcast 10.0.1.255
Get IP of guest (Windows VM)
$ prlctl exec {f229c6da-0a61-4c3a-8672-4e5859e302cc} ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : hawaii.rr.com
IPv6 Address. . . . . . . . . . . : 2605:e000:1122:805a:5009:f039:ef40:f620
Temporary IPv6 Address. . . . . . : 2605:e000:1122:805a:a5cd:713a:88a3:d55e
Link-local IPv6 Address . . . . . : fe80::5009:f039:ef40:f620%3
IPv4 Address. . . . . . . . . . . : 10.0.1.31
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::8a1f:a1ff:fe3e:19d1%3
10.0.1.1
Tunnel adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter isatap.{7F901855-C7C7-4D12-8819-41C2E00BF78E}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : hawaii.rr.com
Add IP to host file
- File location on Mac OSX:
/etc/hosts
- File location on Windows:
C:\Windows\System32\drivers\etc\hosts
# VM
10.0.1.31 windows.local