Page 1 of 1

Problem resizing vdi virtual hard drive

Posted: 1. Nov 2020, 13:47
by edufissure
Hello, i have a vdi virtual hard disk with 120 Gb for my windows10 virtual system. Now as i use more than 100Gb i need to resize the disk to 180gb

So i did it with the virutal media:
Selection_459.png
Selection_459.png (119.93 KiB) Viewed 3921 times
But logically when i enter in my windows 10 guest system the size is still the same. I had to partitioning and resize the virtual disk.

so i boot gparted and i found this:
Selection_461.png
Selection_461.png (83.52 KiB) Viewed 3921 times
So what im missing or what can i do to resize my virtual hard drive
Selection_458.png
Selection_458.png (95.08 KiB) Viewed 3921 times
Any help would be apreciated...

pd: i follow this tutorial https://www.howtogeek.com/124622/how-to ... or-vmware/.. i should have the c:/ disk with allocated memory till the 180 gb ( new size)

Re: Problem resizing vdi virtual hard drive

Posted: 1. Nov 2020, 15:23
by scottgus1
You were on the right track with Gparted: After increasing the VDI's final allowed size in Virtualbox, you then have to expand the partitions inside the disk's file system to make use of the new space.

I'm not certain why Gparted did not see the new space. However, the guest OS Windows 10 has its own partition manager, Disk Management. Bout the guest, then web-search how to use Disk Management to increase the main partition.

Re: Problem resizing vdi virtual hard drive

Posted: 1. Nov 2020, 16:06
by fth0
scottgus1 wrote:I'm not certain why Gparted did not see the new space.
GParted would show the new space, if everything were correct. I think the root cause of the problem is visible in the first screenshot of the initial post: It's probably a bad idea to resize only the base disk of a disk with snapshots ...

Re: Problem resizing vdi virtual hard drive

Posted: 2. Nov 2020, 11:38
by edufissure
What should i do ? I followed a tutorial....
By the way i think that vbox has to explain better snapshots..
So this is my virtualbox.... id like to delete the snapshots. But im afraid id turn back in time if i delete the last snapshot. Dont know if i delete one snapshot, the other that come from that one are deleted too ( as a tree, some kind of recursive). Id only maintein the last snapshot, or the actual system.

Perhaps id have to do it using terminal and not virtual media ( resize the hard disk)

Thanks in advance
Selection_464.png
Selection_464.png (110.33 KiB) Viewed 3901 times

Re: Problem resizing vdi virtual hard drive

Posted: 2. Nov 2020, 13:48
by fth0
edufissure wrote:By the way i think that vbox has to explain better snapshots..
The details are described in several chapters of the VirtualBox User Manual, especially in 5.5. Differencing Images. What do you think should be explained better?
edufissure wrote:I followed a tutorial....
If you ask different people (VirtualBox forums, a tutorial) and there are different possibilities what to do, then you get different answers.
edufissure wrote:What should i do ?
First of all, make a backup of all files, if anything goes wrong. If I understand you correctly, and you only want the latest state, then proceed as follows. Delete the oldest snapshot from within the VirtualBox Manager. This will merge the contents of the two oldest VDI files together. Then repeat this step until there are no snapshots left. Afterwards, you'll have only one VDI file, and you can than enlarge it as discussed before.

Re: Problem resizing vdi virtual hard drive

Posted: 3. Nov 2020, 13:57
by edufissure
Well i think that is not clear than what do you have to delete, the middle imagees or the last one ?

So i have to do it from virtual media ?
You mean, First of all
https://imagebin.ca/v/5g4KbrDnHrmY
and then
https://imagebin.ca/v/5g4KK3qK3kTO

Or should i do something like :
Selection_467.png
Selection_467.png (109.5 KiB) Viewed 3871 times
or should begin by the first snapshot:
Selection_468.png
Selection_468.png (115.54 KiB) Viewed 3871 times
So using the Setup of the VM or the virtual media manager. And then begin from the last one or the first one....

Thanks in advance

pd: you were right i want to delete useless snapshots and leave only the last one.....

Re: Problem resizing vdi virtual hard drive

Posted: 3. Nov 2020, 18:52
by fth0
edufissure wrote:Well i think that is not clear than what do you have to delete, the middle imagees or the last one ?
Well, it doesn't really matter, you can delete all snapshots that you don't need any more, in any order. You have a base image and several differencing images, and the newest image is the only writable image. All other images are read-only, and each one of these is associated with a snapshot (including the base image). If you delete a snapshot, the corresponding image is merged with one of its neighbors, and if you delete all snapshots, in the end all images are merged together.

You should use the Snapshots view of the VM in the VirtualBox Manager. And I already suggested to start with the oldest snapshot (although it doesn't matter), because then it's more difficult to accidentally delete the current state.

Re: Problem resizing vdi virtual hard drive

Posted: 15. Nov 2020, 13:10
by edufissure
I solved the problem cloning the VM. So cloning gets vdi disk with no snapshots. Only one virtual disk.
Then used as said in tutorial Gparted ISO to resize the unused partition, and merge with my original partition. So i get 180gb virtual drive.
Then deleted the origin VM ( after testing that the cloned one worked as expected, with the new virtual disk size).

Thanks

Re: Problem resizing vdi virtual hard drive

Posted: 16. Nov 2020, 17:33
by scottgus1
Great! Glad you kept up the hunt and found a solution.