How to clone CD or DVD from the CLI so it can be accessed in VirtulaBox Windows VM
You can use hdiutil to create the disk image, then convert to a hybrid format:

hdiutil create -srcdevice $device $diskname
hdiutil makehybrid -o $diskname.iso -joliet -iso $diskname.dmg


NOTE: this method does not require unmounting the device first.