As promised during our VeeamON session, here is the description of every trick that was demoed (including the PowerShell script examples for every scenario). Please note that you have to be using Veeam Availability Suite v8 to make it work.
And kudos to Vladimir for creating these PowerShell scripts! Without his deep knowledge of PowerShell and scripting this would not be possible.
VM with no backup
1. Create VM backup alarm in Veeam ONE via Alarms Management tab
2. Define the required RPO and assign the alarm
3. In the post alarm actions specify a batch file to trigger a backup PowerShell script
4. When alarm is triggered the corresponding PowerShell script will create a quick backup of the VM
If you don't have VMs added to the backup jobs, then you can write a PowerShell script that will create a job for the VM and then run it.
Terminate job after X hours
1. Create backup alarm and select jobs you want to monitor
2. Define jobs maximum duration
3. In the post alarm actions specify a batch file to trigger a backup PowerShell script
4. The PowerShell script can be configured to do one of the following actions:
• Stop the required backup job
• Run a script to check for orphaned VM snapshots and then try to consolidate them
Delete orphaned VM snapshots
1. Use one of the predefined VM snapshot alarms (snapshot size or snapshot age)
2. In the post alarm actions specify a batch file to trigger a backup PowerCLI script which will try to consolidate all VM snapshots
You can even specify the name of the snapshots you want to consolidate in the PowerCLI script.
Automated VM failover
1. Detect failed VMs/hosts/datastores via one of the predefined alarms in Veeam ONE (for example, VM power state, VM Tools state etc.)
2. In the post alarm actions specify a batch file to trigger a backup PowerShell script
3. To make sure it is not a network glitch run additional verifications within the PowerCLI/PowerShell script
4. Once all verifications are performed create a failover plan in Veeam backup console and then run it
4a. As an alternative you can create a PowerShell script to initiate VM failover operation without using failover plans.
4b. Additionally, you can start VM replicas manually via PowerCLI script
VM tags in Veeam ONE and Veeam B&R
1. Navigate to Veeam ONE Business View and create the required categories/groups for automatic categorization rules
2. Create categorization rule or dynamic group via Business View. See online help center web page for more info > Configuring Categorization Rules
3. Configure Veeam ONE to write VM Tags to the vCenter Server > Configuring Options
4. Verify Veeam ONE Reporter collection job schedule (this job is responsible for writing VM tags) > Scheduling Data Collection
5. Open Veeam backup console and start using VM tags as a source for your backup and replication jobs!
Receive alarms via text message
1. Navigate to any alarm you want to configure this action for
2. Set "send email notifications" as post alarm action
3. Specify your cell phone number in the format described below. 10-digit number should be your cell phone number.
Code: Select all
Alltel[10-digit phone number]@message.alltel.com
Example: 1234567890@message.alltel.com
AT&T (formerly Cingular)[10-digit phone number]@txt.att.net
[10-digit phone number]@mms.att.net (MMS)
[10-digit phone number]@cingularme.com
Example: 1234567890@txt.att.net
Boost Mobile[10-digit phone number]@myboostmobile.com
Example: 1234567890@myboostmobile.com
Nextel (now Sprint Nextel)[10-digit telephone number]@messaging.nextel.com
Example: 1234567890@messaging.nextel.com
Sprint PCS (now Sprint Nextel)[10-digit phone number]@messaging.sprintpcs.com
[10-digit phone number]@pm.sprint.com (MMS)
Example: 1234567890@messaging.sprintpcs.com
T-Mobile[10-digit phone number]@tmomail.net
Example: 1234567890@tmomail.net
US Cellular[10-digit phone number]email.uscc.net (SMS)
[10-digit phone number]@mms.uscc.net (MMS)
Example: 1234567890@email.uscc.net
Verizon[10-digit phone number]@vtext.com
[10-digit phone number]@vzwpix.com (MMS)
Example: 1234567890@vtext.com
Virgin Mobile USA[10-digit phone number]@vmobl.com
Example: 1234567890@vmobl.com
1. Set a batch script as an action item for the alarm
2. Use “psexec” to execute another *.bat file to play an audio file on any server
Disclaimer: Use these these script examples in your test environment first, and make sure you adapt them to your needs before using them in the production environment.
Using Microsoft Teams for our Veeam ONE notifications
Please follow guidelines from this blog post created by our famous guy @jorgedlcruz
Thank you!