Page 1 of 1

clonehd makes 3/4 size vdi's

Posted: 21. Aug 2009, 06:24
by dewittdale
Using VBoxManage clonehd D:\VirtualBox\804.vdi E:\Virtualbox\8044445.vdi per example creates instead of the original fixed size vdi of 20GB a clone of 14.7GB. VirtualBox 3.0.4 at issue I believe. This never happened with prior versions of virtualbox. How come? This has happened with two similar ubuntu installations. Any theories?

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 08:30
by Spiddeys
Cloning vdi's via vboxmanage didn't work for me either and had similar problem to you. So after reading around i found another solution. Create an exact copy of the vdi you want cloned via windows explorer or via the command prompt, store it elsewhere and/or rename it. Then open up the command prompt, change to the virtualbox directory, and type in the command -> VBoxManage internalcommands setvdiuuid C:\VdiLocation\VdiName.vdi
This command sets a new UUID to the vdi so it is now able to be used by VB alongside the original, then simply create a new machine and select the cloned vdi when choosing to "Use existing hard disk".

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 11:00
by Sasquatch
I'm guessing that the shrinking is because the clone is compacted while being created. It doesn't check for the type of VDI it clones, or it requires an additional parameter to keep it fixed size.

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 12:21
by dewittdale
The Session Information Dialog indicates it's of the same size and the Ubuntu System Monitor seems to indicate the same interior available space as the original copy. It's just the directory on the Host XP that says different. Another element of surprise from 3.0.2 to 3.0.4 was the speed in which the clonehd did the job/task. Quick. Can't say there was any sacrifice in quality. A digital image is exactly the same 'forever'. Thanks for the input. I've yet to get to the bottom of this. Dale

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 12:56
by Sasquatch
If you took the properties of the VM folder, where you also saved the VDI, then maybe you have snapshots. These aren't included in the clone.

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 13:06
by dewittdale
I ain't that dumb but you're correct. In fact I always try to merge the snapshot back to the protective edifice of the first snapshot. When it comes to upgrade or herein cloning, or for that matter host operating system complete backup, I always merge all snapshots. In the case of upgrade or system backup I'll delete the protective snapshot. Upgrade I'll delete all trace of program data. The default is 85Kb for no difference between the two locations. Dale

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 13:18
by mpack
dewittdale wrote:The Session Information Dialog indicates it's of the same size and the Ubuntu System Monitor seems to indicate the same interior available space as the original copy. It's just the directory on the Host XP that says different.
This is normal for a dynamic VDI (which is what you created when you "cloned" it). The guest always sees whatever the virtual drive size is. The size of the host file is another matter, and dynamic VDIs are smaller since they don't contain unused sectors.

VBox... I can't remember which version... changed the clone operation so that instead of a simple file copy it does a more complex recreation of the drive contents. This allows people to eg. clone a VMDK to a VDI, or vice versa, and has other side effects such as a VDI to VDI operation may end up with a cloned VDI that is a different size (usually smaller) than the original, and the cloned VDI is not necessarily of the same type (fixed or dynamic) as the original.

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 13:25
by dewittdale
An important note -- I'm talking about fixed size vdi's. I rarely use dynamic, though Terry's said he finds some speed, or other-some trait which I couldn't fathom. I want max performance so opt for the larger physical hard drives to make that decision easier. Dale

Re: clonehd makes 3/4 size vdi's

Posted: 24. Aug 2009, 14:23
by mpack
dewittdale wrote:An important note -- I'm talking about fixed size vdi's. I rarely use dynamic, though Terry's said he finds some speed, or other-some trait which I couldn't fathom. I want max performance so opt for the larger physical hard drives to make that decision easier. Dale
Yes, I'm aware you thought you were talking about fixed sized VDIs. What I'm saying is that the "clone" operation obviously created a dynamic VDI. The clone name is misleading when describing the currently implemented feature. It's more like a rebuild, and the rebuilt version need have very little in common with the original (as I said before, the "clone" can even be in an entirely different format such as VMDK).