Friday, 14 November 2008 06:44
VirtualBox is a cross platform full virtualizer for x86 hardware. It runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems such as Windows, Linux and OpenBSD. In a previous guide I have shown you How to install Ubuntu Linux on Windows using VirtualBox . The procedure is the same if you want to install Windows on Linux. The guest operating system is installed on a virtual disk created by VirtualBox which is nothing more than a single .vdi file. When you first create the virtual machine you must set a certain size for this disk. However after playing with VirtualBox you might realize you need more space because your virtual disk is full So, in this tutorial I will explain how to enlarge an existing virtual disk or in other words how to resize your virtualbox vdi. I have a Windows XP installation running on Linux and specifically Archlinux and I am going to create a larger disk for Windows XP.**Note: The same procedure works for Windows Vista also. The only difference is that you have to use your original Vista installation CD for Bootmgr repair the first time the system is started after the GPARTED steps have been followed. (Thanks to Andrew)
Run VirtualBox and go to File -> Disk Manager.

Here as you can see I have a .vdi disk with a size of 10GB (1) which is almost full. So press the New button (2) to create a new virtual disk.

Click next to go to the next page of the New Virtual Disk Wizard.

Select Dynamically expanding image as Image type and click next.

Select a name for the new image (1), this should be different than the existing one, and also set the size of the new disk (2). Here I've set it to 20GB.

Press Finish to end the wizard.

Now you should have 2 .vdi images in the Virtual Disk Manager. Click Ok to close the wizard.
Here we are gonna need GParted to copy the data of our old disk to the new one. GParted is the Gnome Partition Editor application for creating, destroying, resizing, moving, checking and copying partitions, and the file systems on them. It has a LiveCD which you must download from here . You don't have to burn it on a cd, just store the .iso somewhere in you hard disk.
Now select the existin Windows XP installation (1) and click on the Settings button (2).

In the General -> Advanced tab set CD/DVD Rom as the first boot device.

In the Hard Disks settings double click below your IDE Primary Master and set IDE Primary Slave and the new Virtual Hard Disk image.

In the CD/DVD-ROM settings click on Mount CD/DVD Drive (1), choose ISO Image File (2) and use the folder button to browse to the location you have saved the gparted live cd (3).

Now click the Ok button and start the Windows XP Virtual Machine. Press Enter to boot GParted Live with Default Settings.

Don't touch keymap should be fine. Again press Enter.

Select the Language you prefer. Press Enter for English. And again press Enter for the default video card settings.

GParted will automatically scan your virtual disks. /dev/hda should be the old one and /dev/hdb the new one. Right click on your first disk and select Copy.

Next select /dev/hdb from the drop down menu (1), right click on the unallocated space and select Paste (2).

Drag the right edge (1) like you see in the screenshot so as not to leave any unallocated space in the new disk. Next click the Paste button.

Now press Apply to apply the changes.

When all listed operations are applied click the Close button. Again right click on the new partition /dev/hdb and click Manage flags. Here you should tick the boot flag.

Gparted will scan all devices once more. When it's done close the program and shutdown the live cd from the exit button. It will prompt you to press Enter. Now return to the VirtualBox application, select the Windows XP virtual machine and click the settings button. In the General -> Advanced tab select Hard Disk as the first boot device.

In the Hard Disk settings use the delete button (1) to remove the IDE Primary Slave, leave just IDE Primary Master (2), and select the new .vdi (3).

In the CD/DVD-ROM settings tick the Host CD/DVD Drive.

Press the Ok button and start your Windows XP virtual machine. Windows might ask to check their filesystem. Just let them do it.

After they automatically reboot you will log into your new resized virtualbox disk without having lost any of your data. You can now just delete the old .vdi. Enjoy!

Set as favorite
Email this
Hits: 192463
Related articles:
- How to automount a shared VirtualBox folder from a Linux guest
- How to fix GNOME 3 failed to load of Fedora 16 installed on VirtualBox
- How to install Google Chrome OS on VirtualBox
- How to fix mouse pointer integration in Ubuntu 9.04 installed on VirtualBox
- How to copy and transfer or backup a Virtualbox Virtual Machine .vdi
Comments (228)
Subscribe to this comment's feedrecommendation
I fell in 2 problems:
1. BSOD: due to improper IDE Controller Type ( in Advanced Setup). I don´t know why it changed.
2. not correct NTFS Journal in source system disk.
I recommend to use ntfsfix /dev/sdxx as the first step in the procedure.
Hope it helps
1. BSOD: due to improper IDE Controller Type ( in Advanced Setup). I don´t know why it changed.
2. not correct NTFS Journal in source system disk.
I recommend to use ntfsfix /dev/sdxx as the first step in the procedure.
Hope it helps
...
Thank you, thank you and thank you! I started to use virtualbox last week and as everything was finally working, I got a nice message
as I was running out of space
. I was looking for an answer. Not only you gave the answer I was looking for, but it was so clear and well explained that I could not go wrong. Thank's again for your wisdom. You are a genius.
Have a great day!
I don't have a place to rate my vote, but you got 11 out of 10!
as I was running out of space
. I was looking for an answer. Not only you gave the answer I was looking for, but it was so clear and well explained that I could not go wrong. Thank's again for your wisdom. You are a genius. Have a great day!
I don't have a place to rate my vote, but you got 11 out of 10!
Doesn't work for me....
I'm using VirtualBox on Windows with Fedora 10 as the guest OS.
I have a .vdi file for my virtual machine that is 8gb in size and I want to make it 40gb so I create another vdi file and attach it. I then boot up in gparted live cd and I can see both hda and hdb.
In the Fedora guest OS, if I do fdisk -l /dev/hda I see that I have /dev/hda1 LINUX and /dev/hda2 LINUX LVM partitions. I didn't specifically create it this way, this is the way it came out from the standard Fedora 10 install.
After I copy hda to hdab I end up with /dev/hdb1 and /dev/hdb2. hdb1 is ext3 format boot partition and hdb2 is unknown to gparted. The resize button is greyed out for hdb2 so you cannot resize it no matter what you do. I can resize the /dev/hdb1 partition if I want, but that is the boot partition and I need to resize /dev/hdb2 and it will not. Is this because it is a linux lvm?
Any ideas?
...
Yes, this must be because of the LVM (logical Volume Manager) that Fedora uses by default to manage disk drives.
No ideas for now. I will take a look though and get back if I find something.
No ideas for now. I will take a look though and get back if I find something.
Cheers
Just used the above procedure to resize a win 2003 server machine. Your solution worked ok for me, however i did have to use the ntfsfix to get it to grow the disk (resize) correctly.
Beautiful!
I installed a virtual vista machine on my Ubuntu host and originally set the vista drive too big and not dynamic. I created a dynamic drive, copied everything over and rebooted vista with the second drive. Vista was not happy about it, and demanded that I insert my install disk. After a few hoops and reboots I was back in business! Thanks so much.
Just was i was looking for
Just wanna say thanks. One of the best explained and most detailed responses I have seen. Its in my favorites
...
Axel,
your tutorial is amazing ! Thank you very much.
I did the above for a Windows 7 installation. When I booted from the new partition, I got:
Bootmgr missing
Press Ctrl-Alt-Del to reboot
I then restarted from the Windows 7 install ISO and choose
repair. I got a repair message, no options, choosed it.
Still by booting I got the Bootmgr missing message again.
So I rebboted from the install ISO, choose repair and
this time got several repair options.
Choosed 'repair startup'.
And then it worked !
Hope it helps
your tutorial is amazing ! Thank you very much.
I did the above for a Windows 7 installation. When I booted from the new partition, I got:
Bootmgr missing
Press Ctrl-Alt-Del to reboot
I then restarted from the Windows 7 install ISO and choose
repair. I got a repair message, no options, choosed it.
Still by booting I got the Bootmgr missing message again.
So I rebboted from the install ISO, choose repair and
this time got several repair options.
Choosed 'repair startup'.
And then it worked !
Hope it helps
...
Thanks for the info Mektub!
In Windows XP I didn't face any problem with the boot process. But as I can see Windows Server 2003, Windows Vista and Windows 7 have a few problems that can be easily fixed with the repair from their installation cds. Thanks everyone!
In Windows XP I didn't face any problem with the boot process. But as I can see Windows Server 2003, Windows Vista and Windows 7 have a few problems that can be easily fixed with the repair from their installation cds. Thanks everyone!
...
I am having the problem that despite seemingly following the tutorial closely, the Virtual Machine boots right into Windows rather than opening up gparted. Any ideas about what I might be doing wrong?
Thanks, Annette
Thanks, Annette
...
Hey Annette,
In Settings -> General tab you haven't selected CD/DVD to be the first boot device.
In Settings -> General tab you haven't selected CD/DVD to be the first boot device.
final success
Axel was of course right. I'd done something stupid. But then I ran into another problem. Thought I'd share the solution here, in case others encounter something similar. The resized VDI would not boot (don't have the specific error handy). I found Tha-Dogg's helpful solution here: http://forums.virtualbox.org/viewtopic.php?t=6627, which involves a small change to the boot configuration. Now all is peachy. (Just be sure to follow instructions carefully -- attach the new vdi as "primary slave" to the old functioning vdi ("primary master") before doing anything else. Hope this saves someone some extra googling!
...
This was extremely helpful, worked like a charm using VirtualBox 2.1.4 and gparted-live-0.4.1-2.iso. Thanks!!!
Best Walkthrough on this subject anywhere!
So of course I went to the virtualbox site first, yea not alot of help, then I googled it for a few links, and found this one. Hands down the BEST walkthrough on this subject, and I just finished following it and it worked a treat! Windows didn't even ask me to check the disk.
I need my virtualbox to run photoshop in and without it I'd be lost as I do alot of web graphics for clients and well, I ran out of room!
Many Thanks!
XtCrAvE - twistedpair.mobi
I need my virtualbox to run photoshop in and without it I'd be lost as I do alot of web graphics for clients and well, I ran out of room!
Many Thanks!
XtCrAvE - twistedpair.mobi
...
Hehe! You are very welcome XtCrAvE! I was also searching for a way to resize my virtualbox disk but couldn't find something good. So I thought why not writing down my own.
Brilliant
Like others i was delighted i got my Virtualbox up and running but then saw i was running out of space! All other suggestions were not good (starting another partition) untill i cam across this guide! Fantastic mate! Really really appreciate the hard work and effort you put in to helping others! It was so easy to follow your step by step guide and hopefully soon, when it finishes operations, i will have more space on my XP to install Football Manager 2009 lol! Thanks once again mate!!
Thank you!
Great guide--I ran it almost completely without a hitch. The only problem was that my mouse wouldn't work inside the guest gparted, but using alt-key combinations took care of that. Thank you again for your work--it was very helpful!
Close disk space
It seens to be a problem for gparted to copy when the 2 disks have similar capacities. Haven't test this to the limit, but maybe someone will have the same problem and i thought of warn.
Btw, ty for the very good guide.
Btw, ty for the very good guide.
Thank You
Thank you this solved my problem with my fixed drive running out of space. Other methods were rather complex and this was easy and logical to follow.
Vista Addition Section
You may want to put an asterisk for Vista users - they will have to use their original Vista install CD for Bootmgr repair the first time the system is started after the GPARTED steps have been followed.
Otherwise - a great guide and easy to follow. THanks.
Otherwise - a great guide and easy to follow. THanks.
Restore GRUB
Hi, I have Ubuntu as my guest system on a Mac. This tip helped to restore the boot menu back to normal:
http://www.sorgonet.com/linux/grubrestore/
(Read section "HOWTO Restore GRUB")
http://www.sorgonet.com/linux/grubrestore/
(Read section "HOWTO Restore GRUB")
...
Thanks for the link Zettt. You are right. If you have a Linux guest system you must restore grub afterwards.
Great guide, helpful comments
Thanks a lot for this perfect howto!
Only one problem occured: When booting from the new vdi, I got an error message like "hard disk read error, press ctrl+alt+del to reboot". But this could be fixed with Anettes tip from February 19, 2009 and the link to http://forums.virtualbox.org/viewtopic.php?t=6627
Again: thanks a lot!
Only one problem occured: When booting from the new vdi, I got an error message like "hard disk read error, press ctrl+alt+del to reboot". But this could be fixed with Anettes tip from February 19, 2009 and the link to http://forums.virtualbox.org/viewtopic.php?t=6627
Again: thanks a lot!
xp host with ubuntu guest
I would like to see a similar step-by-step with the host/guest reversed. I too am at the mercy of computationally intensive Windows-only applications.
xp host with ubuntu guest
Nevermind. I pieced together this recipe from a VirtualBox forum and it worked great and only took a few minutes. I went from an 8GB ubuntu guest on a XP host to a new 16GB ubuntu vdi guest. Here's what I did (adapted from http://forums.virtualbox.org/v...4&start=30):
1. Create 2nd larger size .vdi hard drive image.
2. Set as slave in specified Virtualbox.
3. Download and mount ISO for Clonezilla.
4. Make sure boot order is set to Cd-Rom before hard drive. Boot Virtualbox.
5. Follow Clonezilla prompts to copy old hard drive (/dev/sda) to new hard drive (/dev/sdb).
Disk-to-disk, local-to-local, expert mode -r, -k1.
6. When done, set new hard drive image as master in Virtualbox.
8. Format, and set as slave or delete 1st hard drive image.
1. Create 2nd larger size .vdi hard drive image.
2. Set as slave in specified Virtualbox.
3. Download and mount ISO for Clonezilla.
4. Make sure boot order is set to Cd-Rom before hard drive. Boot Virtualbox.
5. Follow Clonezilla prompts to copy old hard drive (/dev/sda) to new hard drive (/dev/sdb).
Disk-to-disk, local-to-local, expert mode -r, -k1.
6. When done, set new hard drive image as master in Virtualbox.
8. Format, and set as slave or delete 1st hard drive image.
...
Nice rsz! You found the solution before I even read your first comment.
Thank you Doug. You are welcome!
Thank you Doug. You are welcome!
gparted live cd
From where i get the gparted live cd
i download it from a site but i dont know how it install or use ?
i dont see any iso file in the downloaded folder
please help
sareeshmnair@gmail.com
i download it from a site but i dont know how it install or use ?
i dont see any iso file in the downloaded folder
please help
sareeshmnair@gmail.com
...
Jiak I believe you will find the answer you are looking for in the comments above.
sareesh here is a link to download an iso file. http://sourceforge.net/projects/gparted/files/
sareesh here is a link to download an iso file. http://sourceforge.net/projects/gparted/files/
Works great!
Thanks much! Works as detailed, no missed steps. Great My-Guide-ster. Delivered as promised. A++++++++.
great!
Axel, thanks for this information. It acknowledges that the Linux-community is a reliable one and (almost) every problem is solvable.
...
Nice guide & comments. For me, the new vdi didn't boot correctly. It hung at the login screen before showing the user accounts. I finally got it to work with the following modifications to axel's guide (VirtualBox version 2.2.4, gparted version 0.4.6):
1) In gparted, copy old vdi partition and paste to new *without resizing* (leaving unallocated space on the new vdi).
2) Boot the new vdi (as IDE Master) to verify that it works.
3) Use gparted to grow the partition to fill the new vdi.
4) Boot the new vdi. XP will do a CHKDSK during the boot process (as described in the guide).
One mystery that may not be a general occurrence: XP "installed new hardware" after booting the new vdi (at both steps 2 and 4).
1) In gparted, copy old vdi partition and paste to new *without resizing* (leaving unallocated space on the new vdi).
2) Boot the new vdi (as IDE Master) to verify that it works.
3) Use gparted to grow the partition to fill the new vdi.
4) Boot the new vdi. XP will do a CHKDSK during the boot process (as described in the guide).
One mystery that may not be a general occurrence: XP "installed new hardware" after booting the new vdi (at both steps 2 and 4).
...
Thank you very much for the info and the additions pnf.
At some time I have to recheck this guide to make sure it works with the latest Virtualbox and gparted.
I am glad this guide has helped so many people!
At some time I have to recheck this guide to make sure it works with the latest Virtualbox and gparted.
I am glad this guide has helped so many people!
...
Hi I just followed this guide to resize my virtualbox and everything now works fine, except I don't seem to have network connections. Do I just need to configure my ip address once again or should it have worked regardless? Sorry if this is a very basic question..
thanks,
thanks,
A disk read error occurred [next line] Press Ctrl+Alt+Del to restart
I've attempted this process numerous times and every time the boot to XP renders the following message on a black screen...
A disk read error occurred
Press Ctrl+Alt+Del to restart
I also noticed that the gparted process ends with errors. It appears to be fixable by running "ntfsfix /dev/" from a the term window. The "check" action says all is good, but XP still does not boot. Yes, it's flagged with "boot".
Oh well, it'd be faster to just load the OS onto a bigger VDI at this point. What a waste of time. Sadly, you'd thing resizing a disk would be an option in VirtualBox. Once again, nothing's free. Just marketing to get me to put down for the real features. heh.
~ Adam
A disk read error occurred
Press Ctrl+Alt+Del to restart
I also noticed that the gparted process ends with errors. It appears to be fixable by running "ntfsfix /dev/" from a the term window. The "check" action says all is good, but XP still does not boot. Yes, it's flagged with "boot".
Oh well, it'd be faster to just load the OS onto a bigger VDI at this point. What a waste of time. Sadly, you'd thing resizing a disk would be an option in VirtualBox. Once again, nothing's free. Just marketing to get me to put down for the real features. heh.
~ Adam
...
rjen,
yes you have to configure virtualbox settings for your network again.
Adam,
I'm sorry it didn't work for you.
Thank you guys for your comments. I am glad it is working for you.
I also expect Virtualbox to add some autoresize feature though.
yes you have to configure virtualbox settings for your network again.
Adam,
I'm sorry it didn't work for you.
Thank you guys for your comments. I am glad it is working for you.
I also expect Virtualbox to add some autoresize feature though.
Yepp!
It worked like a champ
- Windows 2003 Server virtual instance.
- Created a new vmdk disk with vmware-vdiskmanager -c -s 20Gb -a ide -t 0 'System.vmdk'. Attached via LSILogic driver.
- Used sysrescuecd instead, since Gparted live thought my disk (vmdk format) was 8 Tb when it was only 20 Gb. (sysrescuecd is better on recon scsi maybe?)
- After closing down Gparted, ran ntfsfix /dev/sd[x][n].
- Restarted machine with the newly created hard disk, watched chkdsk run automagically while
- Took a sandwich in the kitchen, and went to bed with a smile!
Thank You!
- Windows 2003 Server virtual instance.
- Created a new vmdk disk with vmware-vdiskmanager -c -s 20Gb -a ide -t 0 'System.vmdk'. Attached via LSILogic driver.
- Used sysrescuecd instead, since Gparted live thought my disk (vmdk format) was 8 Tb when it was only 20 Gb. (sysrescuecd is better on recon scsi maybe?)
- After closing down Gparted, ran ntfsfix /dev/sd[x][n].
- Restarted machine with the newly created hard disk, watched chkdsk run automagically while
- Took a sandwich in the kitchen, and went to bed with a smile!
Thank You!
Thanks
Just want to say thanks as the tutorial together with user remarks made me grow my disk just fine!
...
I also want to thank all users for posting here their experience on resizing a VirtualBox disk. Thank you guys!
Windows XP Disk Fixed and Now Booting
Annette's tip worked for me as well with a Windows XP SP3 disk. Thanks for saving me a huge headache!!!
Windows is not recognizing the increased space, it still thinks the drive is the original size. What now?
I had to use the Ubuntu LiveDVD for Gparted b/c the Gparted CD wouldn't work. After resizing the disk size in Ubuntu, Windows doesn't recognise the new size. It thinks it's still 10GB, not 50. Any suggestions?
...
Have you made the necessary changes in the Hard Disk Settings of VirtualBox as I mention in the guide?
...
The disk I'm resizing doesn't have an operating system on it (yet) so I can't boot it up, and the the interface in my version of Virtualbox is different; but excepting for those discrepancies I tried to follow your instructions as closely as possible.
Nice Job!
You did a really nice job of documenting a 'scary' process. It worked perfectly. Well done.
mounting an extra hard disk (ubuntu running on windows virtual box)
The steps are pretty much the same up to creating a new vdi hard-disk and clicking on the settings of the VM you want to run to add this new hard-disk. Then log into ubuntu VM and install gparted
> sudo aptitude install gparted
then using gparted, format the new hard disk, close gparted and then mount the new hard disk
> mount /dev/sdb1 /media/disk
and you have more space!
> sudo aptitude install gparted
then using gparted, format the new hard disk, close gparted and then mount the new hard disk
> mount /dev/sdb1 /media/disk
and you have more space!
resizing ubuntu on vista64 host
Thank you very much for this incredibly detailed guide
I used it to resize a virtual hard disk with Ubuntu installed, and VirtualBox running on a Vista-64bit machine.
NOTE: After the steps above, when first running the virtualized Ubuntu, i had to reinstall grub (boot manager) by using the Ubuntu Live CD:
- boot the virtual hard disk with the Ubuntu Live CD
- check (for example with the gparted GUI) the name of the partition which will contain the grub
- reinstall grub on the right partition
- reboot from hard disk
Hope will help
I used it to resize a virtual hard disk with Ubuntu installed, and VirtualBox running on a Vista-64bit machine.
NOTE: After the steps above, when first running the virtualized Ubuntu, i had to reinstall grub (boot manager) by using the Ubuntu Live CD:
- boot the virtual hard disk with the Ubuntu Live CD
- check (for example with the gparted GUI) the name of the partition which will contain the grub
- reinstall grub on the right partition
- reboot from hard disk
Hope will help
...
Thanks for your comment s3agull. It will help for sure anyone trying to resize the virtualbox partition of its Linux distribution!
...
Thanks for this guide! I encountered a few snags while growing a Windows XP machine, but ultimately got things to work:
At the end of the copy and resize, gparted complained that it couldn't resize the partition, since the filesystem was unclean. But after its display refreshed, it showed the new size anyway (but, as I later found out, this wasn't correct). I think this was because I had used VirtualBox's "Power off the machine" option instead of doing a proper ACPI shutdown.
I tried booting the new drive, but I got the same error as Robert Seetzen ("hard disk read error, press ctrl+alt+del to reboot"). I used Annette's link (February 19, 2009), which let me boot the drive successfully.
Once I had booted the new drive, it still showed the old size, despite gparted's claim to have resized it. This was, of course, because of the "filesystem unclean" error. So I started gparted again and resized the partition to the same size. And Windows finally saw the extra space.
Hope this helps someone else
At the end of the copy and resize, gparted complained that it couldn't resize the partition, since the filesystem was unclean. But after its display refreshed, it showed the new size anyway (but, as I later found out, this wasn't correct). I think this was because I had used VirtualBox's "Power off the machine" option instead of doing a proper ACPI shutdown.
I tried booting the new drive, but I got the same error as Robert Seetzen ("hard disk read error, press ctrl+alt+del to reboot"). I used Annette's link (February 19, 2009), which let me boot the drive successfully.
Once I had booted the new drive, it still showed the old size, despite gparted's claim to have resized it. This was, of course, because of the "filesystem unclean" error. So I started gparted again and resized the partition to the same size. And Windows finally saw the extra space.
Hope this helps someone else
...
Thank you for sharing this Dave.
I also believe you faced this problem because of the Power off you did. But since you managed to successfully resize the partition everything is ok!
I also believe you faced this problem because of the Power off you did. But since you managed to successfully resize the partition everything is ok! One step is missing wit latest Gparted (0.4.8-6)
Hi, thanks a lot for the wonderful and complete setup, it worked like a charm!
One step is missing before copying the content, one has to define a partition type to the new vdi, and then you can paste it. Little correction, but just in case someone would be troubled :-)
cheers !
One step is missing before copying the content, one has to define a partition type to the new vdi, and then you can paste it. Little correction, but just in case someone would be troubled :-)
cheers !
Resizing an Ubuntu Guest VDI
rsv's post on July 14, 2009 worked perfectly for me. I used it to resize the VDI for an Ubuntu guest running on a Windows XP host. I doubled the size of the VDI, and the really sweet part is that the utilization of my root file system dropped from 95% to just 59%!
Thanks, rsv!
Thanks, rsv!
WanderingTheWorld.com
Just like most of those commenting, a big thank you. Pictures tell a lot.
Enlarged a Windows XP guest from 10G to 20G on an OSX Snow Leopard host.
Enlarged a Windows XP guest from 10G to 20G on an OSX Snow Leopard host.
Thanks!
Thank you - worked a treat after a while of trying to achieve this.
A minor thing which might be worth mentioning for others. I don't know if it is always the case, but while carrying out the copy procedure in GParted, I nearly reset the machine thinking it had failed as there was no progress indication - just the bar moving back and forth but nothing else to indicate it was copying my 10GB of HDD...
A minor thing which might be worth mentioning for others. I don't know if it is always the case, but while carrying out the copy procedure in GParted, I nearly reset the machine thinking it had failed as there was no progress indication - just the bar moving back and forth but nothing else to indicate it was copying my 10GB of HDD...
...
Thanks so much for your guide, minor differneces (new version of Virtualbox), but no head-scratchers! I didn't think of booting my VM with a liveCD...I should think of it as an actual computer sometimes, that may help
Again, Thanks!
Again, Thanks! Gparted only detected old HDD
I stuck at
Next select /dev/hdb from the drop down menu (1), right click on the unallocated space and select Paste (2).
My gparted just detected old vdi which the 10GB.
I am using
- gparted-live-0.5.2-8.iso
- virtual box 3.1.6
Next select /dev/hdb from the drop down menu (1), right click on the unallocated space and select Paste (2).
My gparted just detected old vdi which the 10GB.
I am using
- gparted-live-0.5.2-8.iso
- virtual box 3.1.6
Gparted only detected old HDD (FIXED)
In virtualbox 3.1.6 it will not display all the .vdi need to click the + button.
and click it to add your new .vdi
FIXED
and click it to add your new .vdi
FIXED
...
Thank all of you for you comments guys! I'm glad you've managed to resize your VirutalBox disks!
Had to use ntfsresize --size 10G /dev/sda1 to get WindowsXP Pro guest on Ubuntu 9.10 ...
Had to use ntfsresize --size 10G /dev/sda1 to get WindowsXP Pro guest on Ubuntu 9.10 to get WindowsXP guest to see new disk size. Everything was the same in the procedure though.
Resize Fixed Hard drive on Virtualbox
Video tutorial:
http://www.youtube.com/watch?v=JGLZ9K1IjOQ
A nice vid stands for 10K words and 1K screenshots
Share this link
http://www.youtube.com/watch?v=JGLZ9K1IjOQ
A nice vid stands for 10K words and 1K screenshots
Share this link
Mr.
I can't thank you enough. Worked like a charm!
I would rather a static step-by-step tutorial like this than a youtube video.
I would rather a static step-by-step tutorial like this than a youtube video.
windows vista as host, Fedora 12 as guest, used the same procedure but stuck with "no partition table found"
Thnaks for this detailed how-to.
I used it on a windows vista host, with fedora core 12 as guest and followed the procedure.but when the Gparted shows my harddisks, there is a !sign next to the new hard disk and when i try to paste from the old hard disk to newer one,it sais that "no partition table was found on the new hard disk and asks me to go to Device->create Partition Table.on that menu the default table type is ms-dos and there are some others. I don't know which one to choose.
and since the "rsz july 14 2009 comment" is not for a newbie like me, i can't follow it.
I used it on a windows vista host, with fedora core 12 as guest and followed the procedure.but when the Gparted shows my harddisks, there is a !sign next to the new hard disk and when i try to paste from the old hard disk to newer one,it sais that "no partition table was found on the new hard disk and asks me to go to Device->create Partition Table.on that menu the default table type is ms-dos and there are some others. I don't know which one to choose.
and since the "rsz july 14 2009 comment" is not for a newbie like me, i can't follow it.
Very helpful tutorial
It's very complete and accurate...I followed it and worked perfectly on mi mac with VBox Windows XP.
Cheers,
ATA
Cheers,
ATA
Excellent
Your process is certainly quicker and easier than creating a new Windows VM and installing everything from scratch. I will also note that I used slightly different versions of Virtualbox and Linux than your screen shots show...and even with 'interpretations' for the new versions, it still worked. Last, I will note that I just gave you $5 American. Thanks!
Mac/Snow Leopard host, Windows 7 Prof guest?
Axel/All:
Well these instructions work with a Mac/Snow Leopard host and Windows 7 Prof guest? I'm using VB 3.2.4.r62467.
Do any of the instructions need changing for this configuration? Any additions or deletions of instructions?
Thought I'd check before I really mess things up....
Thanks everyone!
Well these instructions work with a Mac/Snow Leopard host and Windows 7 Prof guest? I'm using VB 3.2.4.r62467.
Do any of the instructions need changing for this configuration? Any additions or deletions of instructions?
Thought I'd check before I really mess things up....
Thanks everyone!
...
Thanks all of you for comments! I'm glad this guide still helps many people! Of course donations are always welcome. Thank you very much.
Eric, read this comment "Alexis , June 14, 2010". Although I don't have a Mac to test it on my own I believe you shouldn't have any problem.
Eric, read this comment "Alexis , June 14, 2010". Although I don't have a Mac to test it on my own I believe you shouldn't have any problem.
Ubuntu guides
Great post. Thanks a lot for the useful guides.
Beach Holiday Guide
***********
Alyssa
Beach Holiday Guide
***********
Alyssa
It works on Windows 7
The only difference is that instead of running a chkdsk directly when you reboot from your new Windows 7 disk, you will need to repair it using the windows 7 CD.
To do so, mount the Windows 7 CD and repair the installation. All it does is running a ChkDsk.
if you have got windows 7 on an iso image or alike, mount the image as a CD and make it bootable.
This procedure has been tested by myself on a iMac with Snow Leopard and VBOX release 3.2.6
Best regards for all.
To do so, mount the Windows 7 CD and repair the installation. All it does is running a ChkDsk.
if you have got windows 7 on an iso image or alike, mount the image as a CD and make it bootable.
This procedure has been tested by myself on a iMac with Snow Leopard and VBOX release 3.2.6
Best regards for all.
Windows 7 recovery CD
Hello,
Thank you very much for this post. It really saved my life!
Just a little tip:
I was facing the "Bootmgr missing" problem on Windows 7 but I don't have the Windows 7 CD, so I found out that there is a recovery CD, which can be downloaded on this link:
http://neosmart.net/blog/2009/windows-7-system-repair-discs/
I hope it can save other people's time.
Thanks again!
Thank you very much for this post. It really saved my life!
Just a little tip:
I was facing the "Bootmgr missing" problem on Windows 7 but I don't have the Windows 7 CD, so I found out that there is a recovery CD, which can be downloaded on this link:
http://neosmart.net/blog/2009/windows-7-system-repair-discs/
I hope it can save other people's time.
Thanks again!
Seems fine with Mac 10.6.4--moved 10GB XP Pro to 20GB XP Pro
Seems to work fine. A few things were different. Boot CD worked fine (I was a little worried) and it did ask me to partition the new HD within the partitioning software. Copying took about 10 mins or so.
Seems to have booted up fine. I had to repoint shared folders to the Mac side. Networking seems fine with no changes. I hope Windows and Office 2007 reactivation won't be needed (since hardware will have changed, I think, from XP perspective. We will see).
Thanks a lot
Seems to have booted up fine. I had to repoint shared folders to the Mac side. Networking seems fine with no changes. I hope Windows and Office 2007 reactivation won't be needed (since hardware will have changed, I think, from XP perspective. We will see).
Thanks a lot
Gracias, Thanks
Muchas Gracias por tu aporte, de verdad tu guía me saco de un apuro muy grande.
Thank you very much for your input, your guide really helped me a lot of very big trouble.
Thank you very much for your input, your guide really helped me a lot of very big trouble. resize a VirtualBox disk partition
Useful resource. This is the first feeling after read your article.
I found something useful information related recently about resize partition. And I am looking forward to your helpful guide.
I found something useful information related recently about resize partition. And I am looking forward to your helpful guide.
Replacing partition
Thank you for this guide it was surely a time saver and after I booted my system with my Vista disk and did a boot repair I was up and running! =)
Don't forget the manage flag step like I did
I went through the whole process but somehow missed the one step on manage flag, checking the box next to boot.
Took me a while to figure out what I had missed. Redid it and it worked the second time.
Took me a while to figure out what I had missed. Redid it and it worked the second time.
Too complicated (for me)
I've just resized my Windows Server 2008 R2 C: partition. Host is VirtualBox 3.2.8 on FreeBSD 8.1-RELEASE.
1. Use VirtualBox to create the new hard disk (vdi) with the bigger size.
2. Shutdown your guest (Powered off).
3. Use the command line, cd to your HardDisk folder (~/.VirtualBox/HardDisks in my case) and run "VBoxManage clonehd --existing oldhd.vdi newhd.vid".
You'll see something like this:
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8_OSE
(C) 2005-2010 Oracle Corporation
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID:
4. Use VirtualBox to change the settings of your guest to use the new hard disk instead of the old one ("Storage").
5. You can boot your guest now. It will see the hard disk in the new size, but the filesystem will remain the same size as before as expected. At least in W2k8 it is possible to expand with the on board "Disk Management".
Mission completed.
1. Use VirtualBox to create the new hard disk (vdi) with the bigger size.
2. Shutdown your guest (Powered off).
3. Use the command line, cd to your HardDisk folder (~/.VirtualBox/HardDisks in my case) and run "VBoxManage clonehd --existing oldhd.vdi newhd.vid".
You'll see something like this:
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8_OSE
(C) 2005-2010 Oracle Corporation
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID:
4. Use VirtualBox to change the settings of your guest to use the new hard disk instead of the old one ("Storage").
5. You can boot your guest now. It will see the hard disk in the new size, but the filesystem will remain the same size as before as expected. At least in W2k8 it is possible to expand with the on board "Disk Management".
Mission completed.
Great Howto
However I haven't gotten a working copy of my XP guest yet. The first time I tried I got an error message: NTLDR is missing
I started studying the my original VDI file and it contained a small partition with MBR and lba. I tried adding a small partition to my sda2 using the method you have suggested but I quickly get an error message. Something about the file system. Any ideas how I can create the MBR?
I started studying the my original VDI file and it contained a small partition with MBR and lba. I tried adding a small partition to my sda2 using the method you have suggested but I quickly get an error message. Something about the file system. Any ideas how I can create the MBR?
...
Hi Tim, boot with a Windows XP cd and choose to repair the installation. It will recreate NTLDR.
Vista help
Vista Home Premium
File: Windowssystem32winload.exe
Status: 0xc0000225
Info: The selected entry could not be loaded because the application is missing or corrupt.
With thanks:
http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/
File: Windowssystem32winload.exe
Status: 0xc0000225
Info: The selected entry could not be loaded because the application is missing or corrupt.
With thanks:
http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/
get error
I did the above too for a Windows 7 63 bits,. When I booted from the new disk, I got:
Bootmgr missing
Press Ctrl-Alt-Del to reboot
Bootmgr missing
Press Ctrl-Alt-Del to reboot
It works fine with Windows 7 Ultimate x86, too.
It is needed to follow the following procedure to repair system partition in W7, but after of that it works fine:
http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/
Thank you.
http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/
Thank you.
...
This is very very useful ! Thank you for putting your time on this one...I am gonna try this today.
Don't see /dev/hdb in drop down menu
Hello!
May prolem is that in the drop down menu is nothing but the /dev/hda (in my case /dev/sda1) and nothing like /dev/hdb (or in my case something like /dev/sda2).
So I can't get an further with the tutorial...
Any ideas?
Would be nice to get help!!!
Thanks for your effort!!
Stephan
May prolem is that in the drop down menu is nothing but the /dev/hda (in my case /dev/sda1) and nothing like /dev/hdb (or in my case something like /dev/sda2).
So I can't get an further with the tutorial...
Any ideas?
Would be nice to get help!!!
Thanks for your effort!!
Stephan
Initial large virtual drive size...
Maybe a small point, and someone may have stated this already, but if you make the original virtual disk size very large ie a dynamic 200Gb, then you can just use gparted to increase the size of the original partition. Having a dynamic 200GB virtual disk won't actually take up 200 GB on your hard drive, but will save you from having to create a new drive every time your partition fills up and needs resizing.
Don't see /dev/hdb in drop down menu
Hey Nick_L,
thanks for the information!
In my case I got an old virtual disk (10GB) and want to create a new one (20GB).
When I try to it's like described on top of your post...
Until now I can't find a solution to go on with the tutorial cause I don't see the new virtual disk...nerve-wercking...
I hope someone can help me...
thanks for the information!
In my case I got an old virtual disk (10GB) and want to create a new one (20GB).
When I try to it's like described on top of your post...
Until now I can't find a solution to go on with the tutorial cause I don't see the new virtual disk...nerve-wercking...
I hope someone can help me...
props for the knarf method!
Running VB 3.2.6 on OS X host, one XP guest. Needed to grow it from 10GB to 20GB. Initial solutions were all 2-3 years old than I found this thread. The partition copy is a great hack but it seemed like in 2010 there should be a better way since Oracle is still updating it. Used the cmd line tool to clone the old disk into a new one. XP does not do the GUI VLM and the cmd line tool diskpart was bitchy. So I just used the GPartEd ISO to boot off of and grow the partition to the full 20GB disk. Chkdsk ran on first boot then all was well!
Thx knarf!
Thx knarf!
resize hard disk
Start off by creating a fresh new drive of the size you’re after using the VirtualBox user interface. Then, locate both the your old, smaller HD and the new, larger one and run the following command:
VBoxManage clonehd --existing oldhd.vdi newhd.vdi
After some progress indicators ahve come and gone your HD should have been cloned to the larger one. You now need to use some software to expand your drive partition into the new space, use something like GParted.
VBoxManage clonehd --existing oldhd.vdi newhd.vdi
After some progress indicators ahve come and gone your HD should have been cloned to the larger one. You now need to use some software to expand your drive partition into the new space, use something like GParted.
COULD NOT GET IT TO WORK.
First error I believed was caused by formatting 2nd drive in windows instead of GParted. It would say Error applying change in Gparted after copy of old partition to new bigger one. After allowing Gparted to format new partition I no longer got that error , which caused Windows XP to lock up on boot at WindowsXP screen.
However after allowing Gparted to format new partition and copying applied, I still got Locke up on WindowsXP Boot at Windows XP screen ( no Welcome)
Also , I noticed that I could not get it to boot to new partition at all until old one was deleted as explained in this walk through.
Could not get it to work.
However after allowing Gparted to format new partition and copying applied, I still got Locke up on WindowsXP Boot at Windows XP screen ( no Welcome)
Also , I noticed that I could not get it to boot to new partition at all until old one was deleted as explained in this walk through.
Could not get it to work.
...
ok I think i got it to work. The key is to let Gparted do the partitioning and the formatting and MAKE SURE You choose NTFS because it does not select that by default!
ALSO!!!!!
This was left out of the guide.
When you tick "BOOT" for new bigger partition, you MUST tick off the "BOOT" of the older smaller drive or you will not get it to boot right.
Of course deleting the old VM in Virtual Box is important to if you want to do it that way but in storage area and media area.
When you tick "BOOT" for new bigger partition, you MUST tick off the "BOOT" of the older smaller drive or you will not get it to boot right.
Of course deleting the old VM in Virtual Box is important to if you want to do it that way but in storage area and media area.
Endless login-loop
Followed the guide, but forgot to delete the slave (old) before i restarted. When I now run the vbox-installation I am getting an endless login-loop that I don't know how to fix. Any suggestions are welcome!
Great!!
Work in the mud for 1 1/2 days and then read this and washed the mud away.
Two things to consider.
1. If the guest is windows and chkdsk was never run on the original drive, Force it to run with auto correction and shut down and boot again before coping to the larger partition.
2. Covered above but, set the boot flag on the new partition as it doesn't copy over.
Two things to consider.
1. If the guest is windows and chkdsk was never run on the original drive, Force it to run with auto correction and shut down and boot again before coping to the larger partition.
2. Covered above but, set the boot flag on the new partition as it doesn't copy over.
Problems with Expanding Disk
So,
I believe I'm running a newer version of Virtualbox than you are here (ver. 3.2). I had several problems with copying the original image into the newly created .vdi until I decided to make the new .vdi a fixed storage device. At which point your tutorial worked perfectly.
Thanks,
-Brant
I believe I'm running a newer version of Virtualbox than you are here (ver. 3.2). I had several problems with copying the original image into the newly created .vdi until I decided to make the new .vdi a fixed storage device. At which point your tutorial worked perfectly.
Thanks,
-Brant
Another suggestion
Excellent tutorial!!
But, instead of the gparted boot disk, I used the Ubuntu installer CD and achieved the same result...So, if u have any linux distro CD, this would work too...
Thanks!
But, instead of the gparted boot disk, I used the Ubuntu installer CD and achieved the same result...So, if u have any linux distro CD, this would work too...
Thanks!
Any way to make it SMALLER?
Everything I've read so far focuses on how to make a Virtualbox disk larger, but I want to make my Windows XP one smaller. I originally made it 80GB, but found that I actually need only about a fifth of that space, so I want to reduce the size of it. Any way to do this?
...
Hi there, thanks so much for this guide...it was really easy to follow.
Unfortunately, I'm having a problem that doesn't seem to have been described here yet. I followed the instructions using virtualbox 3.2. Everything went fine and my VM boots but it doesn't recognize the increased size. All the data is there, and it's definitely running off of the larger disk but the guest (XP) doesn't recognize the increase.
Any help? Thanks
Perry
Unfortunately, I'm having a problem that doesn't seem to have been described here yet. I followed the instructions using virtualbox 3.2. Everything went fine and my VM boots but it doesn't recognize the increased size. All the data is there, and it's definitely running off of the larger disk but the guest (XP) doesn't recognize the increase.
Any help? Thanks
Perry
same problem as Perry
Went through the process, everything worked great...but as Perry mentioned on the 15th, XP doesn't recognize the increase. I managed to figure it out though. So try this:
-boot back into Gparted with the new .VDI set as IDE Master (no need to added the original back in)
-re-size the partition slightly smaller (-200Mb) and click apply.
-after successful application of the operation re-size the partition to full space, and click apply.
-after successful application of the second re-size operation exit the application and shut down (IMPORTANT: Shut down from within the Guest, not from the Virtual Box menu).
-change your virtual machine settings to boot from har disk per the instructions above.
You should see Windows XP boot the first time and "check disk" then reboot on it's own. Once the second reboot happens and your back at your desktop right click "My computer" and select "Manage". Check the disk properties, it should recognize the full disk space. I'm writing this rather quickly...so If anything is unclear just ask and I'll do my best to clarify.
Thanks,
Justin
-boot back into Gparted with the new .VDI set as IDE Master (no need to added the original back in)
-re-size the partition slightly smaller (-200Mb) and click apply.
-after successful application of the operation re-size the partition to full space, and click apply.
-after successful application of the second re-size operation exit the application and shut down (IMPORTANT: Shut down from within the Guest, not from the Virtual Box menu).
-change your virtual machine settings to boot from har disk per the instructions above.
You should see Windows XP boot the first time and "check disk" then reboot on it's own. Once the second reboot happens and your back at your desktop right click "My computer" and select "Manage". Check the disk properties, it should recognize the full disk space. I'm writing this rather quickly...so If anything is unclear just ask and I'll do my best to clarify.
Thanks,
Justin
Very good guide!!!
The guide is so good, but some pictures are not the same as my virtual Box Version (3.2.12), but it was almost the same.
Congratulations!
Congratulations!
How to get it to boot!
Alright, so I had some trouble getting the new disk to boot even after the ntfsfix /dev/sdb1 in the terminal (since I had errors in gparted).
What I found is that because I had the disks added as SATA in the settings and not IDE, it wouldnt boot. As soon as I switched it to an IDE drive again and deleted the sata controller in the settings area, it booted just fine!
So for anyone else out there who ran into this (Adam, this may have been you too), this is how I fixed it
.
Great article, thanks!
What I found is that because I had the disks added as SATA in the settings and not IDE, it wouldnt boot. As soon as I switched it to an IDE drive again and deleted the sata controller in the settings area, it booted just fine!
So for anyone else out there who ran into this (Adam, this may have been you too), this is how I fixed it
. Great article, thanks!
Thank You!!
Even though the article references an older version of VirtualBox the information was still relevant and it was easy to figure out where to change the settings. Thank you so much for taking the time to create such a complete guide!
thanks
I got this to work what a great idea...i just had to run it again to make my image be flagged as, " BOOT " then i reset it and it worked great..thanks..now if someone can help me migrate my image to another computer and change the mac address on it..thanks
Thanks
Obrigado, sua dica resolveu meu problema. Estava com win7 na VM e precisava mais espaço no HD. Reisntalar todos programas novamente seria um pesadelo. Obrigado, eternamente grato.
Works as advertised
Using Mac OS 10.6 host, Windows XP Home Edition guest. The part where I was confused was when I had to mount the Gparted iso as a cd-rom drive in the storage settings. Once I figured it out I did it twice on two macbooks. Thank you!
Curious
There is no mistaking the awesomeness of this post.
Just one knit picky thing: why? Why would you want to go through all the trouble to do this when all you should have to do is add another virtual drive to it? Sure, it's tricky in Linux Virtualbox, but nowhere near as tricky as what you're proposing.
Just one knit picky thing: why? Why would you want to go through all the trouble to do this when all you should have to do is add another virtual drive to it? Sure, it's tricky in Linux Virtualbox, but nowhere near as tricky as what you're proposing.
Thank you!
Thank you so much! Been looking how to do this for ages.
One note, on my version of VirtualBox, I couldn't find a way to change the boot order, but I could just hit F12 within the virtual machine to choose my boot device, chose the CD-Rom and voila was into GParted
Thanks again!
One note, on my version of VirtualBox, I couldn't find a way to change the boot order, but I could just hit F12 within the virtual machine to choose my boot device, chose the CD-Rom and voila was into GParted
Thanks again!
Make sure you select Dynamically expanding image!
I like using fixed-sized disks so the whole thing gets allocated at once. So that's what I tried to use. Every time I tried to copy the contents using gparted to the new image, it would freeze up at some point (around 4-5%) and the vm would abort (crash). I tried 4 different versions of gparted, and tried using the command line ntfscopy and ntfsresize to no avail.
Eventually, I followed the instructions as stated, deleted my new fixed-size vdi image, and created a dynamically resized image, and everything completed flawlessly.
Lesson - if the gparted step keeps aborting, make sure your new image isn't fixed-size. I don't know why it doesn't work (seems like it should), but that minor change allowed me to grow the disk, and that was more important to me than having a fixed-size disk.
Thanks for the guide!
Eventually, I followed the instructions as stated, deleted my new fixed-size vdi image, and created a dynamically resized image, and everything completed flawlessly.
Lesson - if the gparted step keeps aborting, make sure your new image isn't fixed-size. I don't know why it doesn't work (seems like it should), but that minor change allowed me to grow the disk, and that was more important to me than having a fixed-size disk.
Thanks for the guide!
Ubuntu issue
First of all, this helped tremendously! Thank you!
Second, when I did this with a Ubuntu Desktop 10 64-bit image, it wouldn't boot up after following all the instructions. I suspected that GRUB wasn't happy, so I booted the Ubuntu Live CD, mounted the newly created image on "/mnt" and ran:
sudo grub-install --root-directory=/mnt /dev/sdX
Rebooted, and it worked. Hope this helps others.
Second, when I did this with a Ubuntu Desktop 10 64-bit image, it wouldn't boot up after following all the instructions. I suspected that GRUB wasn't happy, so I booted the Ubuntu Live CD, mounted the newly created image on "/mnt" and ran:
sudo grub-install --root-directory=/mnt /dev/sdX
Rebooted, and it worked. Hope this helps others.
Deleting hard disk
I had installed Ubuntu on fixed size 60 gb virtual hard disk image.
Now i'm short withj my 320 gb hard disk on my host os and want to delete VM and get free of 60 gb . I tried to manually delete the image of hard disk...nothing happened it still happened to be occuping 60gb space. Restored my computer and then went to disk manager in SUN Virtual box released hard disk from existing machine and deleted but still my prirmary os had 60gb ocupied!!!!
please tell me how to free my 60 gb
I wanna get rid of it!
HELP!!!
Now i'm short withj my 320 gb hard disk on my host os and want to delete VM and get free of 60 gb . I tried to manually delete the image of hard disk...nothing happened it still happened to be occuping 60gb space. Restored my computer and then went to disk manager in SUN Virtual box released hard disk from existing machine and deleted but still my prirmary os had 60gb ocupied!!!!
please tell me how to free my 60 gb
I wanna get rid of it!
HELP!!!
Awesome guide dude!
I was struggling with how to expand my partition after screwing up the initial windows install. I couldn't download paragon cause my hd was outta space. Your guide put me onto Gparted. That app is the shiznick!
Thanks man
Thanks man
Systems Admin http://www.dnsands.com
The tutorial is excellent and detailed, I did it for a windows 7 .vdi and I just added a couple of steps to get it to work. After setting the 100mb partition boot flag and rebooting, the computer stops at boot with a 0x00000..... error, then restart from the windows 7 CD, run the automatic startup repair, and after VPC reboots, allow it to run chkdsk! you are done!
many many thanks dude
it is such a helpful and straight forward helper, many many thnx for ur effort and time dude,
good luck in ur personal and work life .
good luck in ur personal and work life .
Windows 7
Hello,
Thank you for posting detailed step by step explanation. Does it also work on a Version 4.0.4 VM VirtualBox and Windows 7?
Thanks
Thank you for posting detailed step by step explanation. Does it also work on a Version 4.0.4 VM VirtualBox and Windows 7?
Thanks
builtin
or just use:
VBoxManage modifyhd filename.vdi --resize 46080
That will resize a virtual disk image to 45GB
VBoxManage modifyhd filename.vdi --resize 46080
That will resize a virtual disk image to 45GB
Tech architect
Excellent information, This really worked very nice for me, Was struggling with a lower disk space for Ubuntu and your post helped a lot to increase its size.
Nice articel
I can't find words to thank you. Only i can say is excellent......... article, was looking just for this. thanks a lot...
Worked great with OVB 4.08 !!
Running on Kubuntu Lucid Lynx (10.4). The VB 4.08 menu structure is different from the 3.x version but the instructions were detailed enough to allow one to navigate the new VB menu and achieve the same results.
Good Job!
Good Job!
How can I mount the GParted.iso with VirtualBox 4.0.8?
Hello, thanks for this guide, but I have a different version of VirtualBox and I am lost as to how I could mount the GParted.iso. Please help. The GUI is very different. Please help!
builtin You saved my day!
Just wanna thank builtin for sharing that very short but simple command. Very very helpful. Thank you!!!!
http://toto-share.com
very clear explanation. I am success use your method. thank you for sharing this tutorial
100% easy and quick
This was very helpful. The longest part was down loading the Gparted iso, because everything else was a snap!
Thank you for the screen shots and the simple step by step guid.
Thank you for the screen shots and the simple step by step guid.
Reinstalling Grub after resize
I followed this guide to create a new 20GB drive to replace an 8GB drive (virtual drive, with VirtualBox) and after booting I got nothing. After a while I realised it was that the grub boot loaded was not on the new drive (especially since it was installed into /dev/sda on the original drive and I only copied /dev/sda1 - there is no option to copy the whole sda device).
Anyway, the steps were:
1. Load the gparted CD with the new drive loaded (the one that won't boot up)
2. Open a terminal.
3. Type "sudo -s" to become root.
4. Issue these commands to reinstall grub, using the content of the new drive itself as the source for configuration.
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
update-grub
grub-install /dev/sda
Then, "reboot", remove the CD and off you go.
Worked a treat for me.
Anyway, the steps were:
1. Load the gparted CD with the new drive loaded (the one that won't boot up)
2. Open a terminal.
3. Type "sudo -s" to become root.
4. Issue these commands to reinstall grub, using the content of the new drive itself as the source for configuration.
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
update-grub
grub-install /dev/sda
Then, "reboot", remove the CD and off you go.
Worked a treat for me.
Great Post - 1 suggestion though
Great post, saved my hiney
One suggestion though -
The new VDI disk I created in VirtualBox, had no Partition Table for some reason - So the instructions on GPart didn't work smoothly (I got an error message when trying to paste into the 2nd disk).
After clicking "Device>Create Partition Table" like the error msg suggested, everything ran smoothly.
cheers,
Robot55
One suggestion though -
The new VDI disk I created in VirtualBox, had no Partition Table for some reason - So the instructions on GPart didn't work smoothly (I got an error message when trying to paste into the 2nd disk).
After clicking "Device>Create Partition Table" like the error msg suggested, everything ran smoothly.
cheers,
Robot55
Simple. 1 Command almost does the trick.
VBoxManage clonehd --existing xp.vdi XP_10GIG.vdi
>existing< >NEW<
VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%…10%…20%…30%…40%…50%…60%…70%…80%…90
%…100%
Clone hard disk created in format ‘VDI’. UUID: 1366bb7f-e827-41de-90ce-763e82309f26
>existing< >NEW<
VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%…10%…20%…30%…40%…50%…60%…70%…80%…90
%…100%
Clone hard disk created in format ‘VDI’. UUID: 1366bb7f-e827-41de-90ce-763e82309f26
easy use
A lot of partition softwares can resize partitions, among which my favorite one is easeus partition master. Download it to save you problem.
Thanks
Thanks, due to that info I saved myself a few hours of time not having to search around on how to accomplish this task...
ZoneAlarm (if installed) kills internet access in new copy
Need to uninstall ZoneAlarm and install again
Excellent How-To
Had a problem installing Office 2007 on Win XP Pro running as a VM on VirtualBox on an Ubuntu 10.04 host. This worked fine. Only differences was I have VBox 4.1, and ran a PartedMagic 6.2 Live CD to do the copying. The host machine is a DELL Inspiron 1521 which I have recycled to be my network troubleshooting machine. MD Turion 64 Dual core with 4Gb DDR2 has allowed me to run the XP VM as if it was a dual core with 2Gb RAM. Apart from the time it took to find this post the whole thing has been quite painless.
Thanks for the really helpfull post. I have sent you a donation as a thank you.
Thanks for the really helpfull post. I have sent you a donation as a thank you.
Macintosh version of (now) Oracle VirtualBox 4.x: No "New" disk option
I'm using this on the Macintosh build of Oracle VirtualBox 4.x. For step two they have canted the name to Virtual Media Manager instead of Virtual Disk Manager. But the big problem is there is no option for creating a new disk. They only have the options to copy, modify and remove disks. Any work arounds for this?
And now: How to shrink?
But how do i shrink my vbox? Accidently resized my vbox to 30TB, which is not supported by GParted - so: how to shrink (not compress!)??
...
Hannes try this command
VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB
If this doesn't work I think you could use another Live CD which from which you will install the parted utility. I think this will allow you to resize such a big partition. I am not sure it will work though.
Let me know which one worked for you.
VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB
If this doesn't work I think you could use another Live CD which from which you will install the parted utility. I think this will allow you to resize such a big partition. I am not sure it will work though.
Let me know which one worked for you.
Thank you
It worked. I stayed 6 hours prior to finding this, to work on a solution to make the partition bigger.
Thank you very much.
Thank you very much.
Windows Server 2008 R2
On a Windows 2008 R2 server image, I was not able to boot,
so I booted from a Windows Server 2008 R2 DVD and choose repair. Then I chose Command Prompt. The command prompt will show you: X:Sources. CD to the Recovery directory and run StartRep.exe. The full path is X:SourcesrecoveryStartRep.exe. Now it boots, and begins to check the disk.
so I booted from a Windows Server 2008 R2 DVD and choose repair. Then I chose Command Prompt. The command prompt will show you: X:Sources. CD to the Recovery directory and run StartRep.exe. The full path is X:SourcesrecoveryStartRep.exe. Now it boots, and begins to check the disk.
Best.Install-Upgrade Guide.Ever
Oh hell: my Vitual Box partition is too small! Shouda made it bigger or resizable!
%$#@!! Shared folder won't do what I need.
Arrrgh! VirtualBox config doesn't have the ability to expand itself!!
(sigh) maybe there's something on the web that will get me out of this ...
And here it is. A paragon of its genre.
Many thanks!
Cosmic
%$#@!! Shared folder won't do what I need.
Arrrgh! VirtualBox config doesn't have the ability to expand itself!!
(sigh) maybe there's something on the web that will get me out of this ...
And here it is. A paragon of its genre.
Many thanks!
Cosmic
Right On
Its been a few years since you posted it, but it was spot on perfect for me.
Running Fedora16 with an XP guest.
Thanks soooooooo much,
Brett
Running Fedora16 with an XP guest.
Thanks soooooooo much,
Brett
In case the above solution do not work (it was my case)
1 - Follow the steps until the one that indicate to boot with gParted (inclusive)
2 - When gParted opens, close it and open the terminal
3 - Type: sudo dd bs=12M if=/dev/sda of=/dev/sdb (where, sda is the source disk - the small one, and sdb is the destination disk, the largest one)
4 - After this use the windows manage disk tool to expand the disk.
Leandro.
2 - When gParted opens, close it and open the terminal
3 - Type: sudo dd bs=12M if=/dev/sda of=/dev/sdb (where, sda is the source disk - the small one, and sdb is the destination disk, the largest one)
4 - After this use the windows manage disk tool to expand the disk.
Leandro.
VBoxManage
@Axel,
Thanks for the tip; however, it seems that the default for VB is the VMDK image. I converted a new drive using this tutorial to a VDI. I will need to shrink it down and will post my results of using the VBoxManage command as soon as I am done building the VBox.
Thanks,
Brett
Thanks for the tip; however, it seems that the default for VB is the VMDK image. I converted a new drive using this tutorial to a VDI. I will need to shrink it down and will post my results of using the VBoxManage command as soon as I am done building the VBox.
Thanks,
Brett
Used your instructions to copy to a smaller vdi hard disk
Thanks for your instructions with which I was able to downsize from a 40 GB dynamic sized vdi with Windows XP to a 30 GB fixed size storage vdi. I was running out of space on my host partition. The original 40 GB vdi was only using 20 GB, and I knew that 30 GB was sufficient for me to work with. Following these steps:
1) start the original vdi and log into as administrator
2) defragmented the volume (Start > Accessories > System Tools > Disk Defragmenter)
3) note how many GBs are used on the volume (you can use My Computer > Properties)
4) shutdown the VirtualBox session of Windows XP
5) create the new smaller virtual disk and attach it to the session's storage (in the session's setting window). though it is smaller than the original vdi, make sure the smaller vdi isn't too small. If your volume is under 2 GB, Windows will complain and performance will degrade in my experience and things like Windows update could fail because of lack of space. Having a 10 GB buffer was sufficient for my needs.
6) insert the CD containing GParted (I used Puppy Linux)
7) start the session (boots into Puupy Linux). open GParted. (Make sure the virtual disks are not mounted)
using GParted, resize the original vdi to the size of the smaller vdi. commit the changes
9) copy the partition of the original vdi to the partition of the new (smaller) vdi. be patient - this takes time and may look like GParted hangs but it hasn't
10 ) make the new vdi bootable (right click the partition, and check boot under the flag options)
11) shutdown the session
12) remove the CD
13) detach the original vdi and make the new vdi the Primary Master
14) start the VirtualBox session. Windows will run chkdsk but should run fine afterwards
Thanks for guiding me!
11) lo
1) start the original vdi and log into as administrator
2) defragmented the volume (Start > Accessories > System Tools > Disk Defragmenter)
3) note how many GBs are used on the volume (you can use My Computer > Properties)
4) shutdown the VirtualBox session of Windows XP
5) create the new smaller virtual disk and attach it to the session's storage (in the session's setting window). though it is smaller than the original vdi, make sure the smaller vdi isn't too small. If your volume is under 2 GB, Windows will complain and performance will degrade in my experience and things like Windows update could fail because of lack of space. Having a 10 GB buffer was sufficient for my needs.
6) insert the CD containing GParted (I used Puppy Linux)
7) start the session (boots into Puupy Linux). open GParted. (Make sure the virtual disks are not mounted)
using GParted, resize the original vdi to the size of the smaller vdi. commit the changes 9) copy the partition of the original vdi to the partition of the new (smaller) vdi. be patient - this takes time and may look like GParted hangs but it hasn't
10 ) make the new vdi bootable (right click the partition, and check boot under the flag options)
11) shutdown the session
12) remove the CD
13) detach the original vdi and make the new vdi the Primary Master
14) start the VirtualBox session. Windows will run chkdsk but should run fine afterwards
Thanks for guiding me!
11) lo
Thank you very very much
Thank you very very much for your help
I was in the need, And actually all work fine
Cordially.
I was in the need, And actually all work fine
Cordially.
Thanks
I just sent a modest donation. Thanks for a slick guide to a process that I assumed was impossible. :-)
...
I'm sorry for not replying sooner Ron and all the other folks! I am glad to hear that this guide is still helpful for so many people!
Ron I really appreciate the donation. Thank you very very much.
Ron I really appreciate the donation. Thank you very very much.
Write comment