Home Tutorials How to Increase VM Virtual Disk Space on VirtualBox and VMware

How to Increase VM Virtual Disk Space on VirtualBox and VMware

Using VMware or Virtual machines to run another operating system or server is very popular and convenient among Linux and Windows users. We might need to run an OS on our current system to test, check, or experience the OS in many cases. No matter what the reason is, you can set up and customize the configurations of the VM virtual machines. Using Oracle’s VirtualBox and VMware, you can increase VM virtual disk space, RAM, CPU core, and other parameters.

Prerequisite To Increase VM Virtual Disk Space


Installing the virtual machine or the VMware is a prerequisite for this post. I assume you have the virtual machine loaded and the hypervisor set up. If you do not know how to install the VMware or the Virtual machine on Linux, please go over this post to learn everything about Virtual machines.

Increase VM Virtual Disk Space


Different VM Virtual tools offer features to users in different methods. In the race of operating system virtualization, Oracle’s Virtual Machine and VMware’s Workstation Player are the most used and utilized tools for Linux. VirtualBox and VMware are both famous in the section of virtualization; they all have their UI designed for better usability.

When we install the VM tools on our system, we can go with the default settings and configurations to start the hypervisors. Later, we can increase the system parameters. This post will see GUI and CLI methods to increase VM virtual disk space.

1. Increase Disk Space of VirtualBox


To increase the disk space of a VirtualBox in Linux, we will now use the graphical user interface method. Conventionally when we install the VirtualBox and run an operating system, it offers you to create a 10 GB or higher volume of disk space automatically on the system.

Most people go with the default settings, as it works fine. But, if you need to increase the disk space, what to do? Here we will see the step-by-step process.

Method 1: GUI Method To Increase Disk Space of VirtualBox


Here, we will see the graphical user-interface method to increase VM virtual disk space on VirtualBox. Later, we will see the CLI method as well.

Step 1: Open Virtual Media Manager

The virtual media manager is the main center from which section you can manage and increase the disk space, RAM size, and CPU cores. On the very beginning page of the VirtualBox, you will find the Virtual Media Manager setting under the File section.

virtual media manager to Increase VM Virtual Disk Space

Step 2: Select the Hypervisor and Resize Disk Space

If you’ve more than one virtual machine installed on the VirtualBox, you might need to select the desired hypervisor from the VM’s menu. Here, as you can see, I have only one hypervisor, so the default OS is selected already.

Step 3: Finalize the Disk Space

In this step, we will need to put the new value of the disk size to increase VM virtual disk space. You can either put the value on the box as shown in the below-mentioned image; or drag the value from the size bar. Finally, click on the Apply button to increase the disk space on the VM virtual machine.

Finally, in the below image, you can see that the disk space is now increased from 10Gb to 12GB.

Method 2: Increase VirtualBox Disk Space Using the Linux Command Line


If you face any issues while increasing the VM virtual disk space via the GUI method, here is a CLI-based method that you can apply to your Linux machine. In Linux, you can execute the below-mentioned command on the shell with sudo privileges to increase the VM disk space.

VBoxManage modifymedium "/path_to_vdi_file" --resize <megabytes>
VBoxManage modifymedium "/media/ubuntupit/26AAD233AAD1FF6D/Linux VM/UbuntuPIT OS.vdi" --resize 12800

In the above command, we have used the name of the VM hypervisor and the path where it is located. If you do not put the VM name and the path correctly, you might face errors.

To see the actual name of the VDI file, please go to the SATA Port details from the home page of the VirtualBox.

If you don’t know where the VDI file is located for your VM VirtualBox, you can check it on the VirtualBox tool. Open the VirtualBox and go to the General setting tab under the File section. You can now get the path address of the VirtualBox DVI from the Default Machine Folder section.

2. Increase VM Virtual Disk Space on VMware


Here, we will see how to increase the disk space on the Vmware pro workstation on Linux. Using VMware is easier than VirtualBox because it provides you with a ready-to-go hypervisor. If you do not have VMware installed on your Linux system, please visit the official website of VMware and download the bundle package on your system.

To install the VMware tool, you can now execute the below-mentioned command on your Linux terminal shell.

chmod a+x VMware-Player-Full-16.2.3-19376536.x86_64.bundle
sudo ./VMware-Player-Full-16.2.3-19376536.x86_64.bundle

Step 1: Open Vmware To Increase Disk Space on VMware

If you’re using VMware, the methods of increasing the disk space are a bit different than the VirtualBox. You will need to have the VMware installed and the hypervisor created on the Linux system. Here we will see the graphical user-interface method of expanding the disk size on a VMware on Linux.

After installing the VMware, we will now directly open the VMware. Let’s assume that we have the hypervisor already configured. You can run the below-mentioned command on the shell to check the disk lists.

$ df -h

After opening the VMware virtual machine, right-click on the hypervisor’s name and go to Hardware properties. Now, you will find the allocated disk size under the Hard Disk section.

Step 2: Increase Disk Size on VMware

Finally, to increase the disk space, click on the Expand Disk from the bottom of the hardware section.

Then put the desired value you want to put and click on the Expand button. That’s it! You’re all done; your VM disk space is now expanded.

3. Resize Disk Size with GParted


No doubt, the GParted is one of the greatest tools for partitioning disks in Linux. If you have the GParted tool on your VM Virtual machine, you can use this tool for resizing the disk space. In that case, you will need to have some free or unallocated disk space to increase VM virtual disk space.

If you do not have the GParted installed on your system, use the below-mentioned command to get it on the system.

sudo apt install gparted

Now, open the GParted tool and right-click on your VMware disk. Then click on the Resize/Move button. Now, drag the bar to add more space to your VM machine’s disk. You can also put the disk size on the New Size box.

Finally, click on the Resize button and proceed with the root password. It will take a while to load the disks and apply the changes.

Insights


It is highly recommended to take the backup of your necessary files from the VM before you start to Increase VM virtual disk space. In the entire post, we have seen how you can get started with the virtual machine and how to increase the disk space on both VirtualBox and VMware on Linux.

If you’re an expert Linux user, you can also increase the disk space without the LVM. The GParted disk tool allows you to resize the disk as well.

If you find this article has been useful for you, please do not forget to share this post with your friends and the Linux community. We also encourage you to write down your opinions in the comment section regarding this article.

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Exit mobile version