VMware Cloud Community
jparisi11
Contributor
Contributor

APC vCenter Shutdown for the Poor man

Hello,

I recently needed an inexpensive solution to provide Backup Power and safe shutdown for a Virtual Center in a Cluster.

I am on a low budget.

Here is what I did. Keep in mind that I know of the vMA that can be used but this requires Backup UPS that have network ability.

Brief discription of the equipment

2 Shuttle PCs

1 Cisco 24 Port Switch

1 Buffalo NAS

1 Iomega SAN (ISCSI)

1 AnywhareUSB Device

2 Monitors (that usually are powered off)

Solution

2 APC Bakups $174.99 each at Best Buy Compared to 2 SMT1500 Smart-UPS 568.99 Ea, 2 Remote Management Adapters 309.99 Ea CDW Pricing total of $1757.96 (My PCs cost less than that)

1 DIGI AnywhereUSB 2 $259.99 CDW Price. There are less expensive devices out there but the DIGI's always seem to work.

My Total $609.97 (that's an $1147.99 Savings)

1. Setup all your equipment spred equally between the to APC 1500s

2. Plug the USB cables into the DIGI AnywhereUSB 2 (be sure to plug the DIGI into the UPS as well)

3. On your Cluster spin up a Windows 2008 Server (This Server will be the Backup montoring Server)

4. Load the DIGI AnywhereUSB Software on the montitoring Server and give it an IP Address (there is a 64bit version on DIGI's Page)

5. Load the Powerchute Software on the Monitoring Server (This must be done after the DIGI software or the Powerchute Software will not see the APC and through an error

6.Create a Powershell Script like the one below.

Set-ExecutionPolicy Unrestricted
$vCenterServername = "Your vCenter Server goes here"
Connect-VIServer -Server Your vCenter Server goes here.domain.com

Get-VM | `
  Where-Object {$_.PowerState -eq "PoweredOn"} | `
  Shutdown-VMGuest -Confirm:$false
Start-Sleep -Seconds 60
Get-VM | `
  Where-Object {$_.PowerState -eq "PoweredOn"} | `
  Stop-VM -Confirm:$false
Start-Sleep -Seconds 60
$VMHosts = Get-VMHost
$VMHosts | `
  Set-VMHost -State Maintenance -Confirm:$false
$VMHosts | `
  Stop-VMHost -Confirm:$false

This will do a graceful shutdonw of your Guests and you Hosts

7. Disconnect the APC from Power this Application error will generate. Warning 1/15/2013 8:25:27 AM APC UPS Service 174 None

8. Right Click the error and Attach Task To This Event

The next time your Power goes out your Equipment will shutdown safely.

You my consider disabling this if you are in your office as a small blip will trigger the script

This is good if you are going to be away and can not be there and you want your equipment to come down safely

I leave this on all the time I would rather have everything shutdown gracefully and have to bring it back up rather than spend 5 to 10 hours fixing Servers and Databases

Good luck, so say we all

VCP4 VCP5

0 Kudos
0 Replies