

vmx file"Įcho "Usage: possible options are: start | stop | suspend | pause | unpause | reset | status"

To simplify that operation, just create a little script like: #!/bin/shĮcho "please set your 'vmFile' environment variable to point to your vm's. If you are going to always use the same vm (as we are doing here at Namshi in order to use Docker in the best way), specifying the vm file’s path can be annoying. Sudo ln -s "/Applications/VMware Fusion.app/Contents/Library/vmrun" /usr/bin/vmrun In order to use the vmrun command without specifying the path, just create a symbolic link: By default, Vmware puts all the vm images in the user Document folder. You also have to specify the virtual machine vmx file that you want to handle. You can get all possible options running with the vmrun -help command (or by checking the docs: ). The power-commands are all the actions you can perform on the virtual machine ( start|stop|pause|halt). The command vmrun should be located in the /Applications/VMwareFusion.app/Contents/Library directory. Also, in Headless mode, your desktop doesn’t consume extra memory.Įnough talking, SHOW ME THE CODE! vmrun power-commands nogui Sometimes leaving the window open without any interaction may cause some performance issues with the vm. We were looking for a way to run the virtual machine in headless mode, just because once you start and access it with ssh, you don’t need to bother about anything else. Everything is hidden, even the application window. So you don’t need to interact with the UI. Headless mode is a way to handle (create, start, stop) a virtual machine by just interacting from the command line. Just like Virtualbox, Vmware Fusion is able to handle a virtual machine in headless mode (with a little bit of shell fu).

From our experience, it is actually better in terms of memory performance and sharing directories (compared to virtualbox 4, we will see if the brand new vbox 5 is better). It’s true that there are alternatives like boot2docker, but there are some situations (more on that in a future post) where it is not enough.Īt Namshi instead of using Virtualbox/boot2docker, we chose to use the more reliable and stable Vmware fusion. OS X can’t natively run Docker containers, so you might want to use a virtual machine. Using OS X for development, or any other os apart from Linux, sometimes means that you have to find a workaround to make things work smoothly.
