[Solved] Hard drive sizes on virtual media

This is for discussing general topics about how to use VirtualBox.
Post Reply
DrD
Posts: 31
Joined: 12. Jan 2009, 00:47
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux Mint, Win XP, Win 7

[Solved] Hard drive sizes on virtual media

Post by DrD »

Originally when I set up my virtual machines, I set up each virtual drive with a virtual size of 500 gb. Now though I'd prefer to change that to 100 gb. Anyway to change this aspect of a virtual drive without nuking them and starting over?
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Hard drive sizes on virtual media

Post by baf »

Not directly but you could use clonezilla to copy everything to a new smaller vdi.
And before doing that it might be a good idea to use either sdelete(windows) or zerofree(linux ext2,3) to zero unused space so the new vdi is as small as possible.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
DrD
Posts: 31
Joined: 12. Jan 2009, 00:47
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux Mint, Win XP, Win 7

Re: Hard drive sizes on virtual media

Post by DrD »

Interesting... well if there really is no way to dynamically change a virtual drive size, I'll try clonezilla. Not familiar with "zeroing unused space", but it sounds worthwhile.

Curious, any other useful VDI tidbits you'd suggest when making these new drives? Just asking because I'd prefer to only go through this once :)

Thanks for the useful info.
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Hard drive sizes on virtual media

Post by baf »

Well I would still make the new vdi bigger than needed but only partition what you need. That is because its easier to grow a partition then a disk.
As long as its never used it is almost free.
And the reason for zeroing unused space is that once it has been used then it will cost space in the vdi. If it is never written then it wont cost anything.
So cloning would be faster and new vdi smaller.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Hard drive sizes on virtual media

Post by Sasquatch »

You can always resize the partition in the existing VDI to 100 GB, so you have the other 400 GB left in case you need more space. Zerofree the bunch, resize the partition and after that, use VBoxManage modifyhd <filename or UUID> --compact to make the VDI smaller.
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.
DrD
Posts: 31
Joined: 12. Jan 2009, 00:47
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux Mint, Win XP, Win 7

Re: Hard drive sizes on virtual media

Post by DrD »

That makes sense. Puts a cap on your VM size, while allowing for future adjustments at the same time. Thanks for the insight.
hankyknot
Posts: 24
Joined: 28. Oct 2009, 19:51
Primary OS: Ubuntu 8.04
VBox Version: OSE other
Guest OSses: XP, Server 2k3, Vista, 7

Re: [Solved] Hard drive sizes on virtual media

Post by hankyknot »

What would the syntax be to increase the size of the virtual hard drive be?
sacsp
Posts: 1
Joined: 29. Oct 2009, 20:38
Primary OS: MS Windows XP
VBox Version: OSE Debian
Guest OSses: XP

Re: [Solved] Hard drive sizes on virtual media

Post by sacsp »

What is the appropriate virtual hard drive size ?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: [Solved] Hard drive sizes on virtual media

Post by Sasquatch »

sacsp wrote:What is the appropriate virtual hard drive size ?
Whatever you want it to be. You can choose 3 GB, or 300 GB. As long as the OS fits on it, it's appropriate.
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: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: [Solved] Hard drive sizes on virtual media

Post by Sasquatch »

hankyknot wrote:What would the syntax be to increase the size of the virtual hard drive be?
For the file itself? There is none. You can't increase the hard drive size limit of the VDI with current VB. You can use mpack's CloneVDI tool (see Windows and/or Linux Hosts for the topic).
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.
Post Reply