You can do the following:
vim-cmd vmsvc/getallvms
When you see the list of VMs, take note of the vmid of the machine in question
then use:
vim-cmd vmsvc/device.connection xx 3002 false xx being the VMID of your VM
this will disconnect the cdrom from your VM, it will still show up as the device but it will no longer be connected.
to connect you can use vim-cmd vmsvc/device.connection xx 3002 true
good luck
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!