Re: CloneVDI tool - Discussion & Support
Posted: 26. Sep 2009, 03:39
I am just waiting for VMDK support
End user forums for VirtualBox
https://forums.virtualbox.org/
Yes. I had been meaning for a long time to write a little GUI just to help with cloning VDI files. Then one day I needed to make more than a clone; I needed a VM with a much bigger hard drive, so I went through the long procedure you describe. It crossed my mind that if you were to tell someone who isn't a VBox user just what is involved in enlarging a VBox drive, he might burst out laughing! That is what finally made me decide to get to work, choosing to write a single tool that was basically intended for cloning, but which could do those other occasional jobs too (enlarging, compacting).nardrish wrote:But the part I dislike most is when I need to increase disk space. I would formerly ghost the partition, delete the .vdi, create a new vdi with a bigger partition and then restore the ghost image. A pretty time consuming task.
I don't know how VMWare does it, but enlarging a VDI drive has to overcome a basic problem of dynamic VDIs: the block table needs to grow, but the block table is at the beginning of the VDI file. That means you need to move blocks around to make space near the beginning of the file. Now you could certainly do this in-place, but you would be taking an awful risk: a crash or a power cut half way through leaves you with a dead VDI. It's much safer to write a new version of the VDI to a separate file.nardrish wrote:What I'd like to see if VirtualBox can take it to the next few levels up to just increase the disk space without having to clone to get the increase, like in VMWare Server free edition where we can just increase the disk space.
nice prod, but... I wasn't planning on adding vmdk support, first because nobody has mentioned it before, second because I don't remember reading lots of issues with VirtualBox's support for vmdk, so why convert? If you meant vmdk for both read and write... well I wasn't planning to ever offer any alternative to VDI output. Is this just a whim Perry, or do you see a significant demand for vmdk conversion?Perryg wrote:I am just waiting for VMDK support
Clones are independant, that's one of the things that makes them different from snapshots. Deleting the original has no effect whatever on the clone. Or vice versa.demoneye wrote:if i Del the original *.vdi does it impact the clone i made? if so how can it be , since they are not link together ...
cheers
Naw just a whim Don. Trying to make some of my OSes multi-platform and being lazy by nature was hoping for a single place to convert, compact, and change disk size, but I have lived without it this far so not big deal. I will continue to do it the longer, harder way.mpack wrote:nice prod, but... I wasn't planning on adding vmdk support, first because nobody has mentioned it before, second because I don't remember reading lots of issues with VirtualBox's support for vmdk, so why convert? If you meant vmdk for both read and write... well I wasn't planning to ever offer any alternative to VDI output. Is this just a whim Perry, or do you see a significant demand for vmdk conversion?Perryg wrote:I am just waiting for VMDK support
Actually, having glanced at the format spec I can see how they would do it. A vmdk is made up of a series of one or more "extents" (i.e. the disk is split up into pieces, each piece in its own file); and unlike the case of split VHD files, each vmdk extent seems to have its own block table. So, enlarging a vmdk is simply a matter of adding more extents.mpack wrote:I don't know how VMWare does it, but enlarging a VDI drive has to overcome a basic problem of dynamic VDIs: the block table needs to grow, but the block table is at the beginning of the VDI file.
Though I should add however, that while researching how to do that disk enlargment rigmarole I found myself shopping around for disk imaging apps, and that introduced me to Acronis TrueImage, an application I'm now very fond of and use a lot. I would never have realized that an imaging tool had so many uses: backups of course, physical to virtual migration, physical to physical migration, and a superior alternative to Windows Restore!mpack wrote:so I went through the long procedure you describe.
That would be possible within the existing VDI spec: offset to the first image block is a field stored in the header, so the first image block needn't follow immediately after the block table. However the drive would still have a maximum size... and I'm not sure why you wouldn't just fill that extra space with a bigger table right away...vbox4me2 wrote:Here' an idea, create an empty new VDI and mark/create a spare space between the main block and data area, once the VDI needs to be enlarged you dip into this spare space to enlarge the block without having to move data.
If the guest sees a given drive as having a max size of 8GB, but the vdi format has table capacity for 250GB, that would ensure the vdi would not grow unexpectedly and use up all of the host drive it's on (but still to allow intervention to enlarge the virtual drive). This would be important to me and I assume most users.mpack wrote:However the drive would still have a maximum size... and I'm not sure why you wouldn't just fill that extra space with a bigger table right away...
The guest capacity is determined by the partition size, which can already be much less than the drive size. This is a common trick that VBox users have been using for some time to limit dynamic expansion while providing potential for easy enlargement as needed.SecretCode wrote:So the requirement would be to have the vdi file support a larger maximum size than the guest sees as the drive's physical capacity - but to make that apparent physical capacity editable by the user.
Would be wonderful if we can convert tib to VDI!mpack wrote:.. Acronis TrueImage, an application I'm now very fond of and use a lot. I would never have realized that an imaging tool had so many uses: backups of course, physical to virtual migration, physical to physical migration, and a superior alternative to Windows Restore!
I've thought the very same thing, though I don't know if Acronis publish the tib spec.haichen wrote:Would be wonderful if we can convert tib to VDI!
You seem to have some unnecessary steps in there. The only required steps are imaging the physical host with Acronis to create the .tib file, then running Acronis inside the guest, somehow with access to the same .tib, and restore that into a freshly created VM whose virtual hard disk size is at least as big as the old physical PC had.haichen wrote:I want to migrate to Win7 next month. Then I want to use my actual XP further in a VDI. I tried it with Acronis TrueImage Home 2010 from physical->tib->vhd ->vdi, but until now without success (last step qemu-img and vboxmanage). Next days I'll try it with your tool.