• 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
Personal Blog
Peter Schulz
Related Tags
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.

Labels

xenserver xenserver Delete
workflow-studio workflow-studio Delete
workflow studio workflow_studio Delete
pause vm pause_vm Delete
shutdown host shutdown_host Delete
green data center green_data_center Delete
nonspecific nonspecific Delete
lang-eng lang-eng Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 11, 2008

    Daniel Feller says:

    Pete These Workflow Studio items are great.  Definately going to be a huge...

    Pete

    These Workflow Studio items are great.  Definately going to be a huge help for our Worldwide Consulting Solutions team to build Dynamic Deliery Center.

    Dan

    1. Jul 11, 2008

      Peter Schulz says:

      Thanks Dan. I've been following your thread and will try to post relevant workfl...

      Thanks Dan. I've been following your thread and will try to post relevant workflow samples for what you are trying to do.

      Pete

  2. Mar 21, 2009

    Anonymous says:

    Pete, The Workflow file for "Shutting Down a XenServer Host" is lost now, I'm u...

    Pete,

    The Workflow file for "Shutting Down a XenServer Host" is lost now, I'm unable to download it- Clicking on the download link 404 - Page cannot be displayed error.

    Please let me know whether it is moved to different location, from where I can download?

    -Thanks,

    Karthik.  

    1. Anonymous replies:

      You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account. You can also Sign Up for a new account.

Add Comment