CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
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 »

wmeyer wrote:apart from the one introduced with Windows 10 disk formats
I don't remember you raising a problem with Windows 10 disk formats. However, I'm going to assume that the problem will be the use of GPT partitions, rather that any problem with the filesystem itself (which AFAIK is still FAT for the boot partition, stock NTFS for OS volumes). This would only be a problem for P2Vs, or Win10 installs in VirtualBox with the EFI BIOS option enabled. The next CloneVDI release will include GPT support.
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 wrote: I don't remember you raising a problem with Windows 10 disk formats. However, I'm going to assume that the problem will be the use of GPT partitions, rather that any problem with the filesystem itself (which AFAIK is still FAT for the boot partition, stock NTFS for OS volumes). This would only be a problem for P2Vs, or Win10 installs in VirtualBox with the EFI BIOS option enabled. The next CloneVDI release will include GPT support.
I did raise the issue (7 May 2018), and you said then that GPT partitions were the issue. I will be happy to gain the capability, but it has proved to be less urgent than I anticipated.
Last edited by wmeyer on 7. Mar 2019, 22:38, edited 1 time in total.
KubuS
Posts: 2
Joined: 7. Mar 2019, 21:39

Re: CloneVDI tool - Discussion & Support

Post by KubuS »

Is it possible to virtualize a whole hard drive with 2 partitions (bootable Windows 10 and Windows' private pratition) from Windows using CloneVDI?

I've tried doing it from cmd/powershell and using GUI but can't figure out how to pass the whole hard drive as an argument.

Code: Select all

.\CloneVDI.exe "\\Device\Harddisk2" -o j:\hd2_clone.img
Using above line CloneVDI in console just reports 'OK' and in GUI the buttons remain grayed out and unclickable, despite the 'OK' status.

Any ideas?
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 »

Any drive can be cloned, so the answer is yes. The contents of the drive (e.g. partitions) are not relevant unless CloneVDI needed to delve into their contents, e.g. if you enabled compaction. Unfortunately the current version of CloneVDI doesn't recognize GPT (UEFI) drives, which a Win10 PC might be using, in which case compaction would not be available.

Cloning of physical drives is described in the release notes, including how physical drives are named on Windows hosts (and the naming you are using is nowhere close to correct!). Also I'm not sure what the ".img" extension on the destination file is supposed to do? CloneVDI always produces .VDI files which you mount directly in a VM. Were you assuming that it creates a CD installer?
KubuS
Posts: 2
Joined: 7. Mar 2019, 21:39

Re: CloneVDI tool - Discussion & Support

Post by KubuS »

I got it to recognize the drive by fixing the input path and will try to clone it once again. I hope it won't crash due to DEP violation as it does converting a VHD image on my Vista x64. Curiously, the same image gets converted without a problem on a Win10 x64.

For all the others looking and for google indexing robot's reference, the input file naming should be: \\.\PhysicalDriveN where N is 0, 1, 2, and so forth, representing each of the physical drives in the system.

reference: https://support.microsoft.com/en-us/hel ... nder-win32

Please note that for CloneVDI to be able to access the physical drive it needs to be run with Admin privileges. Otherwise the path will not be found.

To figure out the exact N-number one may use:

(CMD / PowerShell)

Code: Select all

wmic diskdrive list brief

or
(PowerShell)

Code: Select all

Get-WmiObject Win32_DiskDrive


reference: https://stackoverflow.com/questions/327 ... ical-disks
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 »

Hmm. When I want to find a disk number I just open My Computer | Disk Management. As far as I know that gives you the same numbers, without having to open a command console.
behlers
Posts: 1
Joined: 12. Mar 2019, 11:39

Re: CloneVDI tool - Discussion & Support

Post by behlers »

Thanks @mpack for your great program.

I noticed, that you attached the source of v2.10 to your second post, while the binary is at v3.02.

Is it possible to update the source to v3.02?
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 »

I think I'll leave it as is. We already had a discussion about this some time back. I've never been a great believer in open source: great for people taking the source and sticking it on Github with a minor change in an unsympathetic direction, but I'm not sure I see how I benefit from the deal (I don't use other peoples open source in my own code).
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 »

Long before the Internet, we saw the same thing happen. There was a guy at one time, who made a name for himself doing exactly that. I had written a beautifier for assembly language in C. He took it, rewrote in assembler, made no other change, and put his name on it. Since he had implemented from my C as pseudo code, it was, for all practical purposes, my app. And for its intended use, the nominal speedup was of little value. The more things change....
Last edited by socratis on 29. Mar 2019, 21:50, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Al3001
Posts: 3
Joined: 30. Apr 2019, 01:50

Re: CloneVDI tool - Discussion & Support

Post by Al3001 »

I had a problem with laptop powering external SSD drive and my VM on it crashed.
After googling, I came across CloneVDI tool.
CloneVDI tool reports "Source file is not a recognized VDI format".
I clicked on "Repair" any way. But the output VDI would not boot after removing the old VDI and then adding the new VDI to storage.

I came across another command and tried this:
VBoxManage.exe internalcommands repairhd <full-path-to-courrupt-VDI-file> -format VDI

It gave me VERR_VD_IMAGE_REPAIR_IMPOSSIBLE error.

Is there any way to mount the VDI file and retrieve files?
I have a month-old backup, but would love to recover as much as possible.
Any help is much appreciated.

Thanks,
Al
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 »

A crash will not typically destroy a VDI, though perhaps a trim command on a newly mounted external SSD could cause a bit of havoc. Are you missing out any part of the story, like undeleting the file? Undelete tools are snake oil, unless the file is very small they typically recover the filename only, the file itself is filled with random garbage.

Did CloneVDI give any error messages during the repair? I would expect it to give an error message if there was (irreparable) inconsistencies in the data.

You can try mounting the repaired clone as a non-booting second drive in another VM, to see if you can get any files off it.

External drives are subject to a great many failure modes, hence we generally deprecate their use for VMs.

You don't mention snapshots, hopefully because they are not involved. That would greatly complicate the repair process.
Al3001
Posts: 3
Joined: 30. Apr 2019, 01:50

Re: CloneVDI tool - Discussion & Support

Post by Al3001 »

Thanks mpack for the reply. CloneVDI (GUI) didn't give any error (or I couldn't see any message since the progress display window closed so quickly).
I'll try again. No, I did't use undelete command. I didn't specifically run trim command, but when I connected the external SSD drive on a second laptop and there was a prompt (don't recall exact message; something to do with auto recover?) and I clicked "yes" to continue with the process.
CloneVDI did create an output file and I attached that VDI to an existing VM, but the VM won't boot.
VirtualBox displayed a question mark with the yellow background (Vbox not recognizing the storage?).
I'll try the ClondeVDi again and will post the outcome.
Thanks,
Al
Al3001
Posts: 3
Joined: 30. Apr 2019, 01:50

Re: CloneVDI tool - Discussion & Support

Post by Al3001 »

I want to give an update. I re-ran the CloneVDI tool twice: taking the output of first run and using it as input for the second run.
Added the second output to storage of another Windows VM. Second VM booted up and copied the files.
May be, there is no need to run twice. I'm sleep-deprived now and can't think properly.
But happy that I got the files. I'm good for now. Thanks for CloneVDI tool.

Thanks,
Al
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 »

Well I'm glad you got the files you needed. Possibly the VDI itself would boot if repaired using the guest OS's repair tool (if it exists), but I'll leave that to you as that isn't really a CloneVDI discussion.
caspertone
Posts: 54
Joined: 2. Apr 2014, 10:27

Re: CloneVDI tool - Discussion & Support

Post by caspertone »

@mpack

Have been a happy user of clonevdi tool for years... thank you for it!

Now I bring you a petition and challenge. Update tool to compact encrypted disks... Currently the way is to uncrypt, compact, recrypt... I wonder if CloneVDI could be updated to make all operations on the fly, provided the right password is provided this should be feasible someway....

TIA,
CT
Post Reply