
In this tutorial, we’ll explore how to increase the virtual disk size for a VirtualBox virtual machine on a Windows host. While the VirtualBox GUI typically limits the maximum size of a .vdi disk to 2TB, we’ll use the command line to create a larger virtual disk of 18TB. This extended capacity allows you to accommodate growing storage needs for your virtual machines.
Step 1: Open Command Prompt
Begin by opening the Command Prompt on your Windows host. You can do this by searching for “cmd” in the Start menu and launching it.
Step 2: Navigate to the VirtualBox Installation Directory
Navigate to the VirtualBox installation directory using the cd
command. The default path is often C:\Program Files\Oracle\VirtualBox
, but it may vary depending on your installation.
cd C:\Program Files\Oracle\VirtualBox
Confirm that you are in the correct directory by listing its contents with the dir
command.
dir
Step 3: Create the Virtual Disk
Now, let’s create a virtual disk using the vboxmanage
command. Specify the desired path and name for your .vdi disk and its size in megabytes (1TB = 1048576MB). In this example, we’ll create an 18TB .vdi image, which can grow dynamically as needed.
vboxmanage createmedium disk --filename "F:\VMs\18TB.vdi" --size 18874368 --format VDI
This command will create a virtual disk with the specified size and format it as VDI (VirtualBox Disk Image). You can adjust the size according to your requirements.
You can now move this .vdi image and use it with virtualbox, if you create a disk larger than 2TB it must use the GPT partition scheme and and you will need to enable EFI in the VM settings before installation of an OS, if this causes issues you can always add the large disk we created here to an existing VM in the settings menu under storage.
By following these steps, you can increase the virtual disk size beyond the 2TB limit imposed by the VirtualBox GUI, allowing you to better manage your virtual machine storage.
Leave a Reply