![]() |
|
16 Mar 2012 | #1 |
|
How to resize a Virtual Hard Disk in VirtualBox
You can use the following link to resize your virtual hard disk:
Trivial Proof: Resizing a VirtualBox Virtual Hard Disk Tips: 1. For a dynamic size virtual hard disk, you can just use the VBoxManage modifyhd --resize command, as explained in the link. 2. For a fixed size virtual hard disk, you must first clone the virtual hard disk, and then resize the clone, as explained in the link. When you clone a fixed disk, the clone is a dynamic sized disk by default. Emphasize: You cannot just resize a FIXED size virtual disk. 2a. You can then replace the original virtual hard disk with the clone in the settings for the virtual machine in: In the VirtualBox settings for the virtual machine (Settings --> Storage --> Controller for the .vdi file --> click the round disks button in the top right to choose which .vdi to boot from). 2b. You can then go to: In the main VirtualBox window, File --> Virtual Media Manager, and delete the old .vdi file (Remove option). Note: When you resize, the number you give to the command is in megabytes, so in my case I wanted to resize from 8 GB to 12 GB, so I used --resize 12288. 3. If the host is Windows, here are some tips: - Use Windows Explorer to go to the folder that contains the .vdi file to work on. - Hold down the shift key, right click, and choose Open Cammand Window Here. - When using VBoxManage, all paths and file names that contain spaces must be enclosed in quotations. - For example, in my case I had to use: - "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd "Ubuntu 11.10 64 bit.vdi" "Ubuntu 11.10 64 bit clone.vdi" --existing - The same applies for the VBoxManage modifyhd --resize command. 4. If you are cloning linux, and then resizing, and then using GParted afterward, as explained in the link, here are some tips: - In my case, I had a swap partition. What I did was to delete the swap partition, resize my cloned partition (leaving enough space to add the swap back again afterwards), and then added a new swap partition at the end of the virtual hard drive. I found this the easiest way to do it. 5. For cloning, there's an option for it in the Virtual Media Manager (Copy option, I guess), but I didn't try it yet. That might be easier, as I've read online. I hope these tips are helpful. |
My System Specs![]() |
. |
|
16 Mar 2012 | #2 |
![]() |
There is a utility that can do this sort of thing via a GUI. CloneVDI
|
My System Specs![]() |
16 Mar 2012 | #3 |
|
I checked out the link. Looks good. After the clone I think you still might need to use GParted, though. I'm not sure. Any thoughts on that?
|
My System Specs![]() |
. |
|
16 Mar 2012 | #4 |
![]() |
Yes you would have to resize the partitions but I guess you would have to do that with VboxManage. How successful that would be would depend on the OS. I have had problems with Linux not recognizing that a disk had increased in size.
|
My System Specs![]() |
16 Mar 2012 | #5 |
|
I think that's what using GParted does. After I had cloned, then resized the clone, I used GParted to increase the new clone size in the partition within the virtual disk. When you clone, and then resize, it just increases the size of the virtual disk, not the partition containing the virtual OS. GParted lets you increase the size of the OS partition inside the virtual disk. Before using GParted, when I booted the clone, System Monitor showed the same size as the original. But after using GParted, the new size was reflected in the clone.
|
My System Specs![]() |
17 Mar 2012 | #6 |
![]() |
Yes. I think the problem I had was that I moved a partition and Linux didn't like it, but then I'm not an expert on either partitioning or Linux.
|
My System Specs![]() |
17 Mar 2012 | #7 |
|
I tried the CloneVDI tool to increase the size of a Linux (Lubuntu) virtual drive. It cloned and gave me a new DYNAMIC sized .vdi file. I chose to increase the partition size, along with the virtual disk size, but the result was no OS partition increase. I think the presence of the swap file may have confused that aspect of it. I still had to use GParted to increase the size of the the OS partition to max out the size of the new cloned virtual disk.
|
My System Specs![]() |
. |
17 Mar 2012 | #8 |
![]() |
If I remember correctly I didn't ask it to increase the partition size and then when I tried to resize the partition in openSUSE it showed no room for expansion and the old disk size. I think the problem lay in the default partition layout in openSUSE. Swap, System partition, Data partition. When I tried with a bootable GParted I increased both the system and data partition which of course involved moving the data partition. openSUSI wouldn't boot so at that point since it was a new install I just reinstalled with the new partition sizes.
|
My System Specs![]() |
17 Mar 2012 | #9 |
|
I haven't tried the process with a separate data partition. I've just tried once with the command line (Ubuntu) and once with CloneVDI (Lubuntu). Both of those virtual machines didn't have a separate data partition. I can see how that gets tricky if you move the partitions instead of just resizing from end of one partition.
|
My System Specs![]() |
17 Mar 2012 | #10 |
![]() |
It's an interesting setup. Although I called it a data partition it also holds any programs you have installed just leaving the first partition entirely for the OS.
|
My System Specs![]() |
![]() |
Thread Tools | |
Similar help and support threads | ||||
Thread | Forum | |||
Host disk is running out of room, can't shrink virtual hard disk? Hi Everyone, I have a challenge with resizing a virtual disk - here are a few details before I plunge into the challenge at hand; 1). The HOST O/S is Windows 7 x64 2). The GUEST O/S is Windows XP 3). The Desktop Virtualization software is VMware Workstation 8 Background - originally when... |
Virtualization | |||
Windows Virtual PC: "Cannot attach the virtual hard disk ..." error Hi: Got a new Win7 Enterprise 64 bit machine, found that it did not come with virtual PC. Downloaded the critical patch Windows6.1-KB958559-x64-RefreshPkg.msu and installed it. Windows Virtual PC shows up in my Start Menu. Good so far. I go through the steps to create a virtual machine and use... |
Virtualization | |||
Virtual Hard Disk I've always trusted the information from here, and now I'm going to hit again with another question in references to Virtual Hard Disk. Problem: Santa Claus (My wife) got me COD 4 for my computer (per my list). Great game and the one drawn back I've found with it (along with several games) is... |
Virtualization | |||
Win Virtual Hard Disk Performance Whitepaper from MS. Source - Windows Virtual Hard Disk Performance Whitepaper from Microsoft - Available for download - Softpedia |
News | |||
partition vs virtual hard disk - VHD Say your PC has only one partition with an OS, apps and data. Can you create additional partitions in the free space and then load in other OS(s) to have a multiboot PC and NOT LOOSE any existing stored info? If so. than what's is the advantage of creating a VHD and then loading in a new OS to... |
Performance & Maintenance |
Our Sites |
Site Links |
About Us |
Find Us |
Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd All times are GMT -5. The time now is 00:31. |
![]() ![]() |