Add a DVD or CD-ROM Drive to a Virtual Machine in Oracle VM VirtualBox

Learn how to add a virtual CD/DVD drive in Oracle VM VirtualBox and attach an ISO image or host physical optical drive for installation, recovery, and software media.

A virtual optical drive lets a guest operating system use CD or DVD media inside an Oracle VM VirtualBox virtual machine (VM). You can connect the drive to a physical optical drive on the host computer or mount an ISO image file as virtual media.

This guide covers adding the drive, selecting media, booting from an ISO, changing or ejecting media, and troubleshooting common problems.

What a Virtual Optical Drive Does

A virtual machine is a software-defined computer running on a physical computer. The physical computer uses a host operating system, while the operating system inside the VM is the guest operating system.

VirtualBox can present one or more optical drives to the guest. The guest sees each one as a CD/DVD drive, even though the media may actually be an ISO file or a disc in the host computer.

  • Install a guest operating system from bootable installation media.
  • Install applications from a software CD or DVD.
  • Use driver or vendor media.
  • Run recovery tools and diagnostic environments.
  • Boot a utility disc for partitioning, repair, or data recovery.

An optical drive is different from a virtual hard disk. A hard disk stores the guest's normal operating system and persistent files. Optical media is generally removable and is commonly used for installation or temporary access. A floppy device is another removable device type with different media, capacity, and compatibility characteristics.

Optical Media Source Options

SourceWhat the Guest UsesBest Use CasesKey Considerations
Host physical CD/DVD driveA disc inserted in a real optical drive attached to the hostUsing an existing software disc, recovery disc, or installation discThe host must recognize the drive, the disc may need to be inserted first, and permissions or another application may prevent access
ISO image fileA file containing the contents of an optical discOperating system installation, software installation, testing, and repeatable VM setupThe file must be complete and compatible; bootable media must contain boot information when booting is required

An ISO image is a file that represents the contents of an optical disc. It is usually the preferred source for operating system installation because it is portable, does not require a physical disc, and can be stored with other VM setup files.

Before You Begin

  • Know which VM will use the optical drive.
  • Have an ISO file available, or identify the host's physical CD/DVD drive.
  • Make sure the ISO is appropriate for the intended guest operating system.
  • Power off the VM before changing its storage hardware configuration. Some VirtualBox configurations support changing removable media while the VM is running, but adding controllers or devices is normally safest when the VM is powered off.

Open the Virtual Machine Storage Settings

  1. Open Oracle VM VirtualBox Manager, the main interface for selecting VMs and changing their configuration.
  2. Select the target VM in the list.
  3. Click Settings.
  4. Open the Storage section.

Storage settings contain the VM's storage controllers, virtual hard disks, optical drives, and attached media. A storage controller is the virtual hardware interface, such as IDE or SATA, to which storage devices are connected.

Add a Virtual CD/DVD Device

  1. In the Storage tree, select the controller where the optical drive should be attached. Existing VMs may have an IDE, SATA, or another supported controller.
  2. Use the control for Add CD/DVD Device. This is commonly represented by an optical-disc icon near the storage-controller list.
  3. If VirtualBox asks whether to create or select an optical-drive attachment, choose the option to add the drive.
  4. Select the new optical drive in the storage tree so that its media source can be configured.

The VM can potentially use more than one optical drive. For example, separate drives could hold two ISO images or different media sources. The exact number depends on available controller slots and the VM's configuration. If no slot is available, select another suitable controller or add a compatible controller before trying again.

Attach an ISO Image

  1. With the virtual optical drive selected, open its media selection control.
  2. Choose the option to select or use an ISO image file.
  3. Browse to the ISO's location on the host.
  4. Select the ISO and confirm the selection.
  5. Check the Storage tree. The ISO should appear as media attached to the virtual optical drive.

Mounting an ISO means attaching that file to the virtual optical drive so the guest can read it as optical media. Before using it, check that the download completed successfully. If the media must start the VM, also verify that the ISO is bootable and supports the VM's firmware mode.

Example: Install a Guest Operating System from an ISO

  1. Open the VM's Storage settings.
  2. Add a virtual CD/DVD device or select an existing empty optical drive.
  3. Choose the operating system installation ISO.
  4. Confirm the settings with OK.
  5. Start the VM.
  6. If necessary, configure the VM's boot order so the optical drive is checked before the virtual hard disk.
  7. Follow the guest operating system installer.

Attach the Host Physical CD/DVD Drive

  1. Insert the desired disc into the host computer's physical CD/DVD drive.
  2. Open the VM's Settings and select Storage.
  3. Add a virtual optical drive, or select an existing one.
  4. Open the media source list and choose the host physical CD/DVD drive.
  5. Confirm the selection and click OK.
  6. Start or resume the VM and access the disc from the guest's optical drive.

The guest sees media in the selected host drive as though the disc were inserted into its own optical drive. The host must keep the drive available while the guest is using it. A physical drive may be unavailable because the host does not recognize it, another application is using it, the disc is missing, or the host user lacks the required permissions.

Example: Use a Physical Software Disc

  1. Insert the software disc into the host's optical drive.
  2. Attach that physical drive to the VM in Storage settings.
  3. Start the guest operating system.
  4. Open the guest's file manager and select its CD/DVD drive.
  5. Run the installer or copy the required files according to the software's instructions.

Save and Verify the Configuration

  1. Click OK to apply the Storage changes and close Settings.
  2. Start the VM.
  3. Within the guest operating system, look for a CD/DVD or optical-drive device.
  4. Open the drive and confirm that the expected files or installer are visible.

If the purpose is to boot from the media, open the VM's System settings and review the boot order. Boot order is the sequence of devices checked when the VM starts. Place the optical drive before the hard disk when the installer or utility must start first. After installation, remove the installer media or move the hard disk ahead of the optical drive to avoid starting the installer again.

Change or Eject Optical Media

You normally do not need to remove the virtual optical drive when changing media. The drive device can remain attached while its source changes.

  1. Power off the VM when changing configuration that cannot be modified safely at runtime.
  2. Open Settings > Storage, or use VirtualBox's removable-media control while the VM is running if supported.
  3. Select the optical drive.
  4. Choose to eject or unmount the current ISO, or select a different ISO or host physical drive.
  5. Confirm the change and restart the guest if it does not detect the new media automatically.

Ejecting media removes the ISO or physical-disc attachment from the drive. Removing the optical drive removes the virtual device itself from the VM configuration. These are different operations: eject media when the drive may be needed later, and remove the device only when the VM no longer needs an optical drive.

Example: Replace Installation Media

  1. Eject or unmount the operating system installation ISO after setup.
  2. Attach a driver, tools, or application ISO.
  3. Start or return to the guest and open the optical drive.
  4. When finished, eject the ISO so an obsolete bootable installer is not left attached.

Using Multiple Optical Drives

To attach an additional optical drive, select a suitable storage controller and use Add CD/DVD Device again. Attach a separate ISO or physical source to the new device. The guest may identify the drives with different device names or drive letters, depending on its operating system and hardware discovery order.

If the add-device control is unavailable, inspect the selected controller's device slots. Adding a compatible storage controller may provide another slot, but controller changes should be made while the VM is powered off and should be checked for guest compatibility.

Common Optical Drive Tasks

TaskWhere to Perform ItExpected Result
Add an optical driveVM Settings > Storage > Add CD/DVD DeviceA virtual CD/DVD device appears under a storage controller
Mount an ISOSelect the optical drive and choose an ISO imageThe guest can read the ISO as inserted optical media
Use a host physical driveSelect the host physical CD/DVD drive as the media sourceThe guest can access the disc in the host drive
Eject mediaOptical-drive media control or Storage settingsThe virtual drive remains, but no disc or ISO is attached
Remove an optical driveVM Settings > Storage, then remove the deviceThe virtual optical-drive device is removed from the VM

Troubleshooting

The Guest Does Not Detect the Drive or Disc

  • Confirm that a virtual optical drive is present under Storage.
  • Confirm that an ISO or host physical drive is selected as its media source.
  • Restart the guest if its operating system does not detect the newly added device dynamically.
  • Check whether the guest requires a storage driver or has optical-drive support disabled.

The VM Does Not Boot from the ISO

  • Verify that the ISO is actually bootable.
  • Confirm that the ISO is mounted in the virtual optical drive.
  • Put the optical drive before the virtual hard disk in the VM boot order.
  • Check that the VM's firmware mode is compatible with the installation media.

The Host Physical Drive Cannot Be Selected or Accessed

  • Verify that the host operating system recognizes a physical optical drive.
  • Insert the disc before selecting or accessing the drive if the host requires media to be present.
  • Close host applications that may be locking the drive.
  • Check host permissions and VirtualBox access rights.
  • Use an ISO image instead if direct physical-drive access is unavailable.

The Wrong ISO or Disc Remains Attached

  • Open Storage settings and inspect the media attached to the optical drive.
  • Eject the current media or select the correct ISO.
  • Confirm the changes before restarting the VM.

Adding Another Optical Drive Is Unavailable

  • Review the selected storage controller and its available device slots.
  • Try a suitable controller with an available slot.
  • Add a compatible storage controller if appropriate.
  • Confirm that the VM configuration supports additional optical devices.

Exam-Relevant Notes

  • An ISO image is a file used as virtual optical media; it is not a virtual hard disk.
  • The host physical drive belongs to the host, while the virtual optical drive is hardware presented to the guest.
  • Storage settings manage controllers, drives, and attached media.
  • Mounting or attaching media is different from adding or removing the virtual drive device.
  • When a VM must boot from optical media, both a mounted bootable image and the correct boot order are required.

Summary

To add a DVD or CD-ROM drive, select the VM in VirtualBox Manager, open Settings > Storage, add or select a virtual optical drive, and attach either an ISO image or a host physical CD/DVD drive. Confirm the settings, start the VM, and verify the drive from the guest. Change or eject media without removing the drive when possible, and adjust boot order when the VM must start from the optical media.