Page 1 of 1
[Solved] Hard drive sizes on virtual media
Posted: 24. Jul 2009, 19:46
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?
Re: Hard drive sizes on virtual media
Posted: 24. Jul 2009, 19:52
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.
Re: Hard drive sizes on virtual media
Posted: 24. Jul 2009, 22:44
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.
Re: Hard drive sizes on virtual media
Posted: 24. Jul 2009, 22:55
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.
Re: Hard drive sizes on virtual media
Posted: 25. Jul 2009, 13:45
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.
Re: Hard drive sizes on virtual media
Posted: 29. Jul 2009, 23:27
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.
Re: [Solved] Hard drive sizes on virtual media
Posted: 29. Oct 2009, 20:56
by hankyknot
What would the syntax be to increase the size of the virtual hard drive be?
Re: [Solved] Hard drive sizes on virtual media
Posted: 29. Oct 2009, 21:18
by sacsp
What is the appropriate virtual hard drive size ?
Re: [Solved] Hard drive sizes on virtual media
Posted: 30. Oct 2009, 21:18
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.
Re: [Solved] Hard drive sizes on virtual media
Posted: 30. Oct 2009, 21:19
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).