63458: Acronis Backup: "Failed to execute the command. Deleting machine running from backup" error

use Google Translate

Symptoms

Every hour you receive this error, but the virtual machine mentioned in the error is not running from backup or not available anymore.

The virtual machine with ID "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" is not found.
------------------------
Error code: 22
Module: 309
LineInfo: 0x8D165E86FB81959B
Fields: {"$module":"run_vm_from_image_glxa64_12960","CommandID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}
Message: TOL: Failed to execute the command. Deleting machine running from backup
------------------------
Error code: 8
Module: 405
LineInfo: 0x819984CC28268FDC
Fields: {"$module":"run_vm_from_image_glxa64_12960"}
Message: Failed to unpublish virtual machine 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
------------------------
Error code: 40
Module: 405
LineInfo: 0x7F192B1D80695076
Fields: {"$module":"run_vm_from_image_glxa64_12960"}
Message: Failed to find a virtual machine with ID 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' in the data management layer (DML).
------------------------
Error code: 27
Module: 252
LineInfo: 0xDE1E6947B7A08AC2
Fields: {"$module":"run_vm_from_image_glxa64_12960","TraceLevel":"1"}
Message: DML: An object with ID ' Root (Common::Guid) = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[PrimaryKey (NIL)]
' cannot be found.

Cause

The mounted virtual machine was manually removed from vSphere without using Acronis Backup interface, which caused invalid records to be left in the management server database.

Solution

1. Note the machine's GUID displayed in the error message.

2. Create a script with this content and place this GUID to the place marked in red:

import acrort
import logging
import os

def _create_pattern(typename, path, plan_id):
    pattern = [
        ('^Is', 'string', typename),
        (path, 'guid', plan_id)
    ]
    return pattern

def delete_by_id(mms, class_name, path, plan_id):
    mms.dml.delete(pattern=acrort.plain.Unit(flat=_create_pattern(class_name, path, plan_id)))

mms = acrort.connectivity.Connection('mms', client_session_data={'identity_disabled':True})

object_id = 'machine's GUID'

delete_by_id(mms, 'Resources::Resource', '.ID', object_id)
delete_by_id(mms, 'RunVmFromImage::VMResurrection', '.ID', object_id)

3. Save this script to a file named delete_resource_resource.py

4. Using WinSCP, connect to Acronis Virtual Appliance:

5. Copy delete_resource_resource.py to the Appliance.

6. In the Appliance console, execute:
acropsh delete_resource_resource.py