Skip to content

Instantly share code, notes, and snippets.

@micjamking
Last active August 29, 2015 14:06
Show Gist options
  • Save micjamking/18e4e3ad40fa919c7659 to your computer and use it in GitHub Desktop.
Save micjamking/18e4e3ad40fa919c7659 to your computer and use it in GitHub Desktop.
[Command Line] Access Yeoman app in & from Parallels Windows 8 VM

Parallels Desktop 9 for Mac

  • Configure > Hardware > Network 1 > Type: Default Adapter
  • Preferences > Advanced > Network: Change Settings > select Shared and click 'Okay'

Grunt Server

  • In your app's Gruntfile.js, set connect server's hostname in the options to 0.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
			}
		}
});

Configure host file with IP address

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment