I am trying to resize (from 20 to 270 GB) the hard disk of a Ubuntu OS running inside a VM (Virtualbox) that runs on Windows 10.
By following the instructions in this thread , I have with powered off my VM and run on my Windows 10 Powershell:
C:\Users\Bob> C:\"Program Files"\Oracle\VirtualBox\VBoxManage.exe modifyhd C:\Users\Bob\"VirtualBox VMs"\Tommaso_Ubuntu01\Tommaso_Ubuntu01.vdi --resize 270000
and I sussessfully get
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
so that when I check the settings of my VM on my Virtualbox panel I see:
then I go on following the steps in the thread: I start my VM, go to
Applications (square of 9 points in the bottom bar) > Disks > Hard Disk (left side bar)
then
select Partition 3
(the partition that I previously sized to 21) > gears button > resize > set partition to 270 GB
but I get:
Error resizing partition
error resizing partition /dev/sda3: Failed to partition size on device
'/-dev/sda/' (Unable to satisfy all constraints on the partition.)
(udisk-error-quark,0)
What's the problem? How can I solve it?
Best Answer
SOLVED
By following this thread, I installed GParted,
a pop-up opened up asking if I wanted to fix the unallocated free space (that I gof from the operation on powershell) > answered
don't fix
selected the
partition3
(that I previously allocated to 20GB)resize the selected partition:
set
new size
to260 GB
, setAlign
toNone
.clicked
apply all operations
the same pop-up of before popped up, and this time I answered with
fix
.The operation finished and I verified this time the VM got the change:
by tiping
the resized partition is returned among the others.