apt install -y qemu-utils libguestfs-tools
virt-sparsify -v --in-place disk.img
qemu-img convert -p -o subformat=dynamic -f raw -O vpc disk.img disk.vhd
for i in *.img; do virt-sparsify -v --in-place $i; done for i in *.img; do echo $i; qemu-img convert -p -o subformat=dynamic -f raw -O vpc "$i" "${i%%.img}.vhd"; done