17

I have CDs for Age of Empire III and I would like to play it in a Windows 10 VM. Is this possible? I know how to insert virtual CDs (i.e., ISO files) into a VirtualBox VM (via the "Storage" settings), but physical CDs are a different story. The best solution I can think of is to add where I've mounted the CDs on my Linux system to the system via shared folders.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Josh Pinto
  • 3,493
  • Have you tried ripping the CD to get an ISO file? – lgeorget Mar 28 '17 at 11:59
  • Nope, is it legal? I purchased these disks legally, I assume it would be legal provided I don't try sharing the ISO images. – Josh Pinto Mar 28 '17 at 11:59
  • 8
    It depends on the legislation that apply to your country/state/... In general, copying a physical asset is legal as long as you keep the copy for yourself. Moreover in your particular situation, you do it for the sake of interoperability. – lgeorget Mar 28 '17 at 12:02
  • Well write an answer telling me how to rip it (keeping in mind my distro is Funtoo, doubt it's relevant as Funtoo has repos that are very extensive) and I'll accept it as an answer to this question provided it works. – Josh Pinto Mar 28 '17 at 12:03
  • 1
    It's possible to use the physical CD drive as the virtual machine's CD drive. However this may or may not work the way you want, depending on how the game is reading the CD. – Satō Katsura Mar 28 '17 at 12:08
  • @BrentonHorne I didn't remember VirtualBox could use the physical host's CD drive. In this case, this is the best solution. If you prefer ripping, then there already are multiple answers on this site explaining how to proceed. For instance: http://unix.stackexchange.com/questions/39467/how-to-verify-a-cd-against-an-iso-image/47821#47821 – lgeorget Mar 28 '17 at 12:11
  • 2
    Ripping doesn't necessarily work with certain games' copy protection; I don't know about AoE III, but AoE II needs the physical disk, it doesn't work with an image (unless you use a cracked version or the Steam re-release). – Stephen Kitt Mar 28 '17 at 12:35
  • 3
    @BrentonHorne, dd if=/dev/cdrom of=AoE3.iso – Mark Mar 28 '17 at 23:54

4 Answers4

41

Yes you can, but you need to have DVD passthrough active.

Go to VirtualBox's Machine > Settings > Storage > Enable Passthrough for the DVD drive.

To allow an external DVD drive to be recognized by a VirtualBox Virtual Machine (VM) it must be configured in such a way that "passthrough" is enabled. Enabling Passthrough allows the underlying operating system to pass the required commands through to the device that is connected to the Virtual Machine as opposed to the host operating system instance.

SessionR
  • 536
  • 1
    Best solution by far. VirtualBox makes it kinda subtle how ya do this, but now you've saved me from the dramas of ripping. – Josh Pinto Mar 28 '17 at 12:49
  • What are the disadvantages of enabling pass-through? And @BrentonHorne I would suggest ripping anyway; your CD might eventually deteriorate at some point. – user541686 Mar 28 '17 at 19:42
  • 2
    Today it is called "Live CD/DVD" not "passthrough" You have to add an empty CD and it will give you that Live option. Then click the shiny CD icon just above and to the right of the Live checkbox and select the host device. – Lee Meador Apr 12 '19 at 23:02
5

You should be able to use optical drive directly from VM. If it's Virtualbox then just in devices you have option to mount physical drive. Just the same as you can install os in VM without iso image.

darvark
  • 285
  • Um this answer I'm afraid isn't helpful at the moment unless you show me what you're talking about (preferably using screenshots) or be very specific as to where I can find the physical drives. http://i.imgur.com/q1542cW.png is all I see in the storage section of the VM options (which I'm guessing you're referring to by "In devices"). I even showed the right-click menu for ya. Sorry for my confusion, I really want an answer here but I can't see what you describe, otherwise I wouldn't have asked this question. – Josh Pinto Mar 28 '17 at 12:14
  • http://4.bp.blogspot.com/-4ZFhvY-8xxM/UaZDA0eVY4I/AAAAAAAADZk/q6h71BqpBiU/s1600/Install+Gust+Additions+in+Virtual+Box.png under this CD/DVD Devices shoudl be option to mount optical drive. this CD/DVD Devices you should find :, which you should find in menu bar http://cdn.sysprobs.com/wp-content/uploads/2011/05/installtoharddisk_thumb.png – darvark Mar 28 '17 at 12:19
  • Yep I know how to add optical drives but all that mentions are ISOs and other files not physical CDs. All I get when I open the add optical drives option is http://imgur.com/bEaWftK.png – Josh Pinto Mar 28 '17 at 12:26
4

The is no option with the GUI to do it but on the command line, you can create a pseudo disk image (vmdk) that refers to a physical disk.

If you attach that disk to your VM, you should be able to directly access it, e.g.:

VBoxManage internalcommands createrawvmdk -filename /home/user/vbdisks/cd.vmdk
      -rawdisk /dev/sdc

VBoxManage storageattach VMname --storagectl "IDE Controller"
      --port 0 --device 1 --type dvd --medium /home/user/vbdisks/cd.vmdk

See https://www.virtualbox.org/manual/ch09.html#rawdisk

Beware not accessing any r/w disk with more than one OS, but with a read-only media like a CD or DVD, there should be no issue.

As SessionR answered, there is a much simpler alternative option for CD/DVD, just check the live CD/DVD checkbox and the physical drive will be accessible:

enter image description here

jlliagre
  • 61,204
0

There is some confusion in this thread and I just went through this (enable CD in VirtualBox):

  1. You have to add a new CDROM device in the storage section of the parameters or you can simply point the existing CDROM (IDE) device to an actual hardware device. You click the "shiny" CDROM icon on the right of the "Optical drive" drop down and on a WindoZe host select something like "Host drive 'D:'". The exact entry to select depends on the number of hard drive or partitions on your PC
  2. Once you have done this you will see the "passtrough" option appear and you should enable this. The "Live CD" is to tell VBox that the CD in the drive is a bootable live CD, not to use the CDROM for physical CDs.
bu5hman
  • 4,756