How to convert a fixed-sized disk into a dynamic one?

This is for discussing general topics about how to use VirtualBox.
Post Reply
pistacchio
Posts: 1
Joined: 5. Mar 2009, 00:10

How to convert a fixed-sized disk into a dynamic one?

Post by pistacchio »

Like in the subject. I'm Using Linux (Ubuntu) as Host and Windows XP as Guest. The current .vdi is 10 GB and I'd like to make it grow dynamically. Or alternatively change its size to a larger one.

Any help appreciated.
GdP
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: How to convert a fixed-sized disk into a dynamic one?

Post by vbox4me2 »

Create a new dynamic VDI and use the clonezilla liveCD iso version.
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: How to convert a fixed-sized disk into a dynamic one?

Post by Sasquatch »

See the VirtualBox FAQ for changing the virtual drive size.
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.
compay
Posts: 35
Joined: 19. Sep 2008, 09:48

Re: How to convert a fixed-sized disk into a dynamic one?

Post by compay »

I've made it with VBoxManage like this:
"VBoxManage clonehd -format RAW <fixed-size VDI> <clone hard disk in format RAW>"
and then:
"VBoxManage convertfromraw <clone hard disk in format RAW> <dynamic VDI>"
If you defrag your HDD in the guest and write zeros to freespace, as explained in the tutorial, you will end up with a compacted VDI as well.
The reverse:
"VBoxManage clonehd -format RAW <dynamic VDI> <clone hard disk in format RAW>"
does not seem to function - why? - I do not know till now, and still get no explanation in this forum.
sgornick
Posts: 1
Joined: 19. Nov 2009, 22:31
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: XP Pro

Re: How to convert a fixed-sized disk into a dynamic one?

Post by sgornick »

Post Reply