Forceful deletion of VM
search cancel

Forceful deletion of VM

book

Article ID: 429822

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

When attempting to delete a Virtual Machine (VM) that has failed Active Directory (AD) operation, the following behaviors may be observed:

- The VM remains in a "Deleting" or "Pending" state indefinitely.
- Standard manual deletion requests through the UI or API do not complete.
- Error messages indicate that the VM is waiting for AD configuration or power-on checks to finalize.

Environment

VCF Automation 9.1

Cause

This issue occurs because specific annotations are placed on the VM object during the registration process. These annotations act as "finalizers". If the AD registration service fails, these annotations prevent the VM Operator from executing the deletion command.

Resolution

To resolve the issue, you must manually remove the blocking annotations from the VM's metadata.

1. Navigate to the VM: Go to Build & Deploy > Virtual Machine and select the specific VM from the list to open its details page.
2. Access Configuration: Click the View YAML button to open the VM configuration editor.
3. Remove Blocking Annotation: Locate the metadata: annotations: section and delete the following line:
delete.check.vmoperator.vmware.com/ad: "Configuration pending for VM deletion"
4. Save and Delete: Save the changes to the YAML file. You should now be able to proceed with the standard deletion of the VM without interference from the AD registration status.

These actions allow the forceful deletion of a VM.