Migrate windows guests from VirtualBox to KVM without re-activation?

Solution 1:

Windows uses multiple hw uuids for activation. Not just mainboard or cpu uuid. It scans many hardware. If lets say more than %20 of hardware uuids change it revokes license or needs reactivation.

I am not sure about VirtualBox but in VMWare case UUID comes from VM directory name and location. That is why it asks if you moved or copied it.

You can try getting as much of uuid from command line using wmic for example:

wmic csproduct get "UUID"

or

wmic nic get "MACAddress"

Then try to edit and enter same uuid using virsh edit YourMachineName

You will possibly be first who managed this :) Because I have never seen anyone mentioning it.

As a final answer, windows activation does not work that simple.

Edit (6-May-2021): In KVM it is possible to customize and then OOBE windows 10 to make it behave like clean installation. You can also customize pci-e root hub architecture, give serial numbers to rams etc. As only a tip of an iceberg ,the configuration xml of libvirt of qemu-kvm on linux :

<domain type='kvm'>
  <name>VMNAME</name>
  <uuid>SMBIOSUUID</uuid>
  <memory unit='KiB'>3384000</memory>
  <currentMemory unit='KiB'>3384000</currentMemory>
  <vcpu placement='static' current='2'>4</vcpu>
  <sysinfo type='smbios'>
    <bios>
      <entry name='vendor'>CWRK</entry>
      <entry name='version'>1.32</entry>
      <entry name='date'>11/10/2020</entry>
      <entry name='release'>1.1.3</entry>
    </bios>
    <system>
      <entry name='manufacturer'>CWRK</entry>
      <entry name='product'>RCKSLD-WS</entry>
      <entry name='version'>1.0</entry>
      <entry name='serial'>SYSSERIAL</entry>
      <entry name='uuid'>SMBIOSUUID</entry>
      <entry name='sku'>SMBIOSSKU</entry>
    </system>
    <baseBoard>
      <entry name='manufacturer'>CWRK</entry>
      <entry name='product'>RCS001</entry>
      <entry name='version'>0B12201 Pro</entry>
      <entry name='serial'>BASEBOARDSERIAL</entry>
    </baseBoard>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-q35-2.11'>hvm</type>
    <loader readonly='yes' type='pflash'>OVMFCODE</loader>
    <nvram>OVMFVARS</nvram>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>

Migrate if you can , even consider nested virtualization. It may be possible Windows-VirtualBox(Ubuntu-KVM (Identical HW Windows Install))