VMware Cloud Community
austinb324
Enthusiast
Enthusiast

Custom VM Migration Workflow

I am working on creating my first production workflow for my company. The goal for the workflow is to be able to migrate VM(s) from one cluster to another. Sounds easy right? Well we have a decent sized environment with a diverse set of hardware. So, to migrate from an Intel host to an AMD host (or vice versa) I have to power down the VM. Also, if the processor features are different due to being different generations, the VM will have to be powered down to migrate. Currently, it is up to the user to make the decision to power down the VM. I want to automate this. So, I have been looking into the following scripting objects:

host.hardware.cpuPkg

host.hardware.cpuFeature

host.hardware.cpuInfo

host.hardware.systemInfo

So far the only thing in the API that has made any sense to me was "host.hardware.systemInfo.model -> ProLiant BL465c G7". While I could "in theory" use the host model name to choose whether or not the hardware is different and shutdown the VM. This does not seem like a good method. Mainly because we are constantly retiring old hosts and adding new ones to our environment. This would mean that any time we buy a new version of blades, someone would have to come back and update this workflow for it to continue functioning.

My goal is to find an object with a list of CPU features on the source host then compare them to the destination host. If equal, then live migrate the Vm. If not then shut it down and migrate the VM.

Im sure this is possible, but I have yet to find what im looking for in the API. Any and all advice is appreciated! Im also happy to share my workflow if anyone is interested.

0 Kudos
0 Replies