In this example I’m going to show how-to migrate a Microsoft Windows virtual machine from a local OVA file to Oracle Linux KVM and Oracle Linux Virtualization Manager by leveraging the opensource utility “virt-v2v”; the same guide will also show how to get “VirtIO” drivers installed on Microsoft Windows to efficiently work while running on the KVM hypervisor.

Requirements

  • Download the “Oracle VirtIO drivers for Microsoft Windows” ISO containing “VirtIO drivers” and “QEMU guest agent” for Microsoft Windows
  • One Oracle Linux 8 or 9 machine where to run the “virt-v2v” command
  • Access to Oracle Linux Virtualization Manager API URL ( https://<olvm-fqdn>/ovirt-engin/api ) from the machine going to execute the “virt-v2v” command
  • OVA of the machine to import to Oracle Linux Virtualization Manager

Migration Steps

  • Create password file to access Oracle Linux Virtualization Manager API under a specific path (example below is under /root/v2v)

# echo <olvm-admin-password> > /root/v2v/ovirt-admin-password

  • Download the Oracle Linux Virtualization Manager certificate under the same specific path (example below is under /root/v2v)

# curl -o ca.pem -k https://<OLVM-FQDN>/ovirt-engine/services/pki-resource?resource=ca-certificate

  • Prepare the script will be executed to run the migration; all the required files (ca.pem, ovirt-admin-password, oracle-winvirtio21-qemuagent-SCoter-20240417.iso and your OVA file) have to be in the same folder and the command has to be executed from that folder too. Here a script example:

# OVA to import
OVA_TO_IMPORT=<your-ova-file>

# Oracle VirtIO drivers
export VIRTIO_WIN=/root/v2v/oracle-winvirtio21-qemuagent-SCoter-20240417.iso
export LIBGUESTFS_BACKEND=direct

# Import Windows machine to OLVM
date
virt-v2v -v -x -i ova $OVA_TO_IMPORT \
-o rhv-upload -oc https://<OLVM-FQDN>/ovirt-engine/api \
-os <STORAGE-DOMAIN-NAME> -op /root/v2v/ovirt-admin-password \
-oo rhv-cafile=/root/v2v/ca.pem -oo rhv-cluster=<OLVM-CLUSTER> \
-of qcow2 -oo rhv-direct –bridge ovirtmgmt
date

If you need to directly migrate a Microsoft Windows virtual machine from VMware to Oracle Linux Virtualization Manager, you can use the same script while supplying different information related to the source (VMware); further details on this are available on this blog article: “How to migrate from VMware to Oracle Linux KVM“.

Post Migration Steps

  • Edit the Microsoft Windows virtual machine created on Oracle Linux Virtualization Manager and apply following changes
    • Verify the “Chipset/Firmware type” entry, it has to be of the same kind of the source (BIOS, EFI, EFI with Secure Boot)
    • Edit the “Instance images” and verify that you have “SATA” or “IDE” for the virtual disks required to execute the first boot
  • Start the Virtual Machine on Oracle Linux Virtualization Manager
    • Once the Microsoft Windows OS is booted, wait for some minutes and you will see the operating system rebooting automatically
    • This step is expected because this reboot will allow to get the proper “Oracle VirtIO drivers” added to the Microsoft Windows OS
    • Once the reboot is completed, proceed on the shutdown of the Microsoft Windows virtual machine on Oracle Linux Virtualization Manager
  • Edit the Microsoft Windows virtual machine and apply following changes
    • Edit the “Instance images” and verify that you have “VirtIO” or “VirtIO-SCSI” for all the virtual disks configured for the virtual machine
  • Start the Virtual Machine on Oracle Linux Virtualization Manager
  • Verify that proper “Oracle VirtIO drivers” have been loaded by Microsoft Windows virtual machine

oracle-virtio-drivers

  • Verify that proper “QEMU guest agent” have been loaded by Microsoft Windows virtual machine

qemu-guest-agent

This is a very quick example of migrating an OVA to Oracle Linux Virtualization Manager; same steps could be applied, with “virt-v2v” while migrating from other hypervisors (VMware) to Oracle Linux Virtualization Manager.