Instantly share code, notes, and snippets.

What would you like to do?
Setting up Parallels VM for dev env
  1. Create Parallels VM and install guest OS (Ubuntu 12.10 in my example). Do not shutdown the VM or quit Parallels. We'll do this later.
  2. I'm creating for an each VM it's own folder inside ~/Code. This machine will be for the "ACMEProject", so I'll place it inside ~/Code/ACMEProject
  3. Create .vm_config config file inside ~/Code/ACMEProject:
__VM_NAME=ACMEProject # VM Name
__VM_HOST= # VM IP here, Get it from parallels settings
__VM_FW_PORTS="3000 9292" # Any ports that you need to forward from host to VM. 3000 and 9292 in this example
  1. Get VM_control script from here ( and call it from you ZSH file (bash maybe good too, but I've tested it under ZSH only)

    source $HOME/.somdots/
  2. Inside ~/Code/ACMEProject do vs. This will ssh you to the VM

  3. Setup NFS Sharing from the VM to the host, do this INSIDE THE VM:

    sudo apt-get install nfs-kernel-server 

    add to the /etc/exports:

    /home/vagrant/ACMEProject,async,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000) — your host IP

  4. Create code folder inside ~/Code/ACMEProject, control script automatically mount ~/ACMEProject on the VM to it

  5. Down the VM, quit Parallels

  6. Inside ~/Code/ACMEProject try do vu, this will up the machine, mount the code folder, and forward all ports

  7. SSH to it: vs and hack, hack, hack

  8. Down it via vd or halt entirelly — vh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment