How to set up delayed autostart of virtual machines when the owner hyper-V-server fails

Proposed Answer How to set up delayed autostart of virtual machines when the owner hyper-V-server fails

  • Wednesday, October 20, 2010 11:36 AM
     
     

    Hi,

     

    we have 4 nodes in our Hyper-V Win2k8 R2-cluster. We're using VLAN trunks to distribute different network into each VM. The storage for virtual machines (c:\ClusterStorage) is hooked up using iSCSI.

    Critical VMs are configured to autostart if one of the HyperV-nodes fails. Anyway, there are certain services (servers) that has to boot up prior to other servers, f.ex SQL-server, in order to make some services work seamlessly. I'm able to find settings for delayed autostart on each Hyper-V-node when the node performs a cold start. Unfortunately there does not seem to be any settings (in GUI) for configuring delayed autostart when one hyper-v-node fails and the VM changes owner.

    Is there any way to solve this?

    Thanks in advance.

All Replies

  • Thursday, October 21, 2010 2:45 AM
     
     

    Hi

    Please take a look in this article http://blogs.msdn.com/b/clustering/archive/2009/08/11/9864574.aspx

    These features were added to W2008R2

    ·         Auto Start

    o   Determines if a group will start automatically when starting a cluster or recovering after a failure

    o   Failover Cluster Manager: Auto start

    o   PowerShell & Cluster API: Priority

     

    ·         Persistent Mode

    o   When enabled, this remembers the last node the administrator onlined a group on, or moved a group to.  The group will be hosted on this “default” node on next cluster cold start.

    o   Failover Cluster Manager: Enable Persistent Mode

    o   PowerShell & Cluster API: DefaultOwner

     

    ·         Group Wait Delay

    o   Specifies the amount of time groups will wait for their default or preferred owner node to come up during cluster cold start, before the groups are moved to another node.

    o   PowerShell & Cluster API: ClusterGroupWaitDelay

     


    If this post is helpful, please mark it as such
    ________________________________________
    Alessandro Cardoso
    MVP | Microsoft Heroes | MCT
    blog: http://virtualisationandmanagement.wordpress.com
    http://virtualizacaoegerenciamento.wordpress.com
  • Thursday, October 21, 2010 1:41 PM
     
     
    Thanks for the tip on "Resource Group Management Enhancements in 2008 R2 Failover Clustering - Part 2". Have now tried to set up something similar in our environment, but I'm a bit unsure if I have understood it correctly. First I created groups via the "Add-cluster group", then I have moved the al machines into groups via the "Move the cluster resource".

    I defined ClusterGroupWaitDelay to 300. Everything is apparently fine, except that the virtual machines are now locked to the group and the host that owns the group. They can therefore not be moved to another server with "live migration". To move the Virtual Machine I have to move the entire group, who then have to take all the virtual machines offline first.

    Is this a limitation of the groups, or is it a configuration error?

  • Wednesday, December 22, 2010 11:25 PM
     
     

    HI

    This is a limitation.

     


    If this post is helpful, please mark it as such
    ________________________________________
    Alessandro Cardoso
    MVP | Microsoft Heroes | MCT
    blog: http://virtualisationandmanagement.wordpress.com
    http://virtualizacaoegerenciamento.wordpress.com
  • Friday, December 28, 2012 9:40 PM
     
     

    I've been researching this for my own purposes, and the best answer I've found is:

    Hyper-V startup options are overridden by the Failover Cluster settings Alessandro mentions.

    I think your best bet would be to disable Autostart on the guests you need to delay, then set up a scheduled script to start up those guests if the guests they depend on are online.  

    You could periodically run a script that checks the status of the app server which depends on SQL.  If the app server is up, it exits.  If the app server is offline, it checks the status of the SQL server.  If SQL is down, it exits.  If SQL is up, but the app server is offline, it issues a command to start the guest.

  • Saturday, December 29, 2012 5:35 PM
     
     Proposed Answer
    In addition, if you have access to System Center Orchestrator, you could create something to do exactly what you wanted quite easiliy.
  • Sunday, December 30, 2012 10:49 PM
     
     

    You can also configure individual virtual machines to restart in reboot and delay restart on reboot


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews