Before explaining how to start a virtual system on system start-up, I want to explain what services are, I'll continue with explaining the commands (for Linux), and then explain why you want a virtual system to start on the system start-up.
The term services, in geek speak, refers to two different, but related, things. A service could be the name of the actual application running on a computer or it could be used to refer in general to another computer or software package doing something for you (i.e, that application is functioning as a "service" for you to do something). This needs to be determined based upon context. The term server is similar. It could refer to an application that is doing something for a user (like the Apache WebServer service) or it could refer to a particular physical (or virtual) computer. (If you don't understand the concept of a virtual computer, I've provided other posts on the subject. However I'll sum it up as the computers today are so powerful and so under-utilitzed (in comparison to their capabilities) that you can “share” the hardware on a physical box with special software to mimic multiple computer systems). This is confusing to people who are not well versed in computers (i.e., users), and requires a lot of patience and open mindedness to follow through context.
When a computer starts up, it starts several services to do things on behalf of the user. For a Microsoft Windows computer, this could be something as simple as starting the network services so you can connect to another computer (like browse the Internet or get your email) and starting the anti-virus software or the firewall. However, if the service is a separate computer system, it may be to start the Email service so a group of users can read, download or send their email. Or it could be to start the Web service so uses can use their web browser to read information, browse pictures or watch a video (the content or information).
Like Apache (a Web Service) or Dovecot (software that services requests to view email by a client piece like Outlook), VMware is a service to simulate a computer or multiple other computers (see my other pages on VMware and Virtualization), and sometimes you want it to automatically start a virtual computer system when the VMware service starts on the host system. This can be accomplished by creating the following configuration:
Many people think of VMWare as a way to reduce hardware costs by sharing resources on a computer system. And there are a variety of reasons to run VMWare. But VMWare is just another “service” on the computer... in this case the service mimics a whole computer system. So when the computer starts up, you may want the vmware service to automatically recover as well, and restart a select group of virtual machines when the physical hardware starts.
In reality, it's fairly simple to configure VMWare for this functionality. In this manner, if the system should fail for some reason (or patching of the system requires a restart), any virtual systems on the virtual host would automatically restart.
You can start a VMWare system during boot-up by the following crontab entry:
Then add the necessary entry:
@reboot /usr/bin/vmware-cmd "/path/to/my.vmx" start
Another way to solve this is to configure it inside the VMWare Server (aka VMWare GSX) application
On Microsoft Windows this is a little tougher, since the user account to configure it requires a password since the Virtual System may be running under a user account. (NOTE: Review if running it under Network Service or System Service if this is true!)
Why VMWare Service?
I explained earlier that an application could be a service. As an example, that the Apache Webserver is a service since a user or users connect to it in order to receive content (pictures, text, links, etc). But you may not want to run the Apache Web Service on your computer (for whatever reason). In this case you may want to build a virtual server that runs Apache. You could do this for testing a specific application configuration or you could do it because you are writing code and have not fully tested it or there may be security issues. In this case you could restrict access to the application / content or configuration (i.e., isolate it from other users). You may want this virtual machine to be ready for you soon after your computer (or another computer) starts. These are just a few examples, and you can certainly come up with more.
I've provided some background on services and hopefully cleared up some of the terms and usage. It's all dependent on context (or significant knowledge) as to what one person is talking about, but it is about an application or computer that does something on behalf of another user (or users). I explained how, under both Microsoft Windows and Linux, how to automatically have a virtual server start when the computer starts up. And I've wrapped up with a short description of how a VMWare server can support you.