Thursday, 3 October 2019

linux mint - Increase of virtualbox disk size


I need to increase my disk space in my guest Mint Linux, on a Mac OS host.


First I increased the virtual disk in the host with:


VboxManage modifyhd Mint.vdi --resize 20480

The GUI of VirtualBox Manager confirms: "IDE Primary Master: Mint.vdi (Normal, 20.00 GB)"


However in the guest, sudo fdisk -l gives:


Disk /dev/sda: 8589 MB, 8589934592 bytes

Notes that this is not the partition (not sda1, but sda).


I have read a number of guides for this, but in all of them /dev/sda increased automatically in the guest. How to make sure that the guest OS sees the whole device?


GParted Live does not see the extra space either.



Answer



I still do not know why GParted could not see the whole device. As snapshoe suggested it might because the VM had snapshots.


Trying to remove snapshots after running modifyhd did not succeed.


Here is how it was solved:


I had to create a new virtual disk from within VirtualBox, then clone the old one to the new one:


VBoxManage clonehd Mint.vdi NewMind.vdi --existing

Then I had to disconnect the old disk from the VM, and run GParted to expend the existing guest partition to the whole of the device.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...