After reading up on the modifyhd command it's quite clear that shrink is not supported.
The --resize x option (where x is the desired new total space in *megabytes*) allows you to change the capacity of an existing image; this adjusts the *logical* size of a virtual disk without affecting the physical size much.[ 39 <https://www.virtualbox.org/manual/ch08.html#ftn.idp45859075839952>] This currently works only for VDI and VHD formats, and only for the dynamically allocated variants, and can only be used to expand (not shrink) the capacity. For example, if you originally created a 10G disk which is now full, you can use the --resize 15360 command to change the capacity to 15G (15,360MB) without having to create a new image and copy all data from within a virtual machine. Note however that this only changes the drive capacity; you will typically next need to use a partition management tool inside the guest to adjust the main partition to fill the drive. So it seems like I'm stuck with my to large disks :-( A scenario I'm thinking of is to create new smaller disks and try to clone the older drive to the newly created. Do you know if such an operation is supported? /Leslie 2015-10-28 13:11 GMT+01:00 Cliff Scott <flyer...@gmail.com>: > Which version of VBox are your using? > > VBox 5.0.4 specifies that —resize takes an argument in Megabytes. It > looks like you are asking for 32.768 GB size. Is that what you really want? > > Box 5.0.4 seems to say that your command line: "VBoxManage modifyvdi > Windows_7_Ultimate_64_bit.vdi --resize 32768” should work IF your VDI is > dynamically allocated, but, as Christoph said, the preferred usage is to > use modified. > > Since it is complaining about the format maybe your VDI is not dynamically > allocated? > > Another thought, you said that you had already shrunk Win7 inside the VDI, > maybe you really want to just compact the VDI on disk. > > Cliff > > On Oct 28, 2015, at 5:49 AM, Leslie Jensen <jensen.les...@gmail.com> > wrote: > > Thanks for answering. > > It's actually now "modifymedium" which I also tried with the same result > :-( > > I'm in the actual folder so there's no need for a path. > > > Leslie > > > > 2015-10-28 11:27 GMT+01:00 Christoph Schmees <c...@gmx.net>: > >> Am 28.10.2015 um 10:11 schrieb Leslie Jensen: >> > Hi. >> > >> > I've tried this: >> > >> > VBoxManage modifyvdi Windows_7_Ultimate_64_bit.vdi --resize 32768 >> > >> > And it returns a >> > >> > Progress state: VBOX_E_NOT_SUPPORTED >> > VBoxManage: error: Resize medium operation for this format is not >> > implemented yet! >> > >> >> replace 'modifyvdi' (where did you get that from??) by 'modifyhd'. >> And AFAIR you have to specify the complete path to the VDI file and >> enclose it in "". >> >> hth, Christoph >> > > _______________________________________________ > VBox-users-community mailing list > VBox-users-community@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vbox-users-community > _______________________________________________ > Unsubscribe: mailto:vbox-users-community-requ...@lists.sourceforge.net > ?subject=unsubscribe > >
------------------------------------------------------------------------------
_______________________________________________ VBox-users-community mailing list VBox-users-community@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vbox-users-community _______________________________________________ Unsubscribe: mailto:vbox-users-community-requ...@lists.sourceforge.net?subject=unsubscribe