Increase disk size in an established VirtualBox Centos VMs

Now, this is something supposedly easy right?

I’m recently in the process of setting up a local CI/CD pipeline and after finishing installation of harbor, I noticed I had 150MB of disk space left. No biggy right, lets increase the disk space as it says in VirtualBox documentation;

Open Virtual Media Manager,

And then choose a disk partition, and roll the slider around to get what you want.

If it were so easy

You have to actually see the disk space in centos first to expand to it. Hence, we have to download a tool from ubuntu called gparted:

And then mount the .iso to our image storage, run as default with all default settings. Choose a language and type nothing else, just press enter.

Eventually you will come to this screen. Here you can change the partition by dragging the yellow area (mine is all yellow because I already did) and then by pressing the green tick that will become available. After that close the vm, unmount the iso and then restart.

Done? No.

When you restart you machine, have a look at the volumes. You should finally be able to see something like this.

vgdisplay -v


Also this; Our actual Centos installed partition.

We need to expand this

So to expand our original partition. We use the following commands.

lvextend -l +100%FREE /dev/centos/root
xfs_growfs /dev/centos/root




Let’s talk devops, automation and architectures, everyday, all day long.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why Am I Studying CS?

Atomicast — A new category of pods

Kubernetes Helm

Java 8 | String Method Practice 3

01coin Project Update: January 29, 2019

Student’s story: Ross — from beginner to a job in Madrid

Specflow Part 4 — integration with Selenium

XCM Part II: Versioning and Compatibility

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yiğit İrez

Yiğit İrez

Let’s talk devops, automation and architectures, everyday, all day long.

More from Medium

Unimus Backup Exporter

Running OpenSSH in Windows PowerShell


What happens when I type in my browser and hit enter