Starting a vm on osx bootup.

I finally got tired of firing up vmware fusion and starting up my 3 vms that I always have running. I added a 3 start up items in /Library/LaunchDaemons/ 1 for each vm I wanted to start.

org.something.vmname.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>SOME_NICE_NAME_FOR_LAUNCHD</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/VMware Fusion/vmrun</string>
<string>-T</string>
<string>fusion</string>
<string>start</string>
<string>PATH_TO_VMXFILE_HERE</string>
<string>nogui</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>USERNAME_HERE</string>
</dict>
</plist>

This will get the vm to run in the background, with no console window, if you need to get to console there’s always vnc configurations you can add to the vmx file. This works on vmware fusion 3.x, I’m not certain if vmrun stil still exsists.
Once you open the VMWare Fusion application the gui claims the vm and will pop open a console for them and when you go to quit fusion it will want to suspend the vms.