Howto increase hard disk size after installing a guest OS

This is for discussing general topics about how to use VirtualBox.
jiapei100
Posts: 14
Joined: 19. Feb 2008, 22:21
Location: England
Contact:

Post by jiapei100 »

Yup, any solution to this question?

How to enlarge the Guest Driver size?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

jiapei100, if you want an answer to your Q then read the previous content of this topic.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
mmangold
Posts: 1
Joined: 21. Jan 2009, 16:53

Re: For windows xp in linux to increase vdi size

Post by mmangold »

alexsurender wrote:1.In current running winxp vm, in its details click on the hard disk.
2.In primary slave add a new vdi file to current working primary master.
3.Now start winxp vm, when os completes loading the new vdi will not be visible in my computer.
4.Goto control panel->administration tools->computer management->disk management.
5.Now u will see the new vdi hd space, right click and initialize it then windows will ask u volume name and will ask to format in ntfs.
6.Give volume name dont format, after finishing close the disk management.
7.Goto my computer u will see the new partition now format it to ntfs or fat32 and use it.
8.enjoy
9.Long live virtualbox
This fix was very quick and easy! Have you tried to merge these disks with PartitionMagic (or some other tool) using this technique?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

If you are going to use PM, then don't bother to merge. Surely by far the easiest way is to just copy the partition onto the new disk then enlarge it?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
fmustang76
Posts: 1
Joined: 1. Feb 2009, 01:15

Use HDClone free

Post by fmustang76 »

Many ways were mentioned so I figured I'd post my experience using solutions from above except I used HDClone. Since it copies entire hard drive bit for bit, it should work with any partition type or any OS.
  1. Create 2nd larger size .vdi hard drive image.
  2. Set as slave in specified Virtualbox.
  3. Download and mount ISO for HDClone free.
  4. Make sure boot order is set to Cd-Rom before hard drive. Boot Virtualbox.
  5. Follow HDClone prompts to copy old hard drive to new hard drive.
  6. Auto increase size of partition when asked.
  7. When done, set new hard drive image as master in Virtualbox.
  8. Format, and set as slave or delete 1st hard drive image.
Done!

Worked just like that for me the first time. This was the only way I tried and seemed very easy and simple versus other ways mentioned above. Paid versions of HDClone have more options but the Free Version works for moving to a larger hard disk drive with automatic upsizing.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Hi, fmustang76 and welcome to our forum. You might want to browse the Forum Posting Guide.

I hope that you don't mind, but I tidied up your post and moved the URL inline to the first reference of HDClone Free. As moderators we are a bit uneasy about 3rd party product plugs, but if as you say this is a free tool which does the job then why not let the community know about it. What I am a little confused about is that the Clonezilla ISO does this as well and it is open source without any "free option" rate throttling.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
rAzed
Posts: 1
Joined: 4. Feb 2009, 16:47

Post by rAzed »

klaus wrote:No. Just like a real hard disk cannot be extended easily just because it's full. Eventually we'll implement increasing (and decreasing) the size of a disk image, but that's quite some (tedious) work and currently has no particularly high priority. Help is always welcome.
Hi, i don't understand why it is impossible. Other such as VMware have a command line utility to increase site of Virtual Disk Drive and there is no problems with that.

Using Virtual Environements is for more simple use, if the Virtualized Computer have the same restriction that a real one, there is no interest.

Do you plan to integrate this feature ?
reidi
Posts: 19
Joined: 19. Jul 2007, 21:43

Re: Use HDClone free

Post by reidi »

fmustang76 wrote:Many ways were mentioned so I figured I'd post my experience using solutions from above except I used HDClone. Since it copies entire hard drive bit for bit, it should work with any partition type or any OS.
  1. Create 2nd larger size .vdi hard drive image.
  2. Set as slave in specified Virtualbox.
  3. Download and mount ISO for HDClone free.
  4. Make sure boot order is set to Cd-Rom before hard drive. Boot Virtualbox.
  5. Follow HDClone prompts to copy old hard drive to new hard drive.
  6. Auto increase size of partition when asked.
  7. When done, set new hard drive image as master in Virtualbox.
  8. Format, and set as slave or delete 1st hard drive image.
Done!

Worked just like that for me the first time. This was the only way I tried and seemed very easy and simple versus other ways mentioned above. Paid versions of HDClone have more options but the Free Version works for moving to a larger hard disk drive with automatic upsizing.
NOTE: You MUST discard all snapshots before doing this.
NOTE 2: I tried this with the free Clonezilla suggested by TerryE's post. It did not work for me. This could be because CloneZilla asks a few questions I was unsure how to answer.

I found fmustang76's method using HDClone to work very well, although it took an hour to process a 9 GB vdi. HDClone (free version) doesn't ask much - it's hard to go wrong.
shoot-me
Posts: 6
Joined: 30. Jan 2009, 17:31

Post by shoot-me »

Like wise

Clonezilla didn't leave me a bootable vdi. Maybe I got the partition settings wrong.. I know that if I look at the partition I can see it was bootable, i could boot the xp cd and look at the files etc, i tried fixboot no change and then tried fixmbr.. no change.

HDclone 3.7 (basic free) - worked for me also,though I have to say previous versions of it didn't. What I did see though when using HDclone 3.7 were some read and write errors. I ended up with a bootable xp guest,but I didn't feel comfy with those errors.

The other solution i tried was the Acronis True Image Home 2009, I only did a test using the 15 day trial. Since there seems to be rules etc about recommending non-free products, all I have to say is that for 15 days free.. it did the job for me. I booted up, it said it corrected a few things and away it went.


so shoot me.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Nope, I didn't say that you can't recommend none-free products and if you look I even tidied up the link to the site. I get just a little uneasy about too much plugging, that's all. After all, we are here to support VBox.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
aef110
Posts: 10
Joined: 25. Oct 2008, 11:43

Post by aef110 »

Just wanted to give fmustang76 a big thank-you for sharing this method. Worked for me!

Let me caution that it's best to schedule a chkdsk from within an XP VM before copying that VDI. HDClone detected some errors (I think in the partition size table or something) the first time I tried this. To be safe, I ran chkdsk on the original VM, which corrected these errors; then I copied again and it worked beautifully.
laroald
Posts: 26
Joined: 22. Jan 2008, 18:19

Post by laroald »

I didn't succeed by HDClone but Clonezilla solved the job. On my XP prof I managed to clone a 8gb hd with Kubuntu over to a new 11 gb hd. Thanks!
runawaykite
Posts: 2
Joined: 9. Feb 2009, 06:29

Post by runawaykite »

HDClone v3.7 did as it said, copied successfully for 10GB to 2TB. Some issues ...

1. Speed throttling for free edition
2. Hang after Auto-expand (3X)

I just forced a shutdown, but the new disk could boot successfully. However, My Computer reported the old size (10GB), and not the new size(2TB). However, disk management and disk management software all reported 2TB.

Thinking that the Partition Information is probably not changed. I want to try and use a partitioning software to try to rewrite the partition information without going through a 2 hour cloning process. Easeus did not work. What software should I use and would it damage my dynamically expanding disk?

Thanks
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Post by mpack »

runawaykite wrote:HDClone v3.7 did as it said, copied successfully for 10GB to 2TB.
2TB? What size is the host HD?

IMHO it's a bad idea to have a virtual drive which is a significant fraction (or even larger than!) the host HD, I can see awkward things happening inside the guest (disk errors) when the host runs out of space.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

+1 on what mpack says.

With NTFS systems, many tools will expand the partition, but not expand the filesystem to use the whole partition. If you are using an NTFS optimised tool such as partition magic, it will do it for you, but with Linux liveCDs you need to use an ntfstools utility to do this.

Allocate 2TB to the VDI if you must, but I strongly advise against expanding the VDI / partition to more than say 50% that you use in normal use, and leave the rest unallocated. You can always expand it again is your needs increase to the point where the partition is getting more than 80% full.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply