Resizing a virtual disk - windows host and linux guest

Discussions about using Linux guests in VirtualBox.

Resizing a virtual disk - windows host and linux guest

Postby thosrtanner » 17. Jun 2019, 10:29

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
thosrtanner
 
Posts: 7
Joined: 18. Feb 2019, 10:52

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

Postby mpack » 17. Jun 2019, 11:14

Hopefully you read the FAQ: How to resize a Virtual Drive.

I suspect the stuff about snapshots is relevant (third post).
mpack
Site Moderator
 
Posts: 29831
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby thosrtanner » 17. Jun 2019, 16:35

I definitely started the process out by making a new clone to avoid the snapshot problem (and free up some disk space...)
thosrtanner
 
Posts: 7
Joined: 18. Feb 2019, 10:52

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

Postby mpack » 17. Jun 2019, 16:51

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.
mpack
Site Moderator
 
Posts: 29831
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby thosrtanner » 18. Jun 2019, 09:36

I found my answer here:https://unix.stackexchange.com/questions/305880/available-space-not-changing-when-resizing-the-partition?newreg=8fad9cf793224f44b50bb501d0fd5da6

Worked fine (and without multiple extra reboots too!)

It might be worth adding that to the FAQ?
thosrtanner
 
Posts: 7
Joined: 18. Feb 2019, 10:52

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

Postby mpack » 18. Jun 2019, 10:54

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.
mpack
Site Moderator
 
Posts: 29831
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby thosrtanner » 18. Jun 2019, 18:17

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.
thosrtanner
 
Posts: 7
Joined: 18. Feb 2019, 10:52

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

Postby mpack » 19. Jun 2019, 10:15

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.
mpack
Site Moderator
 
Posts: 29831
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Postby thosrtanner » 20. Jun 2019, 14:10

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.
thosrtanner
 
Posts: 7
Joined: 18. Feb 2019, 10:52

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

Postby mpack » 20. Jun 2019, 14:55

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.
mpack
Site Moderator
 
Posts: 29831
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 15 guests