Resize medium operation not implemented?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
DevFingers
Posts: 36
Joined: 4. Jan 2015, 03:01
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10, CentOS, Windows95 (jk)
Location: New Brunswick, Canada

Resize medium operation not implemented?

Post by DevFingers »

Yosemite 10.10.5
VB 5.0.4 r102546
VM is Windows 8.1

I'm trying to resize my vdi to a smaller size.

Currently 127 GB, and need to make it 80 GB
I followed all the other posts I could - cleaned up the drive in the VM - zeroed out the empty disk space
I compacted the disk via:

Code: Select all

VBoxManage modifyhd {e6c03334-2be4-4aff-93b0-467bb33f7343} --compact
The disk size was 121 GB and now, disksize is just under 50 GB.

and now I want to resize the same; I want to make the Virtual Space 80GB, so I attempted:

Code: Select all

VBoxManage modifyhd {e6c03334-2be4-4aff-93b0-467bb33f7343} --resize 80000
But I get the error:

Code: Select all

0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize medium operation for this format is not implemented yet!
So what are my options? Did they take this feature away? Some of the posts I read were from 2011 on earlier versions - and posts from this year...

Any help appreciated.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Resize medium operation not implemented?

Post by mpack »

DevFingers wrote: I'm trying to resize my vdi to a smaller size.
Not supported, due to the obvious dangers.

If all you are trying to do is limit disk size expansion then just (a) zerofill and compact the disk, then (b) shrink the partitions using GParted or whatever. A guest OS cannot use unpartitioned space.

The goal of those two steps is to ensure that no data is stored in unpartitioned areas after the partitions have shrunk, because those areas will no longer be accessible to compaction. An alternative would be to shrink the partition(s) and then move them to a smaller VDI using your favorite disk image backup/restore tool.
DevFingers
Posts: 36
Joined: 4. Jan 2015, 03:01
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10, CentOS, Windows95 (jk)
Location: New Brunswick, Canada

Re: Resize medium operation not implemented?

Post by DevFingers »

I understand, so thanks for the suggestions. But that the process is 'dangerous', is faulty in its logic. Following that through, we wouldn't have the delete command; delete files, delete directories, delete *.*, drop table, drop database, remove partition, format, etc, etc...

Your suggestion will work, but I'd suggest to add this functionality in.

Thanks!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Resize medium operation not implemented?

Post by mpack »

Not a valid comparison, IMHO. If you type "delete <file>" then you intended to delete the file. If you shrink a disk then you may not be aware that data stored near the end of the drive will be lost. People make all kinds of strange assumptions about how things work.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Resize medium operation not implemented?

Post by loukingjr »

DevFingers wrote:But that the process is 'dangerous', is faulty in its logic. Following that through, we wouldn't have the delete command; delete files, delete directories, delete *.*, drop table, drop database, remove partition, format, etc, etc...
Speaking of "faulty logic", the fact there are other possible dangerous behaviors doesn't mean all dangerous behaviors should be allowed. Whether it's about computers or anything else.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply