Aug 20, 2011
tom

How to schedule VMs to startup and shutdown

Question

I’m running several VMs (Mainly windows XP) on a 2008 server under Hyper-V.
I’d like to automatically schedule some of these machines to startup and shutdown according to a schedule. To limit availability to the times when people are supposed to be in the office to log into them.
How can this be achieved??

Answer

So basically it is pretty easy with PowerShell

  1. Install PS
  2. Get the library written for managing VMs http://www.codeplex.com/PSHyperv
  3. Write your PS script which looks like something like this:

    . c:whateverhyperv.ps1

    Stop-VM XXX

    Start-VM XXX

  4. Schedule it http://ss64.com/nt/schtasks.html

HTH

Related posts:

  1. Schedule Windows Server 2008 R2 to boot and shutdown
  2. Under which account are startup and shutdown scripts executed on Windows 7 & XP?
  3. Hyper-V spontaneously pauses all VMs
  4. Manipulate Multiple VMs at the same time
  5. Schedule Task run Without Being Logged in

Leave a comment