How to increase HDD capacity of VirtualBox with Clonezilla
Suppose, you decided to try Linux in a virtual machine. You have chosen and downloaded a nice looking Linux distribution, created a virtual machine, installed, tested everything with it, and finally fell in love with the virtual machine. Now, you want to discover more about this fascinating Linux platform but can't do it because the virtual HDD is full. Unfortunately, there is no easy way to solve this problem.
You can try the usual way - using the command line tools to expand it and a partitioning tool to increase the HDD capacity in the guest operating system.
Besides, there is another special way - expand the capacity of HDD in Virtualbox and treat virtual PC as a real machine!
Instead of trying to change the HDD of the virtual machine, you will do as what you have done with a normal PC: Create and attach to the second HDD, then use the standard, bootable version of the tool CloneZilla favorite backup to copy the contents of the old virtual HDD to the new one and then remove the old HDD, leaving you more storage capacity without having to deal with confusing commands and abnormal error.
There is no need to back up everything because the old virtual HDD still exists if you need it. Besides, the latest versions of Clonezilla can cope with resizing any partitions, so if everything goes according to plan, then you just need to change to the HDD later. virtual and boot your virtual computer.
Use Clonezilla to increase HDD capacity of VirtualBox
- Change HDD size of VirtualBox
- Drive and controller
- Resize partition
- Start copying
- Change drive
Change HDD size of VirtualBox
With this approach, you'll need to download CloneZilla's bootable ISO (on the server OS). You may also need GParted's bootable ISO version, in case the volume change process fails.
1. Download the Live ISO version of CloneZilla and GParted. These two tools provide versions for different architectures, but since we're talking about a virtual machine, most versions will work, so you don't need to bother downloading. about which.
Finally, you may not need GParted if CloneZilla successfully resizes the partitions in the virtual HDD. However, it is best to have GParted available in case Clonezilla fails at this step.
2. From the main VirtualBox window, select Virtual PC running out of storage space from the list on the left.
3. Access Settings by clicking on the gear icon, right click and select Settings from the menu that appears or press Ctrl
+ S
on the keyboard.
4. Select the 'Storage' option tab on the left side of the window. If you haven't changed the default options, the virtual computer will usually come with two controllers. On the first controller, you will see a virtual optical drive, allowing the use of ISO files as if they were normal optical storage media (CDs and DVDs). On the second controller, you will find the virtual hard drive is full of memory.
Select the controller with the hard drive and pay attention to the two icons that appear on the right. Choose the second one: 'Adds hard disk' .
In the new pop-up window that appears, select 'Create new disk' to add a second HDD to the same controller as the existing hard drive on the virtual PC.
5. VirtualBox will show you a series of simple steps to add a new, blank hard drive. In the first step, you are asked to select the file type to be used. You should choose the 'official' format of VirtualBox, VDI (VirtualBox Disk Image). Continue with one click on Next.
You will then have to choose whether you want the new drive to be 'Fixed' or 'Dynamic' . The article recommends the 'Fixed' option , which determines that virtual drives will take up their capacity on the actual computer's drive from the beginning. If their capacity is 20GB, you will lose 20GB from the computer right away. The 'Dynamic' option specifies that the original virtual drives will only take up space for their actual content, expanding until they reach their maximum capacity when you use them.
The problem with the second option is that when the virtual drives try to expand, if there is not enough space on the actual computer, you may encounter problems. And in this case, for example, trying to move the entire operating system installation from one drive to another, so it's best to try to minimize the possibility of any problems. So choose 'Fixed size' !
The final step of the hard drive creation process will help you choose the capacity of the new hard drive. You need to declare a larger capacity than the existing hard drive, so you can move to a new HDD and solve the problem of no free space. In this case, the original virtual HDD has a capacity of 10GB, so the article has chosen to double the capacity, 20GB for the new drive. This process will leave 10GB of free space after cloning the old HDD to the new one.
Click Create and VirtualBox will start creating drive files. If you select the 'Fixed' option and the HDD capacity is large, this process may take some time.
Drive and controller
6. After completing the process, the virtual computer will have two HDDs connected to the controller you previously selected.
Now let's turn our attention to the optical drive on another controller. Select it and then click the button with the disk icon appearing on the right side of the 'Optical Drive' pull-down menu . Locate and select CloneZilla ISO you downloaded earlier.
7. Boot the virtual machine and boot into CloneZilla. Choose the first option, 'Clonezilla live'.
You will be prompted to select the language to use in the CloneZilla interface and keyboard. If you do not need to change the language, you can accept the default options by pressing Enter
in both cases. Finally, select 'Start_Clonezilla' to start the application yourself.
8. CloneZilla allows you to backup your hard drive in many ways. In this case, the example will use the 'device-device' option because the article wants to copy the contents of the current HDD to a new hard drive.
9. In the next step, choose 'Expert mode' to gain access to all CloneZilla options, then choose whether you want to copy the entire disk, not just a partition from it, with custom Select 'disk_to_local_disk' .
10. To select where to be copied, set the smaller drive as 'Source' and the larger drive as 'Target' .
When you reach the 'Advanced' option, make sure the first 5 options are active: -g
, -e1
, -e2
, -j2
and -r
.
The last option of which is the most important in this case and is what makes the approach simpler. Thanks to this -r , CloneZilla will try to automatically resize partitions as they are copied from the old hard drive to the new hard drive and take advantage of its larger space. Therefore, it will help you not to run GParted or any similar program to extend them manually.
Unless something comes up, like some of CloneZilla's incompatibility with the partition's file system, errors in virtual HDD structures or the like. Although I have not encountered such a problem, I never used anything other than EXT2 / 3/4 for Linux and the typical FAT32 / NTFS file systems for Windows operating systems.
Resize partition
11. In general, unless the PC HDD is actually broken, it is very rare for a virtual hard disk to have a structural problem. Therefore, in most cases, you can safely bypass any error checking by selecting the -sfsck option .
12. When asked how you want to partition, do not select the default option. Instead, select '-k1 Create partition table proportionally' so CloneZilla extends the partitions and file systems as they are copied on the new hard drive and takes up all available space.
13. In the last option, select that you want to turn off the virtual computer with "-pa poweroff Shutdown ' when done.
Start copying
14. CloneZilla will ask a series of questions, and soon, the process of copying the old virtual drive to the new one will begin.
Just like in the process of creating a new HDD, the bigger the drive and the more things have to be copied from the old drive to the new HDD, the longer this process will take.
Change drive
15. When the process is complete, the computer will shut down (if you selected the shutdown option). Select Settings from the main VirtualBox window, access the Storage tab again, and this time erase your old, full drive. Right click on it and select 'Remove Attachment'.
Note that this will not delete the actual file from the actual PC, so you will still have access to everything in case something goes wrong.
16. Now, with a new, larger hard drive as the main drive, you can boot the virtual machine as you normally would. If everything goes according to plan, you should be able to boot and log into your operating system. Check it by typing df in the terminal to see how much free space is available in the HDD.
If the drive was fully displayed again, it was possible CloneZilla could not resize the partitions. Therefore, you can continue to resize them with GParted. In this case, turn off the virtual machine, insert the ISO GParted as you did before with CloneZilla ISO and continue following the instructions.
When you are sure everything is working correctly, you can delete the old HDD file from your real computer to reclaim the space it has taken up.
Do you like the usual way or this unique method to increase your Virtualbox hard drive size? Share your opinion in the comment section below!
Hope you are succesful.
You should read it
- Virtualbox - Download Virtualbox here.
- How to increase MacBook memory capacity
- What is Oracle VirtualBox? What can be done with it?
- Instructions to increase the virtual hard drive capacity on Virtualbox
- How to increase the capacity of Oppo phone memory
- Instructions for speeding up virtual machines in full set
- QEMU or VirtualBox is the best solution?
- Delete automatic messages to increase memory capacity in iPhone
- Instructions to increase storage capacity for Android TV Box
- Is VirtualBox safe or a security risk?
- How to Install VirtualBox on Linux
- How to import and export OVA files in Virtualbox
Maybe you are interested
How to remove driver, delete driver in Windows 10, 11
How to reinstall audio driver on Windows 10, 11
How to update driver on Windows 10, 11
How to Overwrite Deleted Data on a Drive in Windows 11/10
How to Erase and Format External Hard Drive on iPhone/iPad
Fix the error of drive D having a yellow exclamation mark on Windows 11 very quickly