How to expand partition of expanded Virtual Drive (VDI)?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

Hi, all...

I have successfully expanded the virtual size of my virtual disk (VDI file) on my Mac host from 41GB to 80GB, according to the Virtual Box Manager window. I'm using VirtualBox 4.3.12. Actual size is reported as 23GB, which I want to increase. I understand I need to extend the partition. However, when I use the Windows Disk Management utility, it still shows total disk size of 41GB, not 80GB, so can't use that, unless I'm missing something.

Which partitioning program can I use to expand my C and D partitions without data loss? I had very bad luck trying to download Gparted. Too much freeware, confusing download, plus viruses were detected. I may have a copy of Partition Magic lying around. Would need to know minimum version that would work, and any other programs you could suggest. Thx

Steve
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

OK, I was able to boot from GParted, but it still shows only 41GB available. How do I get it to recognize the new 80MB virtual disk size?
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

By the way, I have a snapshot. I read that my current version of VirtualBox supports expansion when snapshots are present, but might the snapshot be the reason why Gparted is not recognizing the new VDI size? Should I delete the snapshot? Thx
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

I had to search some past threads to see what the answer to your question was. First, if you have a backup of the VM in question I would restore the guest from the backup and follow the instructions on how to resize a .vdi from scratch.

If you don't have a backup of the VM, make one in case. Since you do have a snapshot I believe what you have to do is resize the snapshot and increase the partition size of that.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by mpack »

Resizing a disk which uses snapshots is not recommended for non experts.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

I should have mentioned that. :)

I think since I'm not doing anything important I am going to recreate the OP's situation.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

I'd like to keep this simple. Can I just delete the snapshot and then resize again? Or must I restore from the backup that I took before the resize, delete the snapshot, and then resize? If I must use the backup, can I just exit VirtualBox and rename the backup so that it has the name the Virtual Box expects? Thx
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

You didn't mention if you backed up the entire VM or just the .vdi. It makes a difference on how you restore.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

I backed up just the .vdi file while the VM was shut down.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

then all you have to do is replace the .vdi with the backup.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

OK, then should I restore the backup, then delete the snapshot, then try to resize again? Then should Gparted be able to recognize the new free space and expand the C partition? Thx
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

if you delete the Snapshot from the VB Snapshot tab then it will merge any changes you made since you created the snapshot. Then resize the .vdi. Once you do that, you should be able to use Windows Disk Management. If you just throw away the Snapshot you would lose any changes since it was created.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
sfogel
Posts: 11
Joined: 7. Jul 2014, 03:58

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by sfogel »

OK, this all worked out fine. Many thanks for the help. I had to use GParted to expand the C: (boot) volume.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: How to expand partition of expanded Virtual Drive (VDI)?

Post by loukingjr »

glad it worked out.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply