In this article, we cover how to increase the size of a Virtual Machine’s Disk in VirtualBox.
Through Virtual Machines (or, VMs) we can run an Operating System in an application. These are mainly used to test applications or run software that otherwise won’t run in our host Operating System. Different versions of application software are available for different Operating Systems.
At times, we need a specific version to get our work done. And, it isn’t available for our host Operating System. So, instead of installing a different Operating System, we have the option to use a Virtual Machine that contains the required Operating System and application software. It is just one case we have discussed where one may find Virtual Machines quite useful.
We have to estimate the size of the Virtual Machine’s disk initially. But, as we continue to use Virtual Machines it may require space that could be larger than what we initially anticipated. In that case, we have to increase the size of our Virtual Machine’s Disk.
How to Increase Virtual Machine’s Disk Size in VirtualBox?
Follow the Steps mentioned below to increase Virtual Machines’ Disk Size.
- Launch VirtualBox.
- Press Ctrl+D to open Virtual Media Manager. Alternatively, we can go to Menu Bar: File –> Tools –> Virtual Media Manager.
- On the Right side, select the Hard Disks tab. From here, click on the Disk which you would like to expand. For instance, for us, it was Ubuntu.vdi
- After that click on the Attributes tab available just below it. From here, either use the slider or manually enter the number to increase the Virtual Machine’s Disk size.
- Lastly, don’t forget to Apply the changes made.
At this stage, we also need to manage disk partitions in our Virtual Machine. If you are using Linux guest Operating System then use GParted.
Note: Take a backup as making changes to the partition can result in data loss. Also, the following operations require Administrative Rights.
In Ubuntu, we can install it through the following commands:
sudo apt update sudo apt install gparted
Launch GParted, and select the disk. From here, you would see the additional unallocated space. Increase the size of an existing partition or create a new partition. That entirely depends on why you chose to increase the size Virtual Machine’s disk initially.
If you wish to increase partition size then select the partition and click Resize/Move. Use the slider or enter the size manually. And, click on Resize button. Don’t forget to apply the changes: Menu Bar: Edit –> Apply All Operations.
On the other hand, if it’s the new partition you wish to create. Then, right-click on Unallocated Space –> New. This would create a dialog box from where we can create a partition.
In conclusion, it is always good to keep a tab on the disk space. And, when it is needed we can increase the Virtual Machine’s Disk size.
If you have volume group disk configuration then, How to extend the size of a Logical Volume.