Score:0

Ubuntu: Error resizing partition while resizing partition of a Virtualbox VM running Ubuntu (Host is Windows10)

in flag

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:

Virtualbox screenshot

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?

error screenshot

Score:0
in flag

SOLVED

By following this thread, I installed GParted,

sudo apt-get install 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 to 260 GB, set Align to None.

  • 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

df -h

the resized partition is returned among the others.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.