How to convert fixed and mobile hard drives in VirtualBox
VirtualBox allows you to select an automatically or fixed allocated hard drive when creating a new virtual hard disk file. Mobile hard drives are faster in creating and can increase storage size. Fixed-size hard drives are also faster when used but cannot increase in size when they are filled. However, you can switch between two formats and the size of the hard drive if you want.
- How to regain access to the hard drive, fix errors that cannot open the hard drive
- Instructions on how to install Windows 7 from the HDD
- How to set up BIOS to boot from USB / CD / DVD, external hard drive
- 8 ideas from the old hard drive
Step 1 - Locate the VBoxManage command and open the Command Prompt
VirtualBox allows you to convert a fixed hard drive to a portable hard drive and vice versa, but this option is not displayed in its graphical interface. Instead, you must use the VBoxManage.exe command.
Determine this command to continue. On Windows, you will see it in the VirtualBox program folder, by default is C: Program FilesOracleVirtualBox . If you have installed VirtualBox in another folder, look in there.
Open the Command Prompt window. To do this, open the Start menu , type " cmd" and press Enter.
Type "cd" into the Command Prompt, follow the path of the directory containing the VBoxManage command (to put the command in quotation marks)
You can quickly do this by entering cd into the Command Prompt window, then drag and drop the folder icon from the file manager's address bar to the Command Prompt.
If you are using the default path, it will look like this:
cd "C: Program FilesOracleVirtualBox"
Note: These instructions are assuming you are using VirtualBox on Windows. If you are using VirtualBox on macOS or Linux, you can just open the Terminal window and run the normal vboxmanage command as you would with other commands.
Step 2 - Locate the path to the drive you want to transfer
Run the following command in the Command Prompt window to see a list of virtual hard drives on the computer:
VBoxManage.exe list hdds
Look through the list and determine the file path to the virtual disk you want to convert. Suppose we want to convert the virtual drive associated with a virtual machine called "Windows". As we can see in the output below, the path to that virtual disk in the system is C: UserschrisVirtualBox VMsWindowsWindows.vdi .
Step 3 - Convert virtual hard drive
Now, you can use the VBoxManage command to convert the virtual hard drive from fixed to mobile or vice versa.
To convert from a fixed hard drive to mobile, run the following command:
VBoxManage.exe clonemedium disk "C: pathtosource.vdi" "C: pathtodestination.vdi" - variant Standard
For example, if the source hard drive is located in C: UserschrisVirtualBox VMsWindowsWindows.vdi and you want to create a new hard drive named "Windows-dynamic.vdi" in the same directory, you will run:
VBoxManage.exe clonemedium disk "C: UserschrisVirtualBox VMsWindowsWindows.vdi" "C: UserschrisVirtualBox VMsWindowsWindows-dynamic.vdi" - variant Standard
To convert a virtual hard drive from mobile to fixed, run the following command:
VBoxManage.exe clonemedium disk "C: pathtosource.vdi" "C: pathtodestination.vdi" --variant Fixed
For example, if the source hard drive is located in C: UserschrisVirtualBox VMsWindowsWindows.vdi and you want to create a new disk called "Windows-fixed.vdi" in the same folder, you will run:
VBoxManage.exe clonemedium disk "C: UserschrisVirtualBox VMsWindowsWindows.vdi" "C: UserschrisVirtualBox VMsWindowsWindows-fixed.vdi" - variant Standard
Step 4 - Delete the old virtual hard drive
The above command only copies the current hard drive. You will end up with both the original hard drive file and the new hard drive file.
First, you need to remove the existing virtual hard drive from VirtualBox. In VirtualBox, right-click on the virtual machine using the virtual disk and select Settings.
Select Storage to see the connected storage devices. Right-click on the original VDI and select Remove Attachment . Then click OK.
The process below will delete the original file from the hard drive. Note that you can back up the original files of the drive if you haven't already, in case anything goes wrong with this process.
In Command Prompt, run the following command to see a list of virtual hard disks on your computer:
VBoxManage.exe list hdds
Locate the UUID of the original hard drive that you want to delete. You can copy it to the clipboard with the left mouse button and then right-click on it.
Run the following command to remove the original hard drive from the VirtualBox registry and delete it. You can right-click on the Command Prompt window to paste the UUID.
VBoxManage.exe closemedium UUID --delete
Step 5 - Rename the new hard drive
Now, you should rename the new hard drive file so that it has the same name as the original file. Just navigate to it in the File Explorer or Windows Explorer window.
Right-click on the VDI file, select Rename and change that name to the original name. For example, here we rename the "Windows-fixed.vdi" file we created to "Windows.vdi".
When you have renamed the hard drive, delete the old hard drive name from VirtualBox. Click File> Virtual Media Manager in VirtualBox and find the original name of the renamed hard drive. It will have a yellow warning icon on the left. Right-click on it and select Remove. Click Remove again to confirm and click Close.
Step 6 - Insert the hard drive into VirtualBox
Back to VirtualBox, right-click on the virtual machine associated with the virtual hard drive and select Settings. In Storage, right-click on the controller: SATA and select Add Hard Disk .
Select Choose Existing Disk and browse to the file you just renamed
Click OK to close the virtual machine installation window. Now you can boot the virtual machine normally. Its hard drive will be either a fixed or portable hard drive no matter what you convert it to.
It is done. You have converted from fixed disk to mobile in VirtualBox or vice versa.
Good luck!
You should read it
- How to identify hard drive failure, hard drive failure, bad hard drive on Windows
- Tips when choosing to buy a portable hard drive
- Buy mobile hard drive, SSD hard drive where genuine, cheap?
- Choose to buy a portable hard drive
- What is a hard drive? There are several types?
- Dissection of hard drive components
- Pros and cons of using an external hard drive for PS4
- 5 ways to check hard drive effectively to help periodically check the hard drive
- How to Fix Corrupted Hard Drive with 4DDiG
- Know about bad sectors on your hard drive
- Learn about HDD hard drive
- 5 hard drives with the best reliability