Skip to content

Instantly share code, notes, and snippets.

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

  • Save sfrechette/8beddef4517759755dd8 to your computer and use it in GitHub Desktop.

Select an option

Save sfrechette/8beddef4517759755dd8 to your computer and use it in GitHub Desktop.
How to get the IP address used by a Parallels VM from the host?
//How to get the IP address used by a Parallels VM from the host?
prlctl exec "VM Name goes here" ipconfig | grep "IPv4" | grep -o '\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}'
prlctl exec "VM Name goes here" ifconfig eth1 | grep "inet " | grep -o 'addr:\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}' | grep -o '\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment