CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: CloneVDI tool - Discussion & Support

Post by hakito »

mpack wrote:No, the same code runs regardless of how the tool is launched.
This seems not to be true. At least it does not work in the version of the first post.

In order to get it running via cmdline we had to add open the media registry in command line mode:

Code: Select all

diff -r 92bd3f6fae97 -r 6f2a2704003a CloneVDI.c
--- a/CloneVDI.c	Wed Jul 09 10:52:43 2014 +0200
+++ b/CloneVDI.c	Wed Jul 09 12:01:34 2014 +0200
@@ -482,6 +482,7 @@
       AttachConsole(ATTACH_PARENT_PROCESS);
       rslt = 1;
       if (CmdLine_Parse(&parm)) {
+         VDDR_OpenMediaRegistry(parm.srcfn);
          if (DoItForHeavensSake(NULL)) rslt = 0;
       }
    }
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 »

Thanks for reporting this bug, it'll be fixed in the next release.
it
Posts: 1
Joined: 28. Jul 2014, 08:34

Re: CloneVDI tool - Discussion & Support

Post by it »

Hi,

I do not know if this question was asked before.
I have a virtualbox image logical size 557GB.
However it actually consumes around 30 GB on the disk.
I want to decrease the size 557Gb to for example 60Gb.

1. Is it possible with clone tool or any other tool to help me to do this?

2. I also intend later to convert the machine (vdi) into raw.
then will do v2p onto a physical machine. The physical machine HDD is around 250GB.
if i do not decrease vdi, i will have a 557Gb raw file. I do not know if the v2p will be successful
onto my 250Gb hard drive

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

The standard method of shrinking a drive size is exactly how you would do it in the phyical world: use a partition manager (i.e. GParted) to shrink the partition, then transfer the first part of the disk - including boot sectors and reduced partition - to a second, smaller, drive. Or you can just dump those same sectors to your raw file and "restore" it at the V2P end.

Incidentally, if it was me I wouldn't be using raw. You get what you pay for: a decent disk imaging tool would skip copying unused sectors, and it would cater for differing source and dest drive sizes (*). You can of course run such tools inside a VM too.

This doesn't look like something CloneVDI can help you with - so no more discussion of it here please.

(*) I don't necessarily mean that it will cope with partitions that extend beyond the end of the smaller drive. I would still reduce the partition size using gparted.
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 »

Yes, as mentioned in the release notes, CloneVDI never creates anything else except dynamic VDIs.
Anunes
Posts: 71
Joined: 17. Jul 2014, 18:49

Re: CloneVDI tool - Discussion & Support

Post by Anunes »

Hi,
I have a image file .VHD of a HDD which a partition with lot of unallocated space.
I used CloneVDI with the compression option ON.
The resulting VDI file is smaller around the space of the unallocated space of the original file.
When I create a VM with VirtualBox and use that VDI file, VB "sees" all the original file size.
1) It means that when I run the VM I will need to have all the original size availabe on physical HDD?
2) Is there a way to drecrease the original file to the size of the VDI file?

For better understanding I use numbers to explain:
the physical size of the VHD file is 50GB
It has about 30 GB os unallocated space.
the physical size of the VDI is around 20GB
The VB file size reported for the VDI is 50GB
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 »

First off - CloneVDI has a compaction option, it does not have a compression option. Compaction is a lossy process - it causes unwanted data to be discarded, whereas compression (*) fits the same data into a smaller space. Compaction can be used to manage working disks, compression in practice can't.

Hopefully that answers your remaining questions too. I also suggest that you read the All About VDIs tutorial in the "Howtos and Tutorials" section. If you have further questions about the VDI format then I'd suggest that "Using VirtualBox" is a better place to ask since it isn't really a question about the CloneVDI software.

(*) There are lossy compression algorithms, but they don't apply to disk images.
Anunes
Posts: 71
Joined: 17. Jul 2014, 18:49

Re: CloneVDI tool - Discussion & Support

Post by Anunes »

Hi mpack,
Thank you for your help.
CloneVDi is a great tool, a "must have" tool. It even can manage RAW files, I have it seen too late.

Still I am not clear about the "compaction" of the CloneVDI.
The VDI file size is 20GB and the file size displayed by VB for that Guest is 50GB.
Can you please explain me how to understand that 50GB?
When running that Guest it will expand to 50GB?
Thank you in advance
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 »

There is nothing much to explain. Compaction basically means to free up the host space required to store data which the guest regards as deleted files. It's a bit like the "trim" feature of SSDs. The difference between the 20GB and the 50GB size is the difference between the actual (on host) and logical (in guest) size. This is explained in the tutorial I referred you to. The only relationship you need to understand is (used space in guest) <= actual (host) size <= logical (guest) size.
Jeff_59
Posts: 35
Joined: 17. Apr 2014, 18:06

Re: CloneVDI tool - Discussion & Support

Post by Jeff_59 »

Hello everybody,

CloneVDI is a great software. However, i was wondering if there is a trick to use the software on a MacOS host? I was thinking about creating a new windows XP VM, copy the VDI i want to resize inside (thanks to the share folder) and run clone vdi inside this VM. However, somebody might have a more convenient solution. Any idea?

Thanks,

Jeff_59
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: CloneVDI tool - Discussion & Support

Post by loukingjr »

Jeff_59 wrote:Hello everybody,

CloneVDI is a great software. However, i was wondering if there is a trick to use the software on a MacOS host? I was thinking about creating a new windows XP VM, copy the VDI i want to resize inside (thanks to the share folder) and run clone vdi inside this VM. However, somebody might have a more convenient solution. Any idea?

Thanks,

Jeff_59
It will run in Wine or PlayOnMac on Mac hosts.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
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 »

Shared folders sometimes don't work very well for very large files, especially it seems on Mac hosts, though the details have never been pinned down. Hence I would second Lou's Wine/ PlayOnMac suggestion.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: CloneVDI tool - Discussion & Support

Post by loukingjr »

I did use it with PlayOnMac so I know that works at least. I don't like fussing with Wine.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: CloneVDI tool - Discussion & Support

Post by socratis »

Jeff_59 wrote:I was thinking about creating a new windows XP VM, copy the VDI i want to resize inside (thanks to the share folder) and run clone vdi inside this VM. However, somebody might have a more convenient solution. Any idea?
Just for the record, I've done exactly this and it works as expected. Convenient? Maybe not. It worked? Yes.
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.
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 »

Read back in the current thread for previous failure reports. I expect it depends on the size of the file, I'd imagine that 4GB is a likely threshold.
Post Reply