- 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.
- 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
- Create
.vm_config
config file inside~/Code/ACMEProject
:
```shell
__VM_NAME=ACMEProject # VM Name
__VM_HOST=10.211.55.2 # 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
```
-
Get VM_control script from here (https://github.com/Somebody32/somdots/blob/master/vm_control.sh) and call it from you ZSH file (bash maybe good too, but I've tested it under ZSH only)
source $HOME/.somdots/vm_control.sh
-
Inside
~/Code/ACMEProject
dovs
. This will ssh you to the VM -
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 10.211.55.2(rw,async,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
10.211.55.2
— your host IP -
Create code folder inside
~/Code/ACMEProject
, control script automatically mount~/ACMEProject
on the VM to it -
Down the VM, quit Parallels
-
Inside
~/Code/ACMEProject
try dovu
, this will up the machine, mount the code folder, and forward all ports -
SSH to it:
vs
and hack, hack, hack -
Down it via
vd
or halt entirelly —vh