one icon indicating copy to clipboard operation
one copied to clipboard

Handle Windows with C drive compression

Open dann1 opened this issue 3 months ago • 1 comments

When converting a Windows VM with compression enabled on the OS drive, you get the following error

Running: virt-v2v -v --machine-readable -ic vpx://vc-dclavijo%[email protected]/Datacenter-NY/Cluster-R7615/ds8381.company.group?no_verify=1 -ip /var/tmp/WIN10-FED-10/vpassfile -o local -os /var/tmp/WIN10-FED-10/conversions/ -of qcow2 'WIN10-FED-10'

Setting up the source: -i libvirt -ic vpx://vc-dclavijo%[email protected]/Datacenter-NY/Cluster-R7615/ds8381.company.group?no_verify=1 WIN10-FED-10..
Opening the source..........................................
Inspecting the source
Inspecting guest OS............
DEBUG INFO: inspection could not detect the source guest (or physical machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.

No root device found in this operating system image.DEBUG INFO: inspection could not detect the source guest (or physical machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.

No root device found in this operating system image.

To handle that, there is an ntfs plugin required to be installed in the conversion host. Example on how to handle that in Ubuntu

apt-get update
apt-get install -y libguestfs-tools supermin ntfs-3g
APPL=~/.cache/custom-guestfs-appliance/build
mkdir -p "$(dirname "$APPL")"
libguestfs-make-fixed-appliance "$APPL"
# You should now have: $APPL/{kernel,initrd,root,README.fixed}
ls -l "$APPL"

# make sure this is there and good, may need to compile/install from github - https://github.com/ebiggers/ntfs-3g-system-compression
PLUGIN=/usr/lib/x86_64-linux-gnu/ntfs-3g/ntfs-plugin-80000017.so

mkdir -p /mnt/ga
mount -o loop "$APPL/root" /mnt/ga

# put the plugin into the fixed appliance
mkdir -p /mnt/ga/usr/lib/x86_64-linux-gnu/ntfs-3g
cp -a "$PLUGIN" /mnt/ga/usr/lib/x86_64-linux-gnu/ntfs-3g/

# double check it's there
chroot /mnt/ga /bin/sh -c 'command -v ntfs-3g || ls -l /bin/ntfs-3g /usr/bin/ntfs-3g || true'

umount /mnt/ga

export LIBGUESTFS_PATH="$APPL"

guestfish --ro -a WIN10-FED-10-disk0.vmdk -v -x
><fs> run
><fs> mount /dev/sda3 /
><fs> is-file /Windows/System32/cmd.exe

This should be

  • [ ] Documented
  • [ ] Ideally handled automatically with opennebula-swap packaging and env preparation logic

dann1 avatar Nov 04 '25 10:11 dann1

Compiling the software should only be required in Ubuntu 24. Alma 9 ( which does have the libguestfs version required ) has a package for ntfs-3g-system-compression which can be installed. We could possibly recommend this, or even newer ones.

Once we get to Alma 10 and Ubuntu 25/26 the kernel has ntfs drivers natively and handles system compression as well.

onenhansen avatar Nov 04 '25 17:11 onenhansen