Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
Is your VM snapshotted? If using a snapshot, you're VM is only using that .vdi file as a base, and is using a "differencing disk" for the difference between the original .vdi and the snapshot. –  snapshoe Apr 30 '13 at 15:35
    
You are likely to be correct, but I cannot remove the snapshot. When I try to delete it (and merge to the vdi) I only get an error message "VERR_INVALID_PARAMETER", Component Medium, "VBOX_E_FILE_ERROR (0x80BB0004)". The "Details" tab gives now "Mind.vdi (Normal, Inaccessible)", but the VM does start normally. –  Gauthier May 1 '13 at 8:03
    
This might in turn be because I changed the disk size while snapshotted, but I cannot reduce it anymore with modifyhd. I get "VBOX_E_NOT_SUPPORTED". –  Gauthier May 1 '13 at 8:05

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.