The recommended solution is to force the disconnection of the virtual CD/DVD drive by logging directly into the ESXi host where the VM is running. This bypasses potential communication issues with vCenter and allows for a direct override of the device lock.
In the vCenter client, identify the specific VM that is preventing the datastore from being unmounted.
Select the VM and on its Summary tab, identify the ESXi host it is currently running on.
Open a web browser and log in directly to the web interface of that ESXi host.
Navigate to the Virtual Machines section and select the problematic VM.
Click Actions and select Edit settings.
In the "Edit settings" window, find the CD/DVD drive.
Uncheck the Connected checkbox next to the CD/DVD drive.
If a warning appears about overriding a lock, confirm the action by selecting an option similar to "Disconnect anyway and override the lock."
Click Save.
For any other VMs that may be preventing the unmount, check for and delete any unnecessary snapshots. Wait for the "Consolidate virtual machine disk files" task to complete.
After confirming all VMs have released their connections to the old datastore, you can proceed to unmount it from vCenter.