Skip to content

Unable to start a migrated vm (windows server 2025 ) from vmware to KVM using virt-v2v #13241

In progress

Description

@kiranchavala

problem

Unable to start a migrated vm (windows server 2025 ) from vmware to KVM using virt-v2v

versions

ACS 4.22

The steps to reproduce the bug

  1. A windows server 2025 vm is running on a external vcenter

  2. Using Cloudstack vmware to kvm (Import-Export Instances)

  3. Windows server 2025 disk converted to qcow2 successfully

  4. Start the vm from Cloudstack

  5. Vm unable to start , The following error is displayed

Image

Tried changing the root disk to ide, scsi , still the same issue

...

What to do about it?

Windows server 2025 should get started successfully from cloudstack after migration

Activity

  1. added theissue type on May 26, 2026
  2. andrijapanicsb commented on May 26, 2026

    @andrijapanicsb
    Contributor

    Recommended design for Windows Server 2025:

    CloudStack 4.22+
    KVM hosts: EL9 or Ubuntu 24.04
    machine type: pc-q35-
    boot: UEFI / LEGACY
    root disk controller: virtio
    NIC: virtio
    CPU: host-passthrough or host-model
    optional: vTPM + Secure Boot

    Machine type must not be old i440fx but instead a new one q35

  3. andrijapanicsb commented on May 28, 2026

    @andrijapanicsb
    Contributor
    Image
  4. andrijapanicsb commented on May 28, 2026

    @andrijapanicsb
    Contributor

    UEFI/legacy ADN q35 AND cpu passthrough/host model are a must, irrelevan of drivers - tested end-to-end

  5. RosiKyu commented on Jun 24, 2026

    @RosiKyu
    Collaborator

    I have tested this. With the flow described in the Steps to reproduce :

    The original bug (default import):

    • Real Windows Server 2025 (UEFI/GPT) -> CloudStack VMware -> KVM import -> conversion succeeds, disk is fine - but the VM is created BIOS + i440fx (boottype=None, machine='pc-i440fx-rhel7.6.0', SeaBIOS).
    • Result: "No bootable device"
    Image

    The workaround (verified booting):

    • Set the VM to UEFI=legacy (-> q35 + UEFI/OVMF) and host CPU to host-passthrough; virtio disk/NIC the import already set.
    • Confirmed live config: machine='pc-q35-rhel9.2.0', OVMF loader+nvram, cpu mode='host-passthrough'.
    • Result: VM boots

    But: a secondary reboot loop appears after the workaround boots

    • With the UEFI/q35 config the VM boots, but Windows reaches the logon screen and then restarts itself, repeatedly. UEFI reloads \EFI\Microsoft\Boot\bootmgfw.efi from the GPT partition each cycle - so firmware/disk are fine;

    Root cause of the loop is a virtio-win driver signing issue, not the firmware

    • virt-v2v installs a first-boot script (2000-0001-pnputil-install-drivers.bat) that pnputil-installs the bundled virtio drivers. It fails on smbus.inf, exits non-zero, and virt-v2v reboots to "retry on next boot" - which it did on every reboot (56 cycles observed before manual intervention), an effectively infinite loop:
    Installing: smbus.inf.
    Adding the driver package failed : A certificate chain processed, but terminated
    in a root certificate which is not trusted by the trust provider.
    Failed to install smbus.inf.  .... exit code 249
    Script failed, will retry on next boot
    
    • Why only smbus: within the same virtio-win package the drivers are signed differently.
    netkvm.cat  (installs fine) -> subject = Microsoft Windows Hardware Compatibility Publisher   [WHQL, trusted]
    smbus.cat   (fails)         → subject = O=virtio-win, OU=Dev, CN=Red Hat Inc.   [self-signed dev cert, NOT trusted]
    

    => Not a virtio-win version issue: checked both the latest (0.1.285) and the stable virtio-win - both ship smbus with the same self-signed dev cert, so switching versions does not fix it.

    The dev-signed smbus driver is present in all builds. virt-v2v's first-boot path installs via pnputil without importing the virtio-win certificate (the virtio-win guest-tools MSI normally imports it into Trusted Publisher first), so the dev-signed driver fails - and virt-v2v retries forever on a single driver failure. Any Windows guest converted through this path can hit the same loop.

    Workaround and final state

    • Removed the looping first-boot driver script from the converted disk -> Windows then boots stably to SConfig.
    • Migrated guest is functional: storage (offline-injected viostor) and network (virtio-net) work; only one non-essential device - the virtio serial controller (shown as PCI Simple Communications Controller, VEN_1AF4&DEV_1043) - is left without a driver.
    Image
  6. added this to the 4.22.2 milestone on Jul 28, 2026
  7. RosiKyu commented on Jul 28, 2026

    @RosiKyu
    Collaborator

    I think we could close this one @DaanHoogland ?

    Unless anyone has any objections, I'd suggest closing this ticket for now. We can always reopen it if the need arises.

  8. removed this from the 4.22.2 milestone on Nov 11, 2026
  9. andrijapanicsb commented on Nov 24, 2026

    @andrijapanicsb
    Contributor

    @DaanHoogland @RosiKyu @kiranchavala (the things below should probably go into documentation)

    I've described the endless reboot loop here: libguestfs/virt-v2v#178
    I've fixed it here: libguestfs/virt-v2v#202 (merged)

    I'm maintaining a public repo - so anyone can download the virt-v2v based on stock Alma 9.8 sRPM + backported patches:

    First release:
    https://github.com/v2kmigrate/virt-v2v-el9/releases/tag/v2.7.1-19.el9_7.v2k3

    I'll be maintaining this repo permanently, since I'm using this patched virt-v2v for my migration software
    (about to land another 2 newer versions/releases of the same virt-v2v with more patches)

    In Short

    The stock EL9 virt-v2v-2.7.1-19.el9_7 (AlmaLinux) with seven upstream fixes added. A drop-in replacement for the stock package on AlmaLinux 9 and compatible systems.

    (No support for Ubuntu)

    What is in it

    Upstream fix What it fixes
    virt-v2v commit 25163945 New option --no-fstrim for virt-v2v, virt-v2v-in-place and virt-v2v-inspector.
    libguestfs/virt-v2v#126, #195, #201 Debian 12, 11 and 13 guests with UEFI boot: the bootloader fix rules.
    libguestfs/virt-v2v#207 Debian UEFI first-boot script keeps the fallback loader unless efibootmgr succeeded, so the guest still boots (equivalent fix).
    libguestfs/virt-v2v#202 Windows first boot: one failing driver no longer causes an endless reboot loop (Windows Server 2025 with smbus.inf).
    libguestfs/libguestfs-common#54 Windows first boot: a step that keeps asking for a retry is tried at most 3 times.
  10. added this to the 24.0 milestone on Nov 24, 2026
  11. andrijapanicsb commented on Nov 24, 2026

    @andrijapanicsb
    Contributor

    https://github.com/v2kmigrate/virt-v2v-el9/releases/tag/v2.7.1-19.el9_7.v2k4

    new release with another patch
    (and there will be another release soon, to ensure qemu-quest-agent installation does not fail)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions