Windows 10 guest VMs are sometimes unable to eject CDs and DVDs from a USB drive. This can occur under several circumstances.
After burning a CD or DVD, windows will sometimes report an error, unable to eject disk. The disk cannot be ejected through explorer, command line, or physical button. Must be ejected through UIVM.
Sometimes after opening a CD or DVD using windows explorer, trying to eject the disk using physical button, windows explorer, or command line will fail. Only way to eject the disk is through UIVM.
Behaviour is inconsistent, does not repro every time. Attempt to burn or access a disk multiple times to see behavior.
Dell Latitude 7490
1.8.0 BIOS, UEFI, TPM2
Windows 10 1803 - Legacy - Tools installed
Windows 10 1809 - Legacy - Tools installed
Rhel 7.6 - Legacy - No tools
Install OpenXT Stable 9 Build 6524, UEFI
Install Guest VM, Windows 10 (1803 or 1809)
Install guest tools and reboot guest VM
In guest details, add USB device (external CD or DVD drive)
In guest VM, burn a CD/DVD or access the files on an existing CD/DVD
Try to eject disk through Windows Explorer, with physical button, or through command line
If disk does not eject, try ejecting through UIVM
udev is responsible for locking the drive. This is can be seen in udev rules present at
The reason for locking the drive is to look for DISK_EJECT_REQUEST event and then eject it.
This event is triggered by pressing the eject the button on the drive. In linux distributions (ex: debian), while monitoring udev, I could see that pressing the button triggers the event:
But this isn't the case in OpenXT. Not sure exactly why this event is not triggered on pressing the button.
This presents two possible solutions to the problem:
Comment out the drive locking code in udev rules file if not remove the entire file, so that the drive is never locked.
Find why DISK_EJECT_REQUEST is not triggered on pressing the drive eject button and fix it, this way when the event is triggered, udev takes care of ejecting the disk.
I tried solution 1 and it is working as expected, able to eject drive from the guest and also by pressing the button.
Solution 2 might sound like a proper fix, but not sure if it is possible in OpenXT (as systemd might be involved ?).
Any thoughts/suggestions ?
What is the behavior in OpenXT 8.0?
Same, drive gets locked because of udev rules.
There's a (toolstack?) state machine for USB optical drives, to enable use in dom0 (e.g. VM installation) and a single guest. Testing and fixes need to cover the valid scenarios. There are also some security policies related to optical drives.
Verified in build 6674 using Validation Steps. Disk can be ejected using any method.