• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
The Citrix Blog
Blogs for tag 'pause vm'

Permalink | Twitter Post to Twitter | Comments (3) | Views (13694) |

posted by Peter Schulz

In a previous post (Shutting Down a Windows Server) I looked at how you can shutdown Windows Servers in a workflow to save power. If you have already moved your workloads to a XenServer environment this task becomes a lot easier to manage. Shutting down a XenServer host is a three-step process:

  1. Suspend or Shutdown any VMs that you have running on the host (with either Suspend-VM or Shutdown-VM)
  2. Disable the host so new VMs cannot be started (with Disable-Host)
  3. Shutdown the host (with Shutdown-Host)

To turn this process into a complete workflow we need to define the logic that determines which hosts to shutdown and what to do with the VMs running on it. For simplicity sake I have chosen to shutdown all the hosts on my server (or in my Pool if a master server is specified) and to first suspend all the VMs currently running on the host(s). Here is what the workflow looks like:



I added in the prompts so that if you download this workflow and run it you are reminded to specify your own XenServer host name, user, and password, but in reality these items would most likely be hard-coded or specified at run time dynamically. Next we are going to have to look into starting Windows Servers and XenServer hosts back up as my server room is a long walk for me.

If you want to download the workflow to try in your environment I posted it to the Script Exchange where you can also post workflows you have built. Click here to download the workflow file.

Expand Blog Post