

Make the script runnable: chmod a+x /etc/init.d/vm_server_nameĪdd the script to the standard linux service startup/shutdown runlevels. Vmrun -T player suspend "$VM" &>/dev/null If ] thenĭaemon $USER_FLAG - vmrun -T player start "$VM" nogui &>/dev/null &

# Description: Virtual Machine instance of My Server # Required-Stop: $named $remote_fs $syslog # Required-Start: $named $remote_fs $syslog It could look something like this: #! /bin/bash Get the daemon package (usually not installed by default): apt-get install daemonĭownload VMware Player and VMware VIX from and install them to get the VM engine and VIX's vmrun (command-line control of vm execution) binary.Īdd the service to the startup by creating /etc/init.d/. If that's the case, then here's how to configure it: Presumably you'll want it to run under a non-root account and start up and shut down at the standard service startup/shutdown times. If you like that better than VMWare Player, more power to you, but I know VMWare Player and I don't see a reason not to use a well-supported path to get what I want. The other VMware-oriented choice, VMware Server, is deprecated and the only other $0 choice I know of is VirtualBox. It's especially great for hosting a headless server from a headless server. Yes, it's possible to use vmware player as a service for Linux (there's a separate answer for Windows) it's easy and there's no reason I can think of not to do it. I know this is an old question, but I searched all over the internet for a solution to this and I couldn't find anything quite as comprehensive as what I'd like to share.
