ESXi

 View Only
  • 1.  shutdown test VMs when datacenter failure

    Posted Dec 02, 2015 06:26 PM

    hello,

    let`s say we have 6 esx hosts in one cluster with ha+drs.

    3 hosts are in datacenter1 and 3 hosts in datacenter2.

    production VMs fit on 3 hosts, so there is enough capacity for a datacenter failover.

    now we`d like to use the remaining free capacity for testing VMs and when there is a datacenter failure (i.e. 3 hosts are down), i`d like to have the testing VMs automatically shutdown and make room for the production VMs which being restarted by HA on the surviving site.


    So my question is: how can this be done ?

    I assume this is not possible with "builtin" functionality, so maybe somebody made an intelligent script which can detect number of active hosts or datacenter failure and trigger shutdown of the testing VMs !?

    regards

    roland



  • 2.  RE: shutdown test VMs when datacenter failure

    Posted Dec 02, 2015 08:46 PM

    Site Recovery Manager is the solution that will orchestrate the failover between sites, including shutdown the test virtual machines to make room for the production virtual machines. Take a look: VMware Site Recovery Manager: IT Disaster Recovery Software | United States



  • 3.  RE: shutdown test VMs when datacenter failure

    Posted Dec 02, 2015 09:26 PM

    mhh, isn`t that a very expensive product (thousands of dollars for packs of 25VM`s) ?

    i suspect that is a little bit over the top, as we coud make no other use of it (besides shutting down test), as our two sites are active/active (SVC storage).



  • 4.  RE: shutdown test VMs when datacenter failure
    Best Answer

    Posted Dec 02, 2015 10:18 PM

    Are you able to put all of the Test VMs in a folder, e.g. TestVMs?

    Then you could use the following PowerCLI command to stop all of the VMs in the TestVMs folder.

    Get-VM -Location TestVMs | Stop-VM

    If your folder structure does not allow for this, are all of the Test VMs in there own datastore(s) with none of the Production VMs, you could use


    Get-VM -Datastore TestVMDataStore | Stop-VM

    Tricky bit will be automating the triggering of the command to run. Do you have any server monitoring tools?



  • 5.  RE: shutdown test VMs when datacenter failure

    Posted Dec 02, 2015 10:29 PM

    we have all of them in a ressource pool and on two datastores.

    looks promising.

    we use nagios for monitoring