1. Make sure the virtual machine can start by invoking the below command from the terminal:
VBoxManage startvm WinXP
2. Add an automator action and copy the script
/usr/local/bin/VBoxManage startvm WinXPBig --type headless
/usr/local/bin/VBoxManage startvm WinXPBig2 --type headless
To start Vmware Fusion in headless way:
/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control 1
/usr/local/bin/VBoxManage startvm WinXPBig --type headless
/usr/local/bin/VBoxManage startvm WinXPBig2 --type headless
To start Vmware Fusion in headless way:
/Applications/VMware\ Fusion.app/Contents/Library/vmrun start /Users/peterpeng/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/ nogui
/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control 1
3 Save and test
- Go to System Preferences -> Accounts -> Login items
- Add this app
I tried the plist method but failed to start it automatically by following the below links:
Auto-starting VirtualBox VMs on OS X
https://gist.github.com/reidransom/6042016
Start a VirtualBox VM at Boot on Mac OS X
https://www.petekeen.net/start-virtualbox-vm-at-boot-os-x
4. Enable Prevent App Nap for VirtualBox. Right click on the VirtualBox application icon>Get Info>Prevent App Nap.
5. Disable the auto hibernation and set standbydelay to a bigger value (seconds)
sudo pmset standbydelay 10800000
Press Ctrl+Shit+Eject to turn off the screen
4. Enable Prevent App Nap for VirtualBox. Right click on the VirtualBox application icon>Get Info>Prevent App Nap.
5. Disable the auto hibernation and set standbydelay to a bigger value (seconds)
sudo pmset -a hibernatemode 0
sudo pmset -a autopoweroff 0sudo pmset standbydelay 10800000
Press Ctrl+Shit+Eject to turn off the screen
make sure it's shutdown at 8:01AM:
ReplyDeletesudo crontab -e
01 8 * * * /sbin/shutdown -h now