can't resize VB

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
timna
Posts: 5
Joined: 22. Jan 2017, 10:54

can't resize VB

Post by timna »

hi..
i'm on mac os 10.11.4
and i cannt resize my VB..
I had resized if before successfully, but now nothing works..
my virtual-box program is closed.

Error message:

MacBook-Pro-2:~ _____$ VBoxManage modifyhd --resize 30000 /Users/_____/VirtualBox\ VMs/win\ 7/win\ 7.vdi
VBoxManage: error: Error: Attempt to resize the medium from 0.0 MB to 30000.0 MB. Use --resizebyte if this is intended!
Screen Shot 2017-01-22 at 10.58.14.png
Screen Shot 2017-01-22 at 10.58.14.png (116.59 KiB) Viewed 7789 times
thanks!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: can't resize VB

Post by mpack »

timna
Posts: 5
Joined: 22. Jan 2017, 10:54

Re: can't resize VB

Post by timna »

but i have vdi, not vhd.
am i missing something?

what should i do to change the size?


MacBook-Pro-2:MacOS ______$ VBoxManage showhdinfo /Users/_____/VirtualBox\ VMs/win\ 7/win\ 7.vdi
UUID: __________
Parent UUID: base
State: created
Type: normal (base)
Location: /Users/________/VirtualBox VMs/win 7/win 7.vdi
Storage format: VDI
Format variant: dynamic default
Capacity: 40000 MBytes
Size on disk: 25461 MBytes
Encryption: disabled
In use by VMs: win 7 (UUID: _______)
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: can't resize VB

Post by Martin »

timna wrote:MacBook-Pro-2:MacOS ______$ VBoxManage showhdinfo /Users/_____/VirtualBox\ VMs/win\ 7/win\ 7.vdi
UUID: __________
Parent UUID: base
State: created
Type: normal (base)
Location: /Users/________/VirtualBox VMs/win 7/win 7.vdi
Storage format: VDI
Format variant: dynamic default
Capacity: 40000 MBytes
Size on disk: 25461 MBytes
Encryption: disabled
In use by VMs: win 7 (UUID: _______)
The VDI is already at 40 GB, so it's no surprise that a resize to 30 GB doesn't work.
timna
Posts: 5
Joined: 22. Jan 2017, 10:54

Re: can't resize VB

Post by timna »

but the hard drive there have 25 GB..
Size on disk: 25461 MBytes

how can i make it bigger?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: can't resize VB

Post by mpack »

timna wrote:but i have vdi, not vhd.
am i missing something?
Yes, you missed that the OPs early mention of VHD was mistaken, he was actually using VDI, and you missed the workaround of using "--resizebytes". I even gave the size in bytes to use for 30GB.

This "bug" is not yet pinned down. The underlying issue could be many things, including the starting size problem which Martin mentions. If that is the same drive then the quoted drive capacity of 40GB is not wrong, the drive cannot be shrunk to 30GB. Most likely your drive has multiple partitions, only one of which is full. 25GB is the size of the host file, which is not directly related to anything in the guest.
timna
Posts: 5
Joined: 22. Jan 2017, 10:54

Re: can't resize VB

Post by timna »

ok thank you! you are right!
but i have only one partition, and only one virtual device..

I'm on a laptop, so i can't incise the size of the vdi to be 40GB.. I dont have that space to give..
I only want 5 more GB in the hard drive on the virtual device..

Image
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: can't resize VB

Post by mpack »

You certainly have more than one partition on the virtual drive. All standard Win7 installs have at least two, a boot manager partition and the Windows C: volume. Some have a third partition containing recovery data.

In the guest, go to Computer | Manage | Disk Management. This will show you your drives and the current partitions on each drive. If you are correct that you are not using the full capacity of the virtual "disk 0" then you should be able to see unallocated space after the Windows partition.

By the way, I'm not sure what you expect us to say regarding the lack of available space on your host drive. If you want to store 40GB of data inside a VM then you need at least 40GB available on the host. If your guest drive is currently filled to the 25GB mark and you want to store 40GB in the VM then you need 40-25=15GB available on the host. This is basic arithmetic, it is not something you can get around with a VirtualBox setting.

I suggest that you try to free up some disk space in either the host or the guest - or both.
timna
Posts: 5
Joined: 22. Jan 2017, 10:54

Re: can't resize VB

Post by timna »

Thank you!
Post Reply