Just stumbled upon such a problem. I was installing an OS onto VM using host cdrom. Installation programm locked the drive and did not unlock it afterwards for some reason, so, executing eject on the host system yields "Inappropriate ioctl for device" error
sudo eject -i0
and then
sudo eject
resolved my issue. The drive bay opened automatically after last command - i hadn't to push the hw button to eject.
Just stumbled upon such a problem. I was installing an OS onto VM using host cdrom. Installation programm locked the drive and did not unlock it afterwards for some reason, so, executing eject on the host system yields "Inappropriate ioctl for device" error
sudo eject -i0
and then
sudo eject
resolved my issue. The drive bay opened automatically after last command - i hadn't to push the hw button to eject.