VirtuaBox 7.0.6 - Resizing home partition not possible

This is for discussing general topics about how to use VirtualBox.
Post Reply
Maxrunner
Posts: 6
Joined: 13. Jul 2022, 13:04

VirtuaBox 7.0.6 - Resizing home partition not possible

Post by Maxrunner »

So i just cloned my dvi disk image with clonevdi and also changed its size.
Seems gparted sees the unallocated space but can only use it to resize the bootable partition and not the home one as you can see in the attachments. Is it related to the position of the unnalocated space?
Im using virtuabox 7.0.6 in windows host and mx linux as guest.

If someone can help i would appreciate.
Attachments
virtualbox_resize_3.png
virtualbox_resize_3.png (20.97 KiB) Viewed 4684 times
virtualbox_resize_2.png
virtualbox_resize_2.png (21.94 KiB) Viewed 4684 times
virtualbox_resize_1.png
virtualbox_resize_1.png (50.53 KiB) Viewed 4684 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtuaBox 7.0.6 - Resizing home partition not possible

Post by scottgus1 »

If it's /dev/sda3 "homeMX" that you're wanting to expand (you don't define the "home" partition directly; I had to guess which sda that is from the picture), then it looks like the Linux swap partition is in the way. So getting that swap partition moved or deleted/repositioned looks like the priority.

Please note that moving partitions in Gparted is not in the scope of this forum. The thing CloneVDI did is the same thing as if you cloned a physical PC's disk to a larger disk and adjusted the disk's partition. You'd still have to move the swap partition. Solve this as if the VM were a real PC, using Linux and Gparted web-searches and help channels, then apply the solution to the disk file.

Alternative: CloneVDI's "Increase virtual drive size" option has an "Increase partition size" option. Try making the clone again with the drive size increased but the partition size option opposite of the way you had it the first time. See if Gparted sees the extra drive space on the other side of sda3.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtuaBox 7.0.6 - Resizing home partition not possible

Post by mpack »

I'm afraid CloneVDI will not help in this scenario. For simplicity CloneVDI (with "enlarge partition" option) always assumes that the largest partition is the one that needs to be enlarged further - so it always places the unallocated space right after that partition, which usually makes GParted's job easier.

In this case the partition you want to resize is not the largest partition. You'll have to use native tools to move partitions around as you'd prefer.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtuaBox 7.0.6 - Resizing home partition not possible

Post by fth0 »

I'm not sure why only the swap partition is locked. If you were running GParted from the guest OS, I'd expect at least one of the other partitions being locked, too. If you were running GParted from a Linux ISO, I'd expect the swap partition not being locked. In any case, you could try to temporarily turn off swap (e.g. sudo swapoff) before running GParted, so that you can move the swap partition.

Is the guest OS perhaps in some sort of hibernation state?
Post Reply