You can add a virtual hard disk to a VirtualBox virtual machine (VM) even after the VM has been created. This allows you to increase storage capacity, attach existing virtual disks, or create a new one. VirtualBox supports a range of disk formats, including VMDK, VDI, VHD, and QCOW, which are compatible with other virtualization platforms like VMware and QEMU.
New storage can be added to either an IDE or SATA controller, depending on your system’s requirements. IDE controllers are typically used for compatibility, while SATA controllers offer improved performance and support for larger disks. Choosing the correct controller is crucial for optimizing the VM’s disk performance.
This guide outlines how to add a new virtual hard disk to a VirtualBox VM, either by attaching an existing virtual disk or creating a new one. Follow the steps to increase storage, create new hard drives, or add existing ones to your virtual machine.






Supported formats include VMDK (.vmdk), VDI (.vdi), VHD (.vhd), Parallels (.hdd), QED (.qed), QCOW (.qcow, .qcow2), and VHDX (.vhdx).

Supported format includes VMDK (.vmdk), VDI (.vdi), VHD (.vhd), Parallels (.hdd), QED (.qed), QCOW (.qcow, .qcow2) and VHDX (.vhdx)







You can also add a virtual hard disk using the command line interface with VBoxManage. Below is a step-by-step guide to attach an existing virtual hard disk or create a new one:
VBoxManage list vms
"Ubuntu VM" {uuid-1234-5678-91011-abcde}
"Windows VM" {uuid-2234-5678-91011-fghij}
VBoxManage storageattach "Ubuntu VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium /path/to/disk.vdi Storage device 'SATA Controller' port 0, device 0 successfully attached.
VBoxManage createhd --filename /path/to/newdisk.vdi --size 20480 --format VDI Virtual disk created with 20480 MB size in VDI format.
VBoxManage storageattach "Ubuntu VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium /path/to/newdisk.vdi Storage device 'SATA Controller' port 0, device 0 successfully attached.
VBoxManage showvminfo "Ubuntu VM"
Name: Ubuntu VM
Guest OS: Ubuntu (64-bit)
UUID: uuid-1234-5678-91011-abcde
Storage Controllers:
SATA Controller (0, 0): /path/to/newdisk.vdi (UUID: disk-uuid)