VirtualBox allows users to add virtual disk images to a virtual machine's optical drive. These virtual optical disk files can be in formats such as ISO, Joliet, or UDF. Adding these disk images is necessary for tasks like installing an operating system or software within the virtual environment. VirtualBox supports the use of virtual CD, DVD, and Blu-ray disk images, allowing seamless setup without physical media.
In VirtualBox, a virtual optical drive is included by default. Users can insert virtual disk images into this drive while the virtual machine is running or powered off. This flexibility makes it easy to load disk images at any time, whether for installation, testing, or running media. The platform supports disk images created in advance or selected from an existing list.
Inserting a disk image is a straightforward process. Users can either choose an existing virtual disk image or create a new one from local storage. The process is identical whether the machine is powered off or running. By inserting the correct virtual disk, users ensure the virtual machine has the necessary media to function.
Inserting a virtual optical disk file into a running VirtualBox VM allows you to load media like an ISO image without restarting the virtual machine. This method is useful for installing software or loading an operating system while the VM is active. Follow these steps to add a disk image to the virtual CD or DVD drive of a running VM.

Select a CD or ISO image already listed from the list if available or click on Choose/Create a disk image to open the disk image creation and selection window.

If the virtual machine is powered off, inserting a disk image can be done through the settings interface. This method allows you to configure the virtual CD or DVD drive before starting the VM. Once the disk image is added, it will be available when you boot the machine. The following steps guide you through this process.




Select a CD or ISO image already listed from the list if available or click on Choose/Create a disk image to open the disk image creation and selection window.


You can also insert an ISO or disk image into a VirtualBox VM using the command line interface with VBoxManage. Below is a step-by-step guide to attach a virtual optical disk file to a virtual machine:
VBoxManage list vms
"YourVMName" {UUID-1234-5678}
"AnotherVMName" {UUID-8765-4321}
VBoxManage storageattach "YourVMName" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium /path/to/your/disk-image.iso
VBoxManage storageattach "YourVMName" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium /path/to/your/disk-image.iso
VBoxManage showvminfo "YourVMName"
Name: YourVMName
Guest OS: Ubuntu (64-bit)
UUID: a-unique-uuid
Storage Controllers:
IDE Controller (0, 0): /path/to/your/disk-image.iso (UUID: image-uuid)