Page 1 of 1

Resizing a virtual disk - windows host and linux guest

Posted: 17. Jun 2019, 10:29
by thosrtanner
I've read around the forums and managed to resize my main disk.

Except it hasn't.

I've run vboxmanage --resize to increase the size.

Then I've booted a gparted image, and resized the drive to the new size.

However, whenever I boot my main image, the drive still comes up at the old size.

If I look at the drive in the settings page of virtualbox, it shows 'virtual size' as the new increased size, actual size as the old size. And df -k says it's the old size.

I reboot gparted and go to configure the disk, it has the drive fully allocated at the new size, with the yellow band going about half way across the disk and then all white to the end of it.

I did this once succesfully but I'm at a bit of a loss as to how to continue now

Re: Resizing a virtual disk - windows host and linux guest

Posted: 17. Jun 2019, 11:14
by mpack
Hopefully you read the FAQ: How to resize a Virtual Drive.

I suspect the stuff about snapshots is relevant (third post).

Re: Resizing a virtual disk - windows host and linux guest

Posted: 17. Jun 2019, 16:35
by thosrtanner
I definitely started the process out by making a new clone to avoid the snapshot problem (and free up some disk space...)

Re: Resizing a virtual disk - windows host and linux guest

Posted: 17. Jun 2019, 16:51
by mpack
Well, there aren't that many things to understand here.

First, if VirtualBox says that the drive size is X, then the drive size is X. That only leaves: mounting the wrong VDI in the VM, or guest filesystem configuration problems.

Re: Resizing a virtual disk - windows host and linux guest

Posted: 18. Jun 2019, 09:36
by thosrtanner
I found my answer here:https://unix.stackexchange.com/question ... 01d0fd5da6

Worked fine (and without multiple extra reboots too!)

It might be worth adding that to the FAQ?

Re: Resizing a virtual disk - windows host and linux guest

Posted: 18. Jun 2019, 10:54
by mpack
That doesn't seem like FAQ material to me. We don't generally get down and dirty about the specifics of certain guest tools, only about VirtualBox itself.

None of this is VirtualBox specific. In the real world if you transferred a disk image onto a larger drive then you'd meet the same problem: telling your guest OS how to use the new space.

Re: Resizing a virtual disk - windows host and linux guest

Posted: 18. Jun 2019, 18:17
by thosrtanner
gparted is not virtualbox specific either but it's in the faq.

And my setup isn't special. I have a "disk" with 2 partitions, and I expanded the 2nd one. I did this once before with no issue, but the 2nd expansion seemed to need the extra intervention.

Re: Resizing a virtual disk - windows host and linux guest

Posted: 19. Jun 2019, 10:15
by mpack
thosrtanner wrote:gparted is not virtualbox specific either but it's in the faq.
A description of how to use GParted is not in the FAQ. It is simply mentioned as a popular tool to use at that point.

What is in the FAQ is this:
FAQ wrote: Note 1: The only step that VirtualBox is concerned with is step 1. After that you need to seek additional information on the partition manager you wish to use from the vendor of the partition manager.

Re: Resizing a virtual disk - windows host and linux guest

Posted: 20. Jun 2019, 14:10
by thosrtanner
Step 2: Extend the primary partition to include the new drive space.
Download the GParted Live CD
is pretty specific. As opposed to 'Use a partition manager such as GParted'

All I'm asking for a small addition to the faq that suggests you may need to run this extra utiility to get your guest linux O/S to recognise the extra space. Rather than have people hunt round the internet. I understand virtualbox is only concerned with step 1, but this one little extra step is hard to find and fairly important.

Re: Resizing a virtual disk - windows host and linux guest

Posted: 20. Jun 2019, 14:55
by mpack
thosrtanner wrote: All I'm asking for a small addition to the faq that suggests you may need to run this extra utiility to get your guest linux O/S to recognise the extra space.
Which is precisely what the FAQ already does. It's the sole reason there is a step 2 in the FAQ.

I see no value in continuing this ping pong any further. I'm not changing the FAQ, and I'm not expecting you to agree.