CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Re: CloneVDI tool - Discussion & Support

Postby wmeyer » 28. Sep 2009, 19:54

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!
wmeyer
 
Posts: 47
Joined: 14. May 2009, 18:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7

Re: CloneVDI tool - Discussion & Support

Postby mpack » 28. Sep 2009, 21:10

Thanks for the feedback, I'm glad everything worked! :-)
mpack
Site Moderator
 
Posts: 29172
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 01:24

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 9542 times
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby mpack » 29. Sep 2009, 10:41

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!
mpack
Site Moderator
 
Posts: 29172
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 14:40

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: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 16:24

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 9476 times
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby Sasquatch » 29. Sep 2009, 16:42

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: CloneVDI tool - Discussion & Support

Postby mpack » 29. Sep 2009, 17:21

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.
mpack
Site Moderator
 
Posts: 29172
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 17:28

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.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby Sasquatch » 29. Sep 2009, 17:31

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: CloneVDI tool - Discussion & Support

Postby mpack » 29. Sep 2009, 17:38

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.
mpack
Site Moderator
 
Posts: 29172
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 18:00

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.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby vbox4me2 » 29. Sep 2009, 19:35

Convert to dynamic and then you can resize while windows is running.
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: CloneVDI tool - Discussion & Support

Postby Perryg » 29. Sep 2009, 19:53

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
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CloneVDI tool - Discussion & Support

Postby Sasquatch » 29. Sep 2009, 20:11

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot] and 42 guests