Get started Bring yourself up to speed with our introductory content.

Automating all virtual machines to boot on start up

Virtual machine automation is complicated, especially on Microsoft Virtual Server. Site expert Anil Desai adresses this issue in this expert response.

How do I automatically start all virtual machines running on a Virtual Server at boot/service restart?

I find that there are three options:

  1. Turn on the startup-setting on each of the virtual machines. Problem: Not flexible enough since I have a large amount of virtual machines.

  2. Define a VBScript that runs when the Virtual Server service is started. Problem: The user "NETWORK SERVICE" under which the Virtual Server service runs does not have the sufficient rights (the script reports it's started on the management page, but nothing happens. I know the script works because I can run it in my administrator command prompt without any problems).

  3. Define a Windows Task that is scheduled to start at system startup and runs the script as a given user. Problem: Seems like the scheduled task is started prior to the Virtual Server service and hence the virtual machines do not start (the task successfully starts the machines when I run it manually).

Do you have any tips on this one?

It certainly sounds like you've done your homework in looking at ways to automatically start virtual machines on Microsoft Virtual Server. The first option you mentioned -- assigning a security context for the virtual machine and setting it to startup automatically -- is the simplest to configure. You mentioned that it is difficult to manage, but you could manage these settings programmatically through the use of VBScript and the COM API to make it more manageable.

Regarding option two, as you mentioned, startup scripts will run under the security context of the Virtual Server service. If you want to use this method, you can assign a domain account (and appropriate permissions) to the Virtual Server service. The benefit is that you don't have to worry about the order of execution (as in option three).

And, regarding option three, you could set up dependencies or use more complex code to monitor for the start of the Virtual Server. For example, you could create your own service that specifies the Virtual Server service as a dependency. (Note: I've never done this, so I can't guarantee it will work). Regardless, I think this approach is needlessly complex.

Overall, my advice would be to build a small but simple management application that uses the Virtual Server COM API to set VM startup settings.

If that's not a good solution, feel free to follow-up with some additional details on why options one and two will not work, and I'll try to help you out. Good luck!

Dig Deeper on Virtual machine monitoring, troubleshooting and alerting

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.