Using Standalone Converter when converting RHEL 9 servers to vms fails at 99% and the OS does not load.
The issue can be resolved by creating a custom ISO and replacing the converter-helper-vm.iso as follows.
Default Path:
C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone
Ensure the following commands are available in your Linux working environment:
sudo mkdir -p /mnt/cdrom
sudo mount -o ro /dev/cdrom /mnt/cdrom
mkdir -p ~/custom_iso/rootfs
cd ~/custom_iso
sudo cp -rp /mnt/cdrom/* ./
sudo chmod -R u+w .
cd ~/custom_iso/rootfs
sudo gunzip -dc ../isolinux/initrd.img | sudo cpio -idmv
We need to modify the arguments so that grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline is processed correctly.
TARGET_SH=$(sudo find . -name chrootAndExec.sh)
cat << 'EOF' | sudo tee patch.txt > /dev/null
if [ "$2" = "grub2-mkconfig" ] || [ "$2" = "grub-mkconfig" ]; then
BOOT_DEV=$(findmnt -n -o SOURCE "$1/boot")
[ -n "$BOOT_DEV" ] && sed -i "s/--set=dev [^ ]*/--set=dev $(blkid -s UUID -o value "$BOOT_DEV")/" "$1/boot/efi/EFI/redhat/grub.cfg"
set -- "$1" "grub2-mkconfig" "-o" "/boot/grub2/grub.cfg" "--update-bls-cmdline"
fi
EOF
sudo sed -i '1r patch.txt' $TARGET_SH
sudo rm ../isolinux/initrd.img
sudo find . | sudo cpio -o -H newc --owner root:root | sudo xz -9 --check=crc32 > ../isolinux/initrd.img
cd ~/custom_iso
sudo rm -rf rootfs
sudo mkisofs -o ../converter-helper-vm-custom.iso
-b isolinux/isolinux.bin -c isolinux/boot.cat
-no-emul-boot -boot-load-size 4 -boot-info-table
-eltorito-alt-boot -e boot/grub2/efiboot.img -no-emul-boot
-R -J -v -V "CONVERTER_HELPER" ./
(Note: The same parameters can be used if you are using the genisoimage command.)
6-1. Place the newly created converter-helper-vm-custom.iso into the original ISO directory on the Windows machine.
6-2. Rename the original converter-helper-vm.iso to a different name (e.g., .bak) for backup.
6-3. Rename your custom ISO to converter-helper-vm.iso.
6-4. Run the VM conversion again and verify that the issue is resolved.