With the Hybrid Cloud Extension (HCX) solution, customers can migrate workloads immediately or have them scheduled at a later date and time of their choosing. Most customers will most likely not migrate all their workloads at once, but instead migrate them in different phases or waves based on their own internal schedules. The HCX "Migration" tab in the vSphere Client is a great place to get an overview of all the active, failed, planned and completed migrations and you can get additional details for each migration such status, percentage, amount of data transferred, etc.
Having said that, you probably also do not want to just sit there and constantly watch for progress, especially if something fails. The good news is that HCX already includes some default vCenter Alarms that are generated when a migration fails. There is one for vMotion/Cloud Motion, Cold Migration as well as Bulk Migration and currently these alarms only trigger a UI indication that something is wrong using the red critical icon on the VM in question.
Since these are vCenter Alarms, you also have the option of adding additional actions such as sending an email alert to a particular user or group, an SNMP trap which can then be monitored by your operations team or even run a command within the vCenter Server. Simply updating the default alarm which is defined at the vCenter Server level, you can proactively get notified when an HCX migration fails without having to constantly watch the UI. You may have also noticed the alarm definition is using a numeric ID which is highlighted in the screenshot above. This maybe useful if you wish to leave the default alarms alone and create a brand new alarm, you just need to use those IDs.
Another useful scenario to consider is getting notifications for a successful migration which can then help with transitioning users to the new VM running on VMC or even trigger automated VM and application verification before end users are even notified. Along these similar lines, you can imagine another scenario to consider is with using Bulk Migration and/or Cloud Motion with vSphere Replication. Both methods initially start off by replicating the VM's data from the source vCenter Server to the destination vCenter Server and then either a Cold Migration or vMotion is performed based on the configured scheduled.
You could augment the workflow slightly as scheduling the exact switch over window may not always be possible for customers at the time of setting up the replication and you want that to start as soon as possible, so you can witch over when you are ready. Instead, you could configure a switch over date/time that is further out in the future, which basically would not migrate the VM. You can then setup a vCenter notification to alert you when the replication has completed and then you can configure an updated date/time to actually perform the switch over.
To do so, we would need to create some additional vCenter Alarms to be able to trigger on these specific HCX events. The table below summarizes the current default HCX Events as well as additional HCX Events that can be used to create additional vCenter alarms:
EventId | Description |
---|---|
hbr.primary.DeltaCompletedEvent | Replication Completed |
hbr.primary.SyncStartedEvent | Replication Started |
50001 | vMotion or Cloud Motion of a VM failed |
50002 | vMotion or Cloud Motion of a VM was successful |
50003 | Cold Migration of a powered off VM failed |
50004 | Cold Migration of a powered off VM was successful |
53001 | Cloud Motion with vSphere Replication failed |
55001 | Bulk Migration of a VM failed |
55002 | Bulk Migration of a VM was successful |
Below is an example of creating a new vCenter Alarm to alert us when the initial replication has completed.
Step 1 - Create a new Virtual Machine alarm, provide a name and select the "specific event occurring ..."
Step 2 - Enter the EventID found in the table above and specify what the status should be. In the example here, I am simply using a "normal" UI indicator option but you can choose others.
Once the alarm has been created, when I perform either a Bulk Migration or Cloud Motion, once the initial replication has completed, you should see the alarm get triggered for the given VM as shown in the screenshot below.
In my opinion, I think being able to generate alerts or notification for particular HCX Events can be useful for a number of use cases, including some of the ones I have discussed above to even general auditing purposes. I think it would be really cool if we had all of these HCX Alarms created out of the box for customers and you can simply modify them based on their use case.
In vCenter 6.7 I can not select "specific event occurring ...". Any ideas?
Thanks! its Great content. Good luck