Geeks With Blogs

News Clicky Web Analytics

web stats View David Caddick (davidcaddick@gmail.com)'s profile on LinkedIn

Search this Site!

Locations of visitors to this page
View My Stats eXTReMe Tracker
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed within are my own and should not be attributed to any other Individual, Company or the one I work for. I just happen to be a classic techie who is passionate about getting things to work as they should do (and are sometimes advertised and marketed as being able to?) and when I can I drop notes here to help others falling in to the same traps that I have fallen in to. If this has helped then please pass it on - if you feel that I have commented in error or disagree then please feel free to discuss with me either publically or privately? Cheers, Dave
Thin Clients, VDI and Linux integration from the front lines.... Raw and sometimes unedited notes based on my experiences with VMware, Thin Clients, Linux etc.

OK, so I still haven't done any upgrades to the beast at home, it's still *only* running VMWare Workstation 5.5, and I haven't had any time to play about with the new Server or the older GSX Server.  But it strikes me that this little bit of code might also work under Workstation anyway?

It'll certainly make my VMWare's that I rely on a bit more reliable?  ;-))
Works for me - the poor man's ESX anyone? Thanks to Michel at ThinComputing for spotting this

Virtual Server allows you to configure virtual machines to startup automatically when the host system boots.  However in order to enable this feature you need to configure a user account to run the virtual machine under first (as when the host system boots there is no available user session to run the virtual machine under).  Below is a script that will configure a virtual machine to start automatically when the host system boots - if it was running when the host system shutdown:

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("VM Name")
objVM.RunAsDefinedAccount = True
result = objVM.SetAccountNameAndPassword("DOMAIN\Username","Password")
objVM.AutoStartAtLaunch = 2

If you want the virtual machine to always start (whether it was running before or not) you should set AutoStartAtLaunch to 1.

Cheers,
Ben

Posted on Wednesday, March 22, 2006 8:07 PM Citrix , IT Management , Real Cool Stuff , Microsoft Tips , VMware and other Virtualization tools | Back to top


Comments on this post: Scripting automatic startup for virtual machines under Virtual Server

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Dave Caddick | Powered by: GeeksWithBlogs.net