Housekeeping script to check consistency between Morpheus, Azure and DNS

Hi Team,
Can you help me please. I’m looking for any kind of automation to run once in a week to check for consistency between the Morpheus, Azure and DNS for example.
I found that we are having a lot of unsuccessful teardowns/decommissions of servers, which causes following scenarios.

  1. VM running in Azure, but not existing in Morpheus.
  2. NSGs existing in Azure, but no VM
  3. DNS record exists, but the VM is decommissioned.
  4. Maybe some more scenarios that I did not find yet.
    The idea is to run a “housekeeping” script whish will check for consistency of the VM - Morpheus, Azure, DNS, NoCoDB.
    Can you please give me some hint, ideas.
    Million thanks in advance,

It sounds like you are using force delete which should only be used in a last ditch effort. It can cause teardown steps to not be performed and is assuming the system is stuck in a bad state.

Hi cbunge, unfortunately we are not using “force delete”. Do you have any other suggestions for the case ?

I am dealing with this same issue, except that it’s vCenter, and we have some VNF vendor provisioning systems that shoot VMs straight into vCenter. They don’t want customers provisioning or deprovisioning these VMs, they only want them to be able to log in, see the VMs, use console, possibly restart them on occasion. I am trying to deal with this via the API. I am using the pyMorpheus API wrapper.