How to Convert Between Fixed and Dynamic Disks in VirtualBox

1267
How to Convert Between Fixed and Dynamic Disks in VirtualBox

Here we can see, “How to Convert Between Fixed and Dynamic Disks in VirtualBox”

When creating a new virtual hard disc file in VirtualBox, you can choose between a dynamically allocated or fixed size disc. Disks that are dynamically allocated are easier to create and can grow to larger sizes. Fixed-size discs are easier to use, but they can’t expand once they’re full. If you want, you can convert between the two formats and resize discs.

We recommend shutting down the virtual machine rather than suspending and saving its state before continuing. The virtual machine should be marked as “Powered Off” in VirtualBox.

Step 1: Locate the VBoxManage Command and Open a Command Prompt

  • You can convert a fixed disc to a dynamic disc or a dynamic disc to a fixed disc in VirtualBox, but this option isn’t visible in the graphical interface. You must instead use the VBoxManage.exe command.
  • To continue, look for this command. It’s located in the VirtualBox programme directory on Windows, which is C:\Program Files\Oracle\VirtualBox by default. Instead, look in the directory where you installed VirtualBox.
  • To get started, open a Command Prompt window. To do so, go to the Start menu and type cmd into the search box.
  • In the Command Prompt, type cd, then the path to the folder where the VBoxManage command is located. You’ll have to put it in quotes.
  • Type cd into the Command Prompt window, then drag and drop the folder icon from the file manager’s address bar into the Command Prompt.
Also See:  Rainbow Six Extraction Release Date Seemingly Confirmed In Updated Post

If you’re following the default path, it should look something like this:

cd "C:\Program Files\Oracle\VirtualBox"

Note: These instructions are based on the assumption that you’re using VirtualBox on Windows. If you’re using VirtualBox on macOS or Linux, open a Terminal window and type the vboxmanage command like any other command.

Step 2: Locate the Path to the Disk You Want To Convert

To see a list of all the virtual hard discs on your computer, type the following command in the command prompt window:

VBoxManage.exe list hdds

Look through the list to find the virtual disc file path you want to convert. For example, let’sFor example, let’s say we want to change the virtual disc associated with the “Windows” virtual machine. The path to that virtual disc on our system is C:\Users\chris\VirtualBox VMs\Windows\Windows.vdi, as shown in the output below.

Step 3: Convert the Virtual Disk

You can now convert the virtual disc from fixed to dynamic or dynamic to fixed using the VBoxManage command.

Run the following command to convert a fixed virtual disc to a dynamic virtual disc:

VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" –variant Standard

If the source disc is C:\Users\chris\VirtualBox VMs\Windows\Windows.vdi and you want to make a new disc named Windows-dynamic.vdi in the same folder, run:

VBoxManage.exe clonemedium disk "C:\Users\chris\VirtualBox VMs\Windows\Windows.vdi" "C:\Users\chris\VirtualBox VMs\Windows\Windows-dynamic.vdi" –variant Standard

Run the following command to convert a virtual disc from dynamic to fixed:

VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" –variant Fixed

If the source disc is C:\Users\chris\VirtualBox VMs\Windows\Windows.vdi and you want to make a new disc named Windows-fixed.vdi in the same folder, run:

VBoxManage.exe clonemedium disk "C:\Users\chris\VirtualBox VMs\Windows\Windows.vdi" "C:\Users\chris\VirtualBox VMs\Windows\Windows-fixed.vdi" –variant Fixed

Step 4: Remove the Old Virtual Disk

The command above copies the existing disc. You’ll have the original disc file as well as a new disc file.

Also See:  Two new Instagram hidden features make the system easier to use
  • To begin, you must first remove the existing virtual disc from VirtualBox. Right-click the virtual machine that uses the virtual disc in VirtualBox and chooses “Settings.”
  • To see the connected storage devices, go to “Storage.” Then, remove the original VDI by right-clicking it and selecting “Remove Attachment.” After that, click “OK.”
  • The procedure outlined below will remove the original disc file from your hard drive. If you haven’t already done so, make a backup of the original disc file in case anything goes wrong during the process.

Run the following command in the Command Prompt to see a list of all virtual discs on your computer:

VBoxManage.exe list hdds

Find the UUID of the original disc you want to get rid of. Then, by selecting it with the left mouse button and then right-clicking it, you can copy it to your clipboard.

To delete the original disc from VirtualBox’s registry, run the following command. You can paste the UUID by right-clicking in the Command Prompt window.

VBoxManage.exe closemedium UUID --delete

Step 5: Rename the New Disk

Now you should rename the new disc file to the same name as the original one. Open a File Explorer or Windows Explorer window and navigate to it.

  • Change the name of the VDI file by right-clicking it and selecting “Rename.” For instance, in this case, we renamed the Windows-fixed.vdi file to Windows.vdi.
  • Remove the old disc name from VirtualBox once you’ve renamed the disc. In VirtualBox, go to File> Virtual Media Manager and look for the original name of the renamed disk—it will have a yellow warning icon to its left. Remove it by right-clicking it and selecting “Remove.” To confirm and close “Close,” click “Remove” once more.

Step 6: Insert the Disk In VirtualBox

  • Return to VirtualBox and select “Settings” from the right-click menu of the virtual machine associated with the virtual disc. Right-click the SATA controller in Storage and choose “Add Hard Disk.”
  • Choose “Choose Existing Disk” and navigate to the renamed File.
  • To close the virtual machine settings window, click “OK.” The virtual machine should now be able to boot normally. Its disk will be either a fixed or dynamic disk—whichever you converted it to.

Conclusion

I hope you found this information helpful. Please fill out the form below if you have any questions or comments.

User Questions:

  1. How do I increase the size of a VDI disc?

Update: In VirtualBox, use the Virtual Media Manager.

In the main VirtualBox window, go to File> Virtual Media Manager to get there. Then, select a virtual hard disc from the list and adjust its size using the “Size” slider at the bottom of the window. When you’re finished, click “Apply.”

  1. What is VirtualBox, a virtual hard disc?

Like a physical disc, a virtual disc has a capacity that must be specified when the image file is created. However, unlike a physical disc, Oracle VM VirtualBox allows you to expand an image file after being created, even if it already contains data.

  1. Is it possible for a VHD to be dynamic?

A VHD (Virtual Hard Disk) is a dynamically expanding disc on the Hyper-V server that starts small and grows as the VMs require more storage space. However, the VHDs can only grow as the VMs add data, up to the size limit set by the setup wizard.

Also See:  How to: Fix Intel Services Manager Crash in Windows 10

4. Dynamically located VirtualBox Disk Image not expanding?

Dynamically located VirtualBox Disk Image not expanding? from virtualbox

  1. VM still out of space after converting from fixed-space to dynamic VDI

VM still out of space after converting from fixed-space to dynamic VDI from virtualbox