Page 1 of 1
Resize Win7 virtual disk
Posted: 10. Nov 2015, 11:50
by beckwith
I've looked and read..
I tried this...
/win # vboxmanage modifymedium disk win7.vmdk --resize 50
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize medium operation for this format is not implemented yet!
The partition size will allow the increase, but how tdo I make the virtual disk bigger?
Re: Resize Win7 virtual disk
Posted: 10. Nov 2015, 13:28
by mpack
Resizing of VMDK is not supported. In any case 50MB would be a rather small disk - you certainly won't fit Windows 7 on that.
I think your best solution is to
RTFM before you do some damage. Speaking of which, I assume you backed up this VM before trying something this potentially catastrophic. And hopefully you also saw the FAQ:
How to resize a virtual drive.
Re: Resize Win7 virtual disk
Posted: 11. Nov 2015, 02:39
by beckwith
Thanks. I did RTFM - but the line reading
vboxmanage modifyhd <name> --resize <size>
is almost invisible: pale grey on white background: you have to look
twice to even see that there are any characters there.
BTW Windows 7 Pro + Office Pro all fit in < 25GB.
Re: Resize Win7 virtual disk
Posted: 11. Nov 2015, 03:01
by beckwith
Still does not work...
/home/beckwith # cd /win
/win # vboxmanage modifyhd win7* --resize 48
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize medium operation for this format is not implemented yet!
/win #
The file is actually called "win7.vmdk".
Re: Resize Win7 virtual disk
Posted: 11. Nov 2015, 03:27
by Perryg
I have high lighted what you are failing to see. You can not shrink and using --resizing 48 is = 48MB total. Not to mention that the storage you have selected is vmdk which is not going to work as stated below.
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. 3 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
Your only option is to convert the storage to VDI and then use the appropriate size.
hint: If you want 48GB then the resize value would be --resize 49632
Re: Resize Win7 virtual disk
Posted: 30. Nov 2015, 17:07
by pinux
I have VirtualBox 5.0.1 on a Linux machine (OpenSUSE 13.1).
The guest system, XP SP3, is installed on a 19,23 GB dynamical vdi-disk (primary master, normal). More there is a secondary master (30 GB, vdi), which by the way is not recognized by WinXP.
The free space on the vdi-disk is now become to short. Furthermore a special software requires at least 10 GB free space on the Windows partition.
So I must increase the vdi-disk capacity.
I red the items
Resize Win7 virtual disk
and
How to resize a Virtual Drive
(since this is my first post here, it's not allowed for me yet to post urls)
but I have some questions yet:
1. About the command line
Code: Select all
VBoxManage modifyhd <absolute path to file> --resize <size in MB>
Where I have to enter it? In a Linux console (as admin / root?) ?
2. About
extending the primary partition to include the new drive space
Where should the PartitionManager (i.e. GParted) run ?
In the guest system WinXP?
Thanks a lot for any helps
Re: Resize Win7 virtual disk
Posted: 30. Nov 2015, 17:40
by Perryg
1) VBoxManage is supposed to be run in user space so no sudo, su, or root needed and it is run in the host terminal.
2) You put the Gparted iso in the guests virtual CD/DVD drive so that it boots the guest then proceed to expand the primary partition.
Re: Resize Win7 virtual disk
Posted: 14. Jul 2016, 04:28
by Nandu
Resize a VirtualBox guest Linux VDI Disk under Windows Host
My Linux VirtualBox guest OS often runs out of space – I never learn that to build anything in Linux, you need about 10 times the amount of space that you think you need. Also, VirtualBox recommends very small default values, so it is easy to be caught out.
Anyway, here are the current steps to re-size a VirtualBox disk, where Linux is the guest OS and Windows is the host OS.
In this example I am using VirtualBox 4.2.6 (The approach is valid with more recent versions also). The host OS (the one that is running VirtualBox) is Windows 7 and the guest OS that I wish to re-size is Ubuntu. Please backup everything before continuing as something could always go wrong.
Step 1. (Optional) Move the VDI file in Windows
If you need to move the VDI file to another location/physical drive with more space, you can do the following.
• With VirtualBox shut down, using Windows Explorer move your vdi file (e.g., “c:\MyLinux.vdi“) to its new location (e.g., “d:\MyLinux.vdi“)
• Start Oracle VM VirtualBox Manager -> choose File-> “Virtual Media Manager”
• Under the “Hard drives” tab, choose your disk (e.g. “MyLinux.vdi“) and press the “Release” button at the top.
• Now with the disk selected press “Release” (this should remove the last location)
• Close “Virtual Media Manager”, choose your VirtualBox instance (e.g. MyLinux which should say “Powered Off” underneath) and press the “Settings” button at the top.
• Press”Storage” on the left-hand side, and under Controller remove the current drive by pressing the red minus. Then Press the + with the hard drive platters.
• It should ask “You are about to add a virtual hard disk to the controller IDE Controller”, pick “Choose existing disk” and browse to the location to which you moved your VDI image (e.g. “d:\MyLinux.vdi“). Press “OK”
• Check that your image boots before you go any further.
Step 2. Resize the VDI file
• Shut down VirtualBox again.
• Make a copy of the VDI file – just in case (“MyLinux.vdi” -> “MyLinuxCopy.vdi“)
• Go into the Windows command prompt (Start->type “cmd” into the box)
• cd to the location of the VDI file that you wish to resize, e.g., “d:\MyLinux.vdi“
• At the Windows command prompt, type:
D:\>VBoxmanage modifyhd MyLinux.vdi --resize 100000
this will re-size the drive to 100 GB. Pick a value that suits you. Note, your vdi file will not change in size at this point. The output should look like:
D:\>VBoxmanage modifyhd MyLinux.vdi --resize 100000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
D:\>
Unfortunately that was the easy part!
NOTE: You only can increase size, cannot decrease disk size. Eg: If Mydisk.vdi is 8GB to increase 2GB you have to say 10GB.