Hi!
Nice idea to use this technique to force an alarm in vCenter!
I was able to reproduce your code, the alarm is beiing created, but not triggered.
Does it work if you create the alarm manually using the vSphere Client? (If so, Onyx might help to figure out the proper AlarmSpec settings)
I guess there is something wrong/missing in the alarmSpec, maybe the Strings that identify the Managed Object Type, and the Event Type.
Cheers,
Joerg