Please note, on Linux machine if you disconnect a cdrom from a vm this way and this cdrom is still mounted, the machine will freeze/hang, so be sure to unmount any mounted cdrom from inside the guest before.