Retirement -> Migrate


I’m trying to retire service (+vm) and on retireservicevm -method I try to call Migrate StateMachine.
Point is, that when retiring service, I do not want to delete it but migrate it to a different datastore/resourcepool/folder and so on.

By default retireservicevm has instantiate -call on method. Is it possible to use default Migrate -statemachine with that ?

on that method, I’ll try to call it using:


But it ends up doing nothing:

[----] I, [2015-04-27T11:32:14.439547 #19750:4e51ab0] INFO – : Updated namespace [/Infrastructure/VM/Lifecycle/Migrate Customer/Infrastructure/VM]
[----] I, [2015-04-27T11:32:14.514491 #19750:4e51ab0] INFO – : Following Relationship [miqaedb:/Infrastructure/VM/Migrate/StateMachines/VMMigrate/default#create]
[----] I, [2015-04-27T11:32:14.649261 #19750:4e51ab0] INFO – : Updated namespace [miqaedb:/Infrastructure/VM/Migrate/StateMachines/VMMigrate/default#create Customer/Infrastructure/VM/Migrate/StateMachines]
[----] I, [2015-04-27T11:32:14.768736 #19750:4e51ab0] INFO – : Followed Relationship [miqaedb:/Infrastructure/VM/Migrate/StateMachines/VMMigrate/default#create]
[----] I, [2015-04-27T11:32:14.778710 #19750:11f1084] INFO – : <AEMethod [Customer/Service/Retirement/StateMachines/Methods/retireservicevms]> Ending

Any ideas what would be “best” way to achieve this ?

Hi Tonimaatta,

The instantiate wont work properly because it’s a statemachine call within a statemachine. The retireservicevms method shouldn’t have the instantiate call there.

An upcoming release will have our enhanced Service and VM retirement statemachine processing, making it much easier to use and configure.

Since service retirement calls into the /Infrastructure/VM/Lifecycle class, you should be able to change the /Infrastructure/VM/Lifecycle/Retirement instance relationship4 value from:
to the values specified in the /Infrastructure/VM/Lifecycle/Migrate instance.

If you had specific criteria for deciding to use migration vs. retirement, you could even add an automate method there to gate which statemachine to resolve.

I hope this helps.


Thanks for information. Actually I made it so that I use control policy to kick automate job to do the migration and use vsphere api for migration. That’ll do the trick at this point.