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 »

The Partition Info shows one relatively small (0.5MB) FAT32 partition, and a large partition that it identifies as "Linux Swap". Probably CloneVDI considers everything in a swap partition as discardable.

If this is an LVM partition manager layout: CloneVDI doesn't support LVM.

CloneVDI doesn't support extended/logical MBR partitions either. This is only maybe the second time I've seen them being used since I created CloneVDI. This feature was created back in a very peculiar time period - maybe it lasted a year or so - when disks had grown large, but the ability of DOS to manage those sizes had not kept up. So to get around the DOS size limit you could add more partitions, but MBR had a limit of four. So the hack was to define a new partition type of "extended", and inside of that you create a secondary MBR containing four more "logical partitions" nested inside the extended partition.

I have no idea why you would be using the logical partitions hack when you have less than four partitions, or why you would use it at all when you aren't limited by that old version of DOS. It's possible that LVM uses this hack for some reason - I don't see LVM being used a lot.
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 »

p.s. I note that your symptoms are very similar to "AlsoBort" from just a few posts up. But he said that he is using encryption.

p.p.s. You don't need CloneVDI to make backups - in fact clones are not good backups, because a good backup preserves a working state, it does not change that state as a clone does. To back up a VM simply copy the VM folder to secondary storage. No additional tools are needed.
TDIT
Posts: 21
Joined: 21. Feb 2016, 16:45

Re: CloneVDI tool - Discussion & Support

Post by TDIT »

Hi all,

Using CloneVDI version 4.01 on a Windows 10 host. Receiving "Got OS Error 23 when reading from source disc" after 1%.

Can anyone advise what this error is referring to?

The VDI file is a windows install, bootable and okay.

Drive VDI file is on is a Samsung EVO SSD. Lots of free space (5 times vdi size). No errors on it and no errors in VDI file structure itself, So not sure where the issue may be.

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

Windows error 23 means a CRC error on the drive, that is a low level hardware error.

If you doubt the error then you can copying the VDI yourself outside of CloneVDI. In fact it would be really great if you can get that VDI onto another drive, because currently it looks like you may have lost it (*).

You can also try enabling the compaction option: if you're very lucky the error will be on an unused part of the image and CloneVDI will skip over it.

(*) There are tools available that will copy files, ignoring errors. This may be your last resort - you'd have to accept whatever data losses result.

Finally, if you still have access to an original VDI that was copied onto the SSD then that would be best of all.
Leloup78
Posts: 150
Joined: 21. Oct 2017, 15:13

Re: CloneVDI tool - Discussion & Support

Post by Leloup78 »

Bonjour,
Goal: Free the excess memory occupied by the VM.
Host: Win10 on SSD
Guest: Linux
VirtualBox release: 7.0.12


Initial state of the VM
VM_intial_state.png
VM_intial_state.png (52.5 KiB) Viewed 4282 times
Expected VM status
VM_expecting_state.png
VM_expecting_state.png (42.96 KiB) Viewed 4282 times
So, 13.72Gio reduction is expecting.
My attempts
First attempt:
From Guest:
The first step in resolving this error is to stop any processes that are writing to the disk.
service rsyslog stop
systemctl stop systemd-journald.socket
systemctl stop systemd-journald.service

Disable Swap Partitions
swapon -s

if enabled swap partitions:
sudo swapoff -a

remount the partition as read-only.
mount -n -o remount,ro -t ext2 /dev/sda2 /
(mount -n -o remount,ro -t ext2 /dev/sda2 /mnt)
zerofree -v /dev/sda2
fstrim -v /
(fstrim -v /mnt)
halt

From Host:
C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifymedium disk "Linux Mint 21.1 Xfce Clone3-disk1.vdi" --compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Result is : /dev/sda still 62.72Gio. No reduction.

Second attempt: CloneVDI tool
CloneVDITool.png
CloneVDITool.png (11.25 KiB) Viewed 4282 times
Result is : 30.72Mio reduction only.
What did I miss? what I didn't understand? Do, you have any idea?
Regards,
Leloup
Leloup78
Posts: 150
Joined: 21. Oct 2017, 15:13

Re: CloneVDI tool - Discussion & Support

Post by Leloup78 »

I tried the Clone VDI tool for two VM. So, picture above is for the second VM. Sorry for confusion.
Otherwise, whatever VM, result is the same.
Tki2000
Posts: 5
Joined: 11. Jun 2007, 23:21

Re: CloneVDI tool - Discussion & Support

Post by Tki2000 »

As the release notes state, CloneVDI does not support lvm partitioning.
You have a lvm partitioning scheme, so it cannot compress anything inside the image because it cannot read anything in that format.
I never use lvm partitioning. I use plain partitioning inside a VM and ext4 filesystem so I always get the images compressed Ok.
Tki2000
Posts: 5
Joined: 11. Jun 2007, 23:21

Re: CloneVDI tool - Discussion & Support

Post by Tki2000 »

mpack. Is there any possibility to support lvm partition scheme in CloneVDI?

Right now, if I want the VM images to compress I have to do a manual partition installation with MBR/GPT and ext4.
I have no problem with that, the VM in enclosed on a properly dimensioned file and won't grow up, but many automatic installers do lvm partitions. I do not like them as I see them fragile as a logical partition in Windows, but should help with many Linux/FreeBSD VM images.

Will you take the challenge? As LVM can cross the physical disk boundary it is not easy, I know... Perhaps for single disks...
Tki2000
Posts: 5
Joined: 11. Jun 2007, 23:21

Re: CloneVDI tool - Discussion & Support

Post by Tki2000 »

Very sorry.
I just realized that mpack is no longer with us.
I will miss him a lot.

viewtopic.php?t=110912
Post Reply