Behavior of DRS Affinity Rules and VM Overrides during Virtual Machine Deletion
search cancel

Behavior of DRS Affinity Rules and VM Overrides during Virtual Machine Deletion

book

Article ID: 436954

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This KB explains how cluster settings (DRS affinity rules, VM overrides) associated with a virtual machine are handled when the virtual machine is deleted from disk in a vSphere environment.

Environment

VMware vCenter Server

Cause

vCenter Server identifies virtual machines by a unique internal Management Object Reference ID (MoRef ID) rather than their display name. When a VM is deleted, all database records (VCDB) associated with that specific MoRef ID are purged, leading to the automatic removal of the VM from related cluster configurations.

Resolution

When a virtual machine is deleted from disk, the following actions occur automatically:

  • DRS Affinity Rules (VM/Host Rules):

    • The deleted virtual machine is automatically removed from the rule's membership (e.g., VM Groups).

    • The rule itself remains in the inventory. However, if the rule no longer contains the required minimum number of members, it becomes functionally inactive.

  • VM Overrides:

    • Any individual override settings configured for the specific VM are permanently removed from the vCenter database simultaneously with the VM's deletion.

  • VM Recreation Considerations:

    • If a new virtual machine is created with the same name, it will not be automatically added back to previous DRS groups or rules.

    • The new VM is assigned a new MoRef ID and is treated as a completely different object by vCenter. You must manually re-add the new VM to any necessary groups or rules.

Additional Information

vm was not listed on [VM Group] for affinity rule after removing and creating a vm in a same name

Customize an Individual Virtual Machine

仮想マシンの削除時における DRS アフィニティ ルールと VM オーバーライドの挙動について