Page 83 of 85

Re: CloneVDI tool - Discussion & Support

PostPosted: 11. Jun 2019, 11:20
by mpack
I see no way CloneVDI could do that. It would involve accessing information (the DEK) not stored in the VDI, i.e. I'd have to extract it from a file not covered by a spec and over whose format I have no control, and which may not even exist. Plus it would mean I have to mess with security issues and encryption, which I don't want to touch at all.

Besides, it sounds to me like a niche case, meaning almost nobody would use it. Those are always unrewarding.

Re: CloneVDI tool - Discussion & Support

PostPosted: 11. Jun 2019, 22:57
by caspertone
Thanks for the answer.
Just to point out that I feel a tool could do it, I understand and respect it is not your vision for CloneVDI. On the other hand, anyone wishing to develop such tool would need to develop what is already inside CloneVDI to be able to do it dynamically, i.e., avoiding full decription, then compresing, then recrypting. Would you be ready to offer an API to use the functionalyty (read block, compress, write block) from an outside program so that it could read bloc-decrypt-compress-encrypt-write?
Perhaps it looks marginal as per today, I would expect a higher number of people encrypting their virtual disks...
Thanks anycase!

Re: CloneVDI tool - Discussion & Support

PostPosted: 17. Oct 2019, 23:48
by Slappy McPhee
I am struggling a bit here. I have a dynamic .vdi file that I converted from fixed at 50gb because I need to reduce the size of this Windows 10 guest as it actually after a period of time is using only 16gb. I have followed the steps of defragging, removing unwanted files, etc. Shut it down, removed it from the Storage config in VB. I have attempted to use the compact command via VB Manager itself. I came across this CloneVDI tool and gave it a shot. Both applications show that they complete successfully. I am still seeing the same behavior regardless of the tool. The size on my host shows the reduced 16gb however no matter what I have done the dynamic size and when booted is still the 50gb. I am at my wits end.

Re: CloneVDI tool - Discussion & Support

PostPosted: 18. Oct 2019, 03:30
by scottgus1
Slappy McPhee wrote:The size on my host shows the reduced 16gb ... the dynamic size and when booted is still the 50gb

This is precisely the expected result. The final size of the drive (50GB in your case) does not change after the compaction. The drive will get bigger again.

If you want the drive to not get bigger, you can reduce the main partition size of the compacted drive by the amount desired. In Windows guests, see the Disk Management tool; for Linux guests, I think Gparted will do it. Boot the guest on the compacted drive and run the appropriate tool. Be aware that Windows 10 need some few GB to do updates, so don't hem it in too much. Nice thing about shrinking a partition is that it usually can be expanded again as needed.

Re: CloneVDI tool - Discussion & Support

PostPosted: 18. Oct 2019, 10:20
by mpack
You are not understanding the difference between size and capacity. Compaction reduces the current file size on the host, it does not affect the capacity (which the guest OS sees) at all.

If you want to reduce the capacity of the guest drive then you should run Disk Management inside Windows and reduce the main partition size.

I would have to say however that 50GB is not an excessively large drive for Windows 10. Reducing the capacity to exactly match the usage of today only is a pretty bad idea, unless you plan not to run any apps (such as Internet Browsers, Office suite - anything that creates temp files).

Re: CloneVDI tool - Discussion & Support

PostPosted: 18. Oct 2019, 10:55
by socratis
Slappy McPhee wrote:I am struggling a bit here

As both 'scottgus1' and 'mpack' said, you're missing the last step from this post: viewtopic.php?f=3&t=86347#p411703

But don't shrink it too much, you're going to run into trouble. Your typical Win10 upgrade (1803 -> 1809 -> 1903 -> etc) requires about 10 GB, or fail.

I'd stick with the 50 GB and periodically repeat that procedure that you did, which will reduce the file size of the VDI on your host.

Re: CloneVDI tool - Discussion & Support

PostPosted: 31. Oct 2019, 11:46
by Ahmed Haroon
huge thanks to save me :) today I used it and solved my problem ( my thread here viewtopic.php?f=6&t=95378 ).
much appreciable work done, hope this will update continuously as and when required.
with best regards

what can I do/try: Validation Result: Source file corrupt - block map contains errors

PostPosted: 11. Nov 2019, 18:19
by ma_js

yes, I'm in trouble and need access to the disk's data

The whole story is here:

In short words: Win7 Host, Win10 guest, VM stopped rapidly, no recent backup.
Any chance to heal/treat the VMDK?

Wouzld be really great :-)

kind regargs

Re: CloneVDI tool - Discussion & Support

PostPosted: 12. Nov 2019, 17:09
by mpack
I've commented on ma_js's problem in the other topic. I'll only note here that, as mentioned in the release notes, the header repair feature in CloneVDI is for VDI only, and I currently have no intention to ever implement similar repair features for third party formats. As the name implies, CloneVDI has always been primarily a VDI tool. Another reason is that VDI is inherently simple and repairable, the same is not necessarily true of other formats.

Re: CloneVDI tool - Discussion & Support

PostPosted: 3. Jan 2020, 14:03
by mpack
NEW VERSION RELEASED - v4.00 (see root message for download link).

Please note that I've released a new version of my CloneVDI tool (v4.00). This release has one major new feature plus a number of minor bugfixes.

The major feature is support for GPT partitioned drives, meaning that compaction and P2Ving now do useful things when the source is a drive from a system or VM using an EFI BIOS (e.g. just about any P2V from a modern Win10 system).

This involved violating many old assumptions in the code, such as a limit of four partitions per drive, and per partition info dialog! Basically anywhere that I ask for information about the drive had to be checked for implicit assumptions about partition size, and number of partitions. In fact I'm not certain that I found them all, which is why I've sat on this release for many months. But, I guess the only way to be sure is to put the code out there - so here goes.

For drives that use MBR partitions you hopefully shouldn't notice much of a difference, except that the Partition Info dialog has changed.


Re: CloneVDI tool - Discussion & Support

PostPosted: 9. Jan 2020, 19:24
by Ploni
Thank you for the update!
I noticed that the source code hasn't been updated since v2.10. Is there any possibility of the latest source code being released?

Re: CloneVDI tool - Discussion & Support

PostPosted: 10. Jan 2020, 11:13
by mpack
I've commented on that before. No, I am not releasing source code at the moment.

Re: CloneVDI tool - Discussion & Support

PostPosted: 11. Feb 2020, 00:27
by EthanH
First, many thanks to mpack! We run all too many VMs to control test and measurement equipment and having the ability to quickly compact the virtual disks is terrific.

I ran into a regression in V4.00 of CloneVDI while testing a Powershell script that compacts all virtual disks on a Windows system. The -c (or -compact) command line switch no longer works. The other command line switches I tested work, but -c fails with an error code of -1073741819. This is the same code returned when any unsupported switch (e.g. -x or -z) is used. No window appears, just an immediate exit and non-zero error code.

The same syntax works flawlessly on version 3.02

Re: CloneVDI tool - Discussion & Support

PostPosted: 11. Feb 2020, 10:58
by mpack
Hmm. I'm not seeing anything odd in the code, nor do I remember doing anything to that code for this release. All of the command line options should work, or none should work.

Can you give me an explicit example of a command line which fails? Perhaps obtained by echoing one of your own commands.

The result code is also a puzzle. I return 0 on success, 1 on an error such as an invalid switch. "-1073741819" is 0xC0000005, which looks like a crash.

Re: CloneVDI tool - Discussion & Support

PostPosted: 11. Feb 2020, 18:58
by EthanH
Switch -k (keep UUID) works. CloneVDI 4.0 opens, clones the disk, preserves the UUID (create) value, and exits cleanly.

From powershell:
Code: Select all   Expand viewCollapse view
PS D:\Temp> $proc = Start-Process  .\CloneVDI-exe-4.00\CloneVDI.exe -ArgumentList  '"Test.vdi" -k' -PassThru
PS D:\Temp> $proc.ExitCode

From cmd:
Code: Select all   Expand viewCollapse view
D:\Temp>CloneVDI-exe-4.00\CloneVDI.exe Test.vdi -k
D:\Temp>echo %errorlevel%

Switch -c errors out. The CloneVDI window does not open, and an error appears in the Application event log:

Powershell output.
Code: Select all   Expand viewCollapse view
PS D:\Temp> $proc = Start-Process  .\CloneVDI-exe-4.00\CloneVDI.exe -ArgumentList  '"Test.vdi" -c' -PassThru
PS D:\Temp> $proc.ExitCode

Running from cmd produces the same behavior, although the reported errorlevel is 0. Cmd seems not to catch the exception code properly.
Event viewer log (identical aside from timestamp and proc id for execution from PS or cmd):
Code: Select all   Expand viewCollapse view
Faulting application name: CloneVDI.exe, version:, time stamp: 0x5e0f270a
Faulting module name: CloneVDI.exe, version:, time stamp: 0x5e0f270a
Exception code: 0xc0000005
Fault offset: 0x0000e7a8
Faulting process id: 0x14d80
Faulting application start time: 0x01d5e0fb4a7cdea4
Faulting application path: D:\Temp\CloneVDI-exe-4.00\CloneVDI.exe
Faulting module path: D:\Temp\CloneVDI-exe-4.00\CloneVDI.exe
Report Id: 0fc97f04-65ef-414c-bc1d-5a7b92fe6e94
Faulting package full name:
Faulting package-relative application ID:

The same behavior and exception codes are thrown when any non-supported switch appears on the command line. Combining a working switch (-k) with non-working (-k -c or -kc) gives the same outcome.