CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
Post Reply
wmeyer
Posts: 66
Joined: 14. May 2009, 18:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7

Re: CloneVDI tool - Discussion & Support

Post by wmeyer »

mpack, I converted a 62GB VHD to a 24GB VDI using CloneVDI, and everything worked fine. I had already been using the VHD with VirtualBox, so there was no issue of needing reactivation. I just created a new virtual machine entry, and selected that VDI image. It booted without any problems, and the apps I have used so far are also working fine.

Excellent job! Thanks!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Post by mpack »

Thanks for the feedback, I'm glad everything worked! :-)
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

Here's a good one for you Don.
I converted a vmdk VM to a VDI and VBox can see and use it as a VDI file. Actually it is a lot faster in VDI too.
However when I run your program it say it can not be run on a snapshot. (yet)
Steps I took to create the VDI.
  • (1) I used clonehd to clone the VMDK file and told it to format to VDI normal
    (2) Created a new VM and attached the new VDI.
    (3) tried running it and all was great.
    (4) opened CloneVDI and tried to increase the size.
    (5) no snapshots, or extra drives.
I was trying to extend the disk space and compact, but it would not even clone the drive. I suspect the additional UUIDs in the headers is causing this but I have no way to tell.
I got slapped like I said the wrong thing to an old girl friends. What do you think my friend?
Attachments
OracleXP.jpg
OracleXP.jpg (79.69 KiB) Viewed 43528 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Post by mpack »

Perryg wrote:I suspect the additional UUIDs in the headers is causing this but I have no way to tell?
Hi Perry, you can clearly see in the header that UUID(parent) is non-zero, meaning (according to VBox) this VDI is the child of another disk image, i.e. this VDI is a snapshot. ...I'm surprised this loads in VBox if the virtual disk selected by UUID(parent) doesn't exist.

However I see that the UUID(pmodify) field is zero, which is very odd... This should match the UUID(modify) of the parent, it's there to detect if the parent is modified since the snapshot was created, and should never be zero unless the parents UUID(modify) is also zero, and I don't think that is allowed (in fact I know it isn't, because VBox gave me errors when registering my early VDIs if I left the UUID(modify) field zero).

Ok, before we go any further I suggest you back up that VDI, because we're about to do something nasty to it.

If you are absolutely certain that the UUID linkage shouldn't be there, then you can try patching the header to zero the UUID(parent) field. If you don't already have a hex editor you're familiar with then I like frHed. It's actually the old compact original I like, let's hope the sourceforge community version is still usable. A 10GB file is too big to open at once so you need to use the "Open partially..." option - read 1024 bytes from offset 0 in the file. At offset 0x1A8(424 decimal) you will see the first byte of the 16 byte UUID(parent) field, however note that byte order in the file is slightly jumbled with respect to how the UUID is displayed onscreen. That entire 16 byte field needs to be zeroed. Then File|Save to write the change back to the VDI. I suggest you then check that VirtualBox still likes it before you go any further. If you are wrong and this VDI is relying on a parent disk then the results should be... not good!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

I'll give it a shot later today, but I know the VM is not dependent of any other drive.
It was as export from another computer that started out as a VDI, then moved into another computer as a VMDK using VBox Export. I noticed that the VM was running out of disk space so I converted it to VDI using VBox Manage clonehd, created another VM and tied it to that instead of new HDD. That is when I noticed it was getting small and decided to see if I could use CloneVDI to increase the size. Well the rest you know. Actually I really don't need to tear the file up because I still have the original VDI file I just though you should see this and figure out what the heck went on in case someone else converts a VMDK to VDI and asks why it will not compress, expand, or clone. :wink:
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

Well I decided to give it a shot to let you know if it worked or not.
It worked! I am now the proud owner of a VDI that is 30 Gig, Compacted, and has a new UUID.
So I must conclude that either the export, or the clondhd must have thrown the parent UUID in for what ever reason.
I did notice that XP reports that the drive has 10 Gig allocated and 20 Gig not allocated though. Is this normal?
Attachments
OracleXP.jpg
OracleXP.jpg (21.98 KiB) Viewed 43462 times
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: CloneVDI tool - Discussion & Support

Post by Sasquatch »

Perry, that's normal, because increasing the partition itself is not yet build. It's in his release notes ;).
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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Post by mpack »

Perryg wrote:Well I decided to give it a shot to let you know if it worked or not. It worked!
Good news :-)
Perryg wrote:I did notice that XP reports that the drive has 10 Gig allocated and 20 Gig not allocated though. Is this normal?
Yes, CloneVDI enlarges the virtual drive, but it doesn't modify the partition map. You need to go now and download (if you don't already have it) the GParted Live CD ISO. Mount this in the VM and boot off it, use it to adjust the boot partition to fill the drive (assuming that's what you want to do with the extra space).
 Edit:  One final recommendation comes to mind (for after you've used gparted). Given how full that VDI was, I suspect the filesystem inside will be heavily fragmented, so maybe you should consider doing a "defragment" once you have the extra elbow room to work with. 
Last edited by mpack on 29. Sep 2009, 17:32, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

Yeah I was looking at that but was wanting to see if Windows "diskpart" would extend the partition first. It sees it and understands that it is there and is part of the logical volume but refuses to extend. Oh well enough playing. Thanks for the nudge in the right direction.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: CloneVDI tool - Discussion & Support

Post by Sasquatch »

XP's Disk Manager can't extend the system partition, only Vista and above can do that.
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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Post by mpack »

Sasquatch wrote:XP's Disk Manager can't extend the system partition, only Vista and above can do that.
I've never used Vista: does it actually extend a partition or does it fake it with the dynamic disk feature? I personally would want to avoid the use of dynamic disks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

I had extended partitions using diskpart before but come to think of it I never used it on the boot partition. So I looked it up and sure enough it can not extend a boot or system partition http://support.microsoft.com/kb/886986
Working with gparted will do it though so no problem.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: CloneVDI tool - Discussion & Support

Post by vbox4me2 »

Convert to dynamic and then you can resize while windows is running.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Post by Perryg »

I got it all together with gparted Live. Sweet program don't you think?
Actually I have messed with Windows dynamic drives in the past and find they are slower.
Still they do have a purpose but in this case the easiest was to simply make the entire disk one big partition and be done with it.
The VM is for my boys and their Oracle class where they need plenty of disk space and well it is Oracle. hehehehe
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: CloneVDI tool - Discussion & Support

Post by Sasquatch »

My dad's computer has Vista and I had to shrink the primary partition (only partition) so there was free space to create a data partition. No problems with it, went while Windows was still running but I didn't check if it was a normal partition, or dynamic. Could be fun when I want to install W7 on it, I've heard that dynamic disks cannot be read after a reinstall or change of OS.
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