CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Re: CloneVDI tool - Discussion & Support

Postby mpack » 22. Jan 2014, 14:43

How did you get CloneVDI to accept the OSFClone disk image? I'm guessing you persuaded CloneVDI that it was a raw image. If you do that and the image isn't really raw, e.g. if it includes a header, then the resulting vdi will be garbage. To clarify: CloneVDI locates your raw file on the disk just like you told it to, but since it isn't really a raw disk the result is not usable.

I would expect commercial disk imagers to put enough of a header on their image files so they can at least identify their own files. You can easily tell it's not a raw file because it will not be exactly the same size as the disk or partition which was imaged.

You might be able to image the drive by booting up the XP partition and cloning the drive directly to VDI format using CloneVDI. See the release notes.

Incidentally: logical partitions are ignored by CloneVDI; the current version is only interested in primary partitions. This also means that filesystems embedded in a logical partition are not supported partitions for the purpose of compacting and resizing. You might be better off cloning the XP partition on its own.
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 saberman » 22. Jan 2014, 22:16

>I'm guessing you persuaded CloneVDI that it was a raw image.
The image file created by OSFClone has a .img extension and CloneVDI looks for those.

>if it includes a header, then the resulting vdi will be garbage.
OSFClone creates a forensic image of the drive -- every sector is copied and nothing is added. Please note that VDI was able to read the MBR and the partition information so at least the begining of the drive is correct.

>This also means that filesystems embedded in a logical partition are not supported partitions for the purpose of compacting and resizing. You might be better off cloning the XP partition on its own.
The Windows XP partition has to be the E: drive. That happens automatically if it is the third physical partition on the drive. Can I use CloneVDI to copy the four partitions to a single VDI?
saberman
 
Posts: 277
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows XP, 7, 8.1, 10

Re: CloneVDI tool - Discussion & Support

Postby mpack » 23. Jan 2014, 11:52

The fact that it uses an extension that CloneVDI accepts doesn't actually prove that it's a raw image. Nor does being a forensic image imply that (all that's implied by "forensic" is that it's a lossless coding of the original). Like I said, the way to know for sure is to look at the file size.

saberman wrote:Can I use CloneVDI to copy the four partitions to a single VDI?

You mean use CloneVDI to do the P2V? Frankly, I don't know. It depends on whether "\\.\PhysicalDrive0" still refers to the entire boot disk when XP is booted from such an unusual partition arrangement. I suspect that it should work, especially if you can normally "see" the first (FAT) partition (as C: ?) when XP is running. However you can only using CloneVDI for cloning and disk enlargement. You can't use any of the extra features such as compaction and partition enlargement.
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 sysadmroman » 23. Jan 2014, 15:57

THANK YOU!!!
sysadmroman
 
Posts: 1
Joined: 23. Jan 2014, 15:56

Re: CloneVDI tool - Discussion & Support

Postby JoTraGo » 21. Mar 2014, 18:52

Multi Disk VM CleanUp & Compact.

I have several (up to 6) VBoxes configured on my laptop, and keeping them to a mangeable size has been a challenge until I discovered your CloneVDI (Lifesaver! :mrgreen: )
I am in the habit of creating a separate Data VDI for my VMs, I find this helps prevent the System VDI from growing too alarmingly, and a separate VDI is easier to back up and re-create to shrink the space, as I have been doing up to now.

Typicall one gets to the point where the Dynamic VDIs have become large on Host Disk even if they are reasonable in the Guest, and the VDI's have a number of snapshots, which starts getting messy.

Now that CloneVDI can do the shrinking I have found the following Procedure Works for Cleaning Up a VM. (Some items may be windows specific, but you get the idea)

1. In the Guest OS, clean up the Volumes
2. Defrag and if possible, pack all data at the front of the drive (MyDefrag Can do this for Windows)
3. Shutdown the Guest
4. In VBox Select the appropriate Snapshot and do a FULL clone which will consolidate all the snapshots into a single VDI file (or files if you have multiple disks) and generate a new VM-Clone copy
5. Shut Down VIrtual Box
6. Run CloneVDI
7. Clone all the newly consolidated VDIs in place in the Cloned VM Folder Selecting Keep UUID, and Compact
8. Rename Original VDI FIles old-vdifile.vdi or similar
9. remove the "Clone of" from the CloneVDI generated files.
10. Fire up the VM and check all is well.
11. Delete the Old VDI Files from the current VM Folder, and Delete the Original VM Folder.

The only two problems with this are that when you Clone a VM with VBox it renames the Cloned VDI files to generic names (and I haven't found out how to rename them) and it requires a fair amount of free space (Up to 2-3 times the size of the original VM, or you have to backup copies at the intermediate steps)

Does this sound like a good (even best ) strategy for achieving this?

Thanks for a great tool Don
JoTraGo
 
Posts: 3
Joined: 13. Jan 2014, 11:14
Location: Cape Town
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, Mint, WinXP, Win7, Win2008, FreeDos, MSDos, Win95, Win2012, Win10, Sophos

Re: CloneVDI tool - Discussion & Support

Postby mpack » 21. Mar 2014, 18:59

Thanks for the nice feedback.

One tip: the "Clone of ..." dest filename is just a default, i.e. you can change it. In particular, if you make the dest path/filename the same as the source then CloneVDI will do that in-place filename juggling for you. The old VDI will end up named "Original filename.vdi". Yes, I'm aware that it seems to tempt the rage of the computing gods to make source and dest filenames the same: obviously CloneVDI had to check for that condition, but instead of making an error of it, I do what I think the user intended.

Also: when VirtualBox clones a VM the cloned main VDI file is given the name of the clone VM ( + .vdi), provided it originally had the name of the old VM. For example if you have a VM called "Homer" whose main VDI was called "Homer.VDI", and you clone this to a new VM called "Marge" then the main VDI clone will be called "Marge.vdi". This would cater for the majority of users. Obviously your case is different in that every VM has a second disk which must therefore have some other name.
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 JoTraGo » 21. Mar 2014, 19:19

Thanks for the Tips.
Now that you mention it I do remember reading in the release notes about using the same names. I'll remember that for next time.

With multiple disks, as you say the Main Sysstem disk takes the name of the VM which is fine, but the others which may have been named, say Data.vdi & SQL.vdi become vmname-disk1.vdi and vmname-disk2.vdi etc.

There appears to be only one entry per disk volume in the .vbox file, perhaps I could rename the file and edit it's entry in the .vbox file, or is the file name likely to be embedded elsewhere in the VBox config
JoTraGo
 
Posts: 3
Joined: 13. Jan 2014, 11:14
Location: Cape Town
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, Mint, WinXP, Win7, Win2008, FreeDos, MSDos, Win95, Win2012, Win10, Sophos

Re: CloneVDI tool - Discussion & Support

Postby Seadart » 30. Apr 2014, 18:13

HI,
Great tool, but I am very new to this and having problems creating new disc.
I am linux Mint Host and XP guest, I have successfully made a 10 gig disc, cloned it and converted to 20 gig using your tool.
Create new disc, and When installing it asks for cd file.
Shouid I convert the vdi file to iso? Seems no way it will acept a vdi file.
Grateful for any help.
Seadart
 
Posts: 2
Joined: 30. Apr 2014, 17:37

Re: CloneVDI tool - Discussion & Support

Postby mpack » 30. Apr 2014, 18:28

Perhaps you have misunderstood the purpose of the tool, there should be no VM creation step involved. CloneVDI is generally used when you have an established VM that has been running for a while, and you want a larger disk without the hassle of reinstalling.

Or... if you are trying to create a new VM around the clone then what you do is create a VM as normal, but when you get to the hard disk creation step you choose "Use existing..." and select the clone VDI at that point. It works best if you move the VDI into the VM folder before selecting it, as this ensures that the VM folder is self contained.
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 Seadart » 30. Apr 2014, 19:15

Thankyou so much = I was creating a new disc around the existng. I have no idea what I have been doing wrong but I just created a new disc as you said and "BINGO" 20gb as I wanted with XP and Offuice all set up,.
Many thanks again for your program and your extreemly quick help.
Seadart
 
Posts: 2
Joined: 30. Apr 2014, 17:37

Re: CloneVDI tool - Discussion & Support

Postby tebz91 » 16. May 2014, 11:00

Works Like a boss. Thank you.
tebz91
 
Posts: 1
Joined: 16. May 2014, 10:58

Re: CloneVDI tool - Discussion & Support

Postby hakito » 1. Jul 2014, 13:58

The tool works great. Is there a reason why you don't provide the code via github or something (instead of the zip file)?
hakito
 
Posts: 6
Joined: 1. Jul 2014, 12:56

Re: CloneVDI tool - Discussion & Support

Postby mpack » 1. Jul 2014, 15:37

Thanks. As to github: I don't use github, and since CloneVDI isn't a group project I see no benefit.
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 hakito » 3. Jul 2014, 08:34

It seems the diff support only works in GUI mode. When cloning a diff snapshot via cmd line I get the error:
Source is a difference image. Sorry, this tool cannot clone these (for now)
hakito
 
Posts: 6
Joined: 1. Jul 2014, 12:56

Re: CloneVDI tool - Discussion & Support

Postby mpack » 3. Jul 2014, 11:42

No, the same code runs regardless of how the tool is launched. If you get that message then the source folder doesn't contain a complete diff chain. You can check that yourself - use the "Show Header" feature to follow the chain of parent-UUID links back to the base VDI.
mpack
Site Moderator
 
Posts: 29172
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 36 guests