Unable to detach a named disk in VMware Cloud Director
search cancel

Unable to detach a named disk in VMware Cloud Director

book

Article ID: 320440

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Cannot detach or force detach a named disk from a virtual machine(VM) in Cloud Director UI.
  • Clicking 'detach' in the UI does nothing.
  • Editing the disk with an updated description fails with a NullPointerError
  • Attached VM Count column in the Named Disks UI still shows a value of more than 0.
  • Hovering over the attached VM count shows the message:

    Bad request: Expression '' is not a comparison expression.

  • Detaching the disk as per the documentation, Attach or Detach a VMware Cloud Director Named Disk to a Virtual Machine, there is no task initiated.
  • VM associated with the disk may have been deleted without detaching the disk.
  • Browser logs doesn't show reference to any attached VMs.
  • In some instances, detaching a Named disk in Cloud Director fails with an error of the form:

"Bad request: Expression '' is not a comparison expression"

  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log may show errors of the form:

java.lang.NullPointerException
at com.vmware.ssdc.backend.services.impl.DiskManagerImpl.validateNoDiskAttachment(DiskManagerImpl.java:1156)

Environment

VMware Cloud Director 10.x

Cause

This issue can occur when the disk was not detached from the VM before deleting the VM. A stale reference to the VM will be present in the Cloud Director database preventing the detach/delete of the disk.

Alternatively, this issue can occur if the named disk is attached to a VM in Cloud Director where the VM is in an invalid state.

Resolution

For assistance, contact technical support and note this Knowledge Article ID (320440) in the problem description. For more information, see How to Submit a Support Request.