[Solved] Is there a way to resize the VDI?

Discussions related to using VirtualBox on Linux hosts.

[Solved] Is there a way to resize the VDI?

Postby vboxmember » 19. Apr 2009, 17:57

System Specs:
Host OS: Kubuntu Hardy Haron v8.04
Guest OS: Windows XP Professional SP3
CPU: Intel Quad Core Extreme
RAM: 4GB
VDI Specs:
Type: Dynamic
Size Allocated: 10GB
Size Used: 8GB
HD Specs: (the HD partition where the VDI is stored)
Physical Size Allocated: 40GB
Physical Size used: 8GB

Description of Problem:
I ran out of hard disk space for my Guest OS.

Superfluous Note: This is a fresh install of the Guest OS with MSOffice full and nothing else but the system updates (a minimum of 5 hours to install).

Important Note: I've read the information in the VirtualBox manual and in the tutorial called "All about VDI's" located at: "http://forums.virtualbox.org/viewtopic.php?p=29276#29276". When following this tutorial, I was able to get the gparted live CD (iso) file mounted as a boot disk for the guest OS. However, when the gparted live CD booted, it only recognized the 10GB limit of the vdi file itself and not the actual 40GB space of the physical HD the vdi file is located within.

Question:
Is there a way to resize the VDI? Or is the only way to do this to start over and use a larger sized VDI file to begin with?
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby Sasquatch » 19. Apr 2009, 19:11

If you found the tutorial, you would also have found the VirtualBox FAQ. Read it, follow the relavant links and come back here when you're done. The VM doesn't see the Host hardware.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Is there a way to resize the VDI?

Postby vboxmember » 19. Apr 2009, 19:40

Thank you for your response, I appreciate the input about being thorough in researching a topic before posting.

The VirtualBox FAQ takes you to the Tutorial that I already read (as was stated in my first post).

My original problem still stands as it was originally stated.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby Sasquatch » 19. Apr 2009, 19:48

You complement me for reading your post, but you fail to read the FAQ properly. It doesn't mention only the resizing question, it mentions a lot more. Like what a VM is, something you don't understand, it seems.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Is there a way to resize the VDI?

Postby vboxmember » 19. Apr 2009, 20:05

Clarification:
I do not wish to resize the partitions inside the VDI. Instead I want to resize the allocated space available for the VDI itself.

Note: The tutorial shows that you can resize a partition inside a VDI up to the amount of allocated space available for the VDI.

Clarification of nomenclature (3 points):
1. A VDI partition space.
2. A VDI allocated space.
3. The space available for the VDI file in a "real (non-virtual)" partition on a physical HD.

The VDI partition is the Virtual Disks partition size which lives inside the VDI's allocated space.
The VDI allocated space is the size of the Virtual HD itself which lives within the "real (non-virtual)" partition of a physical HD.

Question restated:
Is there a way to change the VDI virtual HD size? (Meaning the allocated space for the Virtual Disk itself, not the partitions within it.)

Thank you again for taking the time to read this post.
I sincerely appreciate your input.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby vboxmember » 19. Apr 2009, 20:25

Sasquatch,

Are you implying that I use a hex editor to hack the VDI header to make the virtual disk larger?

Its an interesting thought and I guess it might work, but I'd rather not mess around with hex bits if I don't have too.
If I can't find an alternative solution, I'll give the hex editor a try and if it works I'll post the results.

Your surly remarks about my not understanding what a VM is were unwarranted and are not appreciated, but I do appreciate your implications about hex edits.
Thanks.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby hank_se » 19. Apr 2009, 20:53

I was in that situation a year or so ago, I created a new VDI and moved most
of my data to that. Solved my problem and doesn't add much of a new problem.
hank_se
 
Posts: 101
Joined: 16. Apr 2009, 11:36
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: windows xp

Re: Is there a way to resize the VDI?

Postby vboxmember » 19. Apr 2009, 21:25

hank_se:

Were you running XP as a guest OS at that time?

Did you accomplish the transfer by
1. Making an extended virtual partition
2. Then a simple copy straight across from one virtual drive to the other.
3. Then using fdisk or gparted or some other disk managing software to erase the original partition and to make the newly copied extended partition into a primary bootable partition.

If this was how you accomplished your transfer, did you notice any instability in your virtual XP after you did this? Did you encounter any data loss?

Thanks again for your input.
I sincerely appreciate it.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby Sasquatch » 19. Apr 2009, 21:43

Vboxmember, let me ask you something. Can you add a platter to a physical hard drive and thus increasing the capacity of the drive? The answer is no, you can't. The same is true for the VDI files. What you fail to understand about the tutorial for increasing the size, is that you "clone" the drive to a larger one, but the full size isn't used. Instead, the partitions are copied and they maintain there size. If you create an image of a 10 GB drive and restore it on a 20 GB drive, half the space will be unallocated, because the base partition only covered 10 GB. Skipping the GParted part of the tutorial will achieve what you want.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Is there a way to resize the VDI?

Postby hank_se » 19. Apr 2009, 21:51

I run xp home as guest.
I simply created a new dynamic disk image, partioned and formatted it in the xp guest,
moved over my data folders from the original disk, "educated" my programs, really not
many, to use the folders at the new drive, not much work. But of course I still continue to
use the first drive for programs and for booting, never wanted to start fiddling with trying
to emigrate that to a new drive.
hank_se
 
Posts: 101
Joined: 16. Apr 2009, 11:36
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: windows xp

Re: Is there a way to resize the VDI?

Postby vbox4me2 » 19. Apr 2009, 22:29

Itsa simple,
1. copy contents of VDI a to VDI b (clonezilla)
a=10gb
b=50gb
2. resize b (gparted)
3. swap VDI a with VDI b

Done, eat cake, drink coffee.
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: Is there a way to resize the VDI?

Postby vboxmember » 24. Apr 2009, 02:46

vbox4me2,

Thank you for posting a plain, simple, straight to the point answer that actually works.
Your answer cut right to the chase and solved the problem without waisting any more of anyones time.
Thank you.

Sasquatch,
You could learn from vbox4me2's example of how to accurately solve a problem by actually being helpful instead of rambling on about stuff thats not important.
If you think I don't understand something then complaining that I don't understand it and following that up by telling me to do the same thing that lead to my not understanding it in the first place isn't going to help, and by the way you can add another platter to a HD and increase its capacity. Also the tutorial does an extremely poor job in explaining how to clone a VDI file. If it was clear then people wouldn't have to resort to using other means such as "clonezilla".
Not to mention the fact that non of the VboxManage commands work anyway, at least not on my setup.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby Sasquatch » 24. Apr 2009, 12:19

vboxmember, I disagree about the helping part, vbox4me2 only stated in a list what I said. I do agree with you that I need to add some structure to my posts so they become easier to understand.

And no, you can't add a platter to a physical hard drive, as there isn't any room for it, nor does it have the read/write heads for it. Unless you change the whole inside, it can't be done ;). But that's for another discussion.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Is there a way to resize the VDI?

Postby vboxmember » 24. Apr 2009, 17:22

Sasquatch,

Ok, even if it was a bit long winded I agree that you were being helpful in your second from previous post and I appreciate that, but after reading my posts, I did state quite clearly which tutorials I was reading. I even posted a link to the one I had found, and the one that I had found was not helpful because it was explaining everything about how a VDI worked and it mentioned very briefly how to use the vboxmanage clonehd command, but the vboxmanage commands apparently don't work on the non-OSE versions of Vbox. What I needed was a redirect to the discussion I found last week here at "http://forums.virtualbox.org/viewtopic.php?f=1&t=8580#p70743" under the sections tittled "Making a VDI larger.", "Cloning a VDI.", and "Cloning to enlarge a VDI."

Those posts were very helpful but also difficult to find because they are farther down the page, and in sticky posts on forums the important information is typically the first post in the thread, the rest are typically people complaining about how it didn't work for them. This is why I didn't look farther down the page to notice that there was another entire section of important links that could be researched. I would have found those links if they were made more visible (as in being the first post in the thread), this might also account for why people keep asking the same question and are having a difficult time finding the answer.

Also if someone could mark this thread as solved or tell me how to do that that would be cool.
Thanks.
vboxmember
 
Posts: 33
Joined: 19. Apr 2009, 05:08
Primary OS: Ubuntu 8.04
VBox Version: PUEL
Guest OSses: Windows XP

Re: Is there a way to resize the VDI?

Postby Sasquatch » 24. Apr 2009, 19:43

The vboxmanage command does work with the non-OSE, it's just that Linux is case sensitive and the command is thus VBoxManage. You can change that behaviour for tab completion if you change /etc/inputrc and add set completion-ignore-case on at the bottom. But cloning, AFAIK, doesn't increase the maximum size. Doesn't matter anymore, you've got it working.

I will mark this as solved. Next time you can do it yourself, if you edit your first post that started the topic and change the subject field.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Next

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 9 guests