[Resolved] Supposedly "dynamic" vmdk file does not resize.

Discussions related to using VirtualBox on Linux hosts.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Resolved] Supposedly "dynamic" vmdk file does not resize.

Post by socratis »

socratis wrote:I'll try it here with a test-clone and see what's going on...
And I did. Win7-32, initial 80 GB, resized to 100 GB:
[quote]
$ VBoxManage showmediuminfo /Users/Shared/VirtualBox/Machines/Win7/Win7.vdi
UUID:           d1469bbd-9c1a-48e4-8478-13b199129df9
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /Users/Shared/VirtualBox/Machines/Win7/Win7.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       81920 MBytes
Size on disk:   14473 MBytes
Encryption:     disabled
In use by VMs:  Win7 (UUID: 1a9b10aa-d9c5-4596-82fb-39a2bb505f9b)

$ VBoxManage modifymedium /Users/Shared/VirtualBox/Machines/Win7/Win7.vdi --resize 102400
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

$ VBoxManage showmediuminfo /Users/Shared/VirtualBox/Machines/Win7/Win7.vdi
...             The rest of the details are the same, cutting them for brevity
Capacity:       102400 MBytes
...             The rest of the details are the same, cutting them for brevity
[/quote]
Option 1: Native
Run your Win7 VM, go to Administrative tools » Computer Management » Disk Management. I have a 100 "System Partition", a 79.90 GB "C:\" partition, and a 20 GB unallocated space. Right-click on the "C:\" partition » Extend Volume... » the default remaining 20480 comes up as pre-selected. Finish the wizard, my "C:\" partition became 99.90 GB. As expected...

Option 2: GParted
Upon starting GParted (gparted-live-0.28.1-1-i686.iso) shows the following partitions:
[quote]Partition      File System    Label              Size          Used         Unused       Flags
/dev/sda1      ntfs           System Reserved    100.00 MiB    24.36 MiB    75.64 MiB    boot
/dev/sda2      ntfs                               79.90 GiB    14.59 GiB    65.31 GiB
unallocated    unallocated                        20.00 GiB           --           --
[/quote]
Right-click on /dev/sda2 » Resize/Move » drag till the end, until you have:
  • Free space preceding (MiB): 0,
  • New size (MiB): 102299,
  • Free space following (MiB): 0.
Hit "Resize/Move", "Apply", "Apply", done. After that, this is what you get:
[quote]Partition      File System    Label              Size          Used         Unused       Flags
/dev/sda1      ntfs           System Reserved    100.00 MiB    24.36 MiB    75.64 MiB    boot
/dev/sda2      ntfs                               99.90 GiB    14.59 GiB    85.31 GiB
[/quote]
I don't really like the message that your "ntfs-3g" is not loaded. No kidding it can't read your NTFS partition, that part is missing, I don't know why. What did you download? From where?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
stevecoh1
Posts: 39
Joined: 6. Mar 2011, 00:10
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP, Windows 7

Re: [Resolved] Supposedly "dynamic" vmdk file does not resize.

Post by stevecoh1 »

I'll be damned. "Disk Management" worked. When I tried it yesterday, I couldn't even see the extra 30GB. Now the thing is enlarged, as I wanted.

Don't know what happened but it's good now.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Resolved] Supposedly "dynamic" vmdk file does not resize.

Post by socratis »

Glad you got it going finally... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply