Unable to delete DirectPath Profile after removal of VM class
search cancel

Unable to delete DirectPath Profile after removal of VM class

book

Article ID: 448837

calendar_today

Updated On:

Products

VCF Private AI Services VMware vCenter Server 8.0 VMware vCenter Server

Issue/Introduction

When attempting to delete a DirectPath Profile (DPP) in a vSphere environment after an associated VM class has been removed, the operation fails with a "Resource In Use" error.

Error messages observed

  • vim.fault.ResourceInUse: not allowed because it is being used by a VM resource profile
  • com.vmware.dpp.delete.dppInUseByVmRp

Environment

VCF 9.x
vSphere 8.x

Cause

This issue occurs because a stale VM Resource Profile (VRP) remains in the vCenter Server inventory. Even if the VM class was successfully deleted, the underlying VRP may persist and maintain a metadata reference to the DirectPathProfile, preventing its removal.

The following error can be found in /var/log/vmware/vpxd.log:
error vpxd[3525636] [Originator@6876 sub=Default opID=mpm#####] [VpxLRO] -- ERROR lro-41207462 -- DirectPathProfileMgr -- vim.DirectPathProfileManager.deleteDirectPathProfile: :vim.fault.ResourceInUse
--> Result:
--> (vim.fault.ResourceInUse) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = (vmodl.LocalizableMessage) [
--> (vmodl.LocalizableMessage) {
--> key = "com.vmware.dpp.delete.dppInUseByVmRp",
--> arg = <unset>,
--> message = <unset>
--> }
--> ],
--> type = <unset>,
--> name = <unset>
--> msg = ""
--> }
--> Args:
-->
--> Arg id:

Resolution

To resolve this issue, the stale VM Resource Profile must be manually identified and deleted using the dcli (Data Center CLI) on the vCenter Server Appliance.

  1. Log in to the (VCSA) via SSH
  2. List all existing VM Resource Profiles to identify the one referencing the DirectPath Profile:
    dcli +show-unreleased com vmware vcenter vmresourceprofiles list
  3. Identify the specific profile name that corresponds to the DirectPath Profile you are trying to delete.
  4. Delete the stale VM Resource Profile:
    dcli +show-unreleased com vmware vcenter vmresourceprofiles delete --vm-resource-profile <profile-name>
    Note: Replace <profile-name> with the actual name identified in step 2
  5. DirectPath Profile can then be removed from vCenter > Monitor tab > DirectPath Profiles Utilization