CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Re: CloneVDI tool - Discussion & Support

Postby mpack » 11. Jun 2019, 11:20

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

Re: CloneVDI tool - Discussion & Support

Postby caspertone » 11. Jun 2019, 22:57

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!
caspertone
 
Posts: 45
Joined: 2. Apr 2014, 10:27

Re: CloneVDI tool - Discussion & Support

Postby Slappy McPhee » 17. Oct 2019, 23:48

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.
Slappy McPhee
 
Posts: 1
Joined: 17. Oct 2019, 23:43

Re: CloneVDI tool - Discussion & Support

Postby scottgus1 » 18. Oct 2019, 03:30

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.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
Volunteer
 
Posts: 6944
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: CloneVDI tool - Discussion & Support

Postby mpack » 18. Oct 2019, 10:20

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

Re: CloneVDI tool - Discussion & Support

Postby socratis » 18. Oct 2019, 10:55

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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: CloneVDI tool - Discussion & Support

Postby Ahmed Haroon » 31. Oct 2019, 11:46

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
Ahmed Haroon
 
Posts: 12
Joined: 29. Mar 2019, 15:28

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

Postby ma_js » 11. Nov 2019, 18:19

Hello,

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

The whole story is here: https://forums.virtualbox.org/viewtopic.php?f=6&t=95500

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
ma_js
 
Posts: 12
Joined: 7. Apr 2014, 10:02

Re: CloneVDI tool - Discussion & Support

Postby mpack » 12. Nov 2019, 17:09

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

Re: CloneVDI tool - Discussion & Support

Postby mpack » 3. Jan 2020, 14:03

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.

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

Re: CloneVDI tool - Discussion & Support

Postby Ploni » 9. Jan 2020, 19:24

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?
Ploni
 
Posts: 7
Joined: 18. Jun 2015, 03:22

Re: CloneVDI tool - Discussion & Support

Postby mpack » 10. Jan 2020, 11:13

I've commented on that before. No, I am not releasing source code at the moment.
mpack
Site Moderator
 
Posts: 31413
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby EthanH » 11. Feb 2020, 00:27

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
EthanH
 
Posts: 7
Joined: 15. Nov 2019, 20:12

Re: CloneVDI tool - Discussion & Support

Postby mpack » 11. Feb 2020, 10:58

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

Re: CloneVDI tool - Discussion & Support

Postby EthanH » 11. Feb 2020, 18:58

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
0


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


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
-1073741819


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: 4.0.0.0, time stamp: 0x5e0f270a
Faulting module name: CloneVDI.exe, version: 4.0.0.0, 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.
EthanH
 
Posts: 7
Joined: 15. Nov 2019, 20:12

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot], Nick is not my name and 76 guests