WinXP or Win7 VM

Does anyone was able to run this legacy operating systems in Incus.
I have some old TTS APP that doesn’t work under Wine or newer Windows. but it worked perfectly fine on windows XP with 256MB of memory. Current approach to TTS requires AI and GPU with tons of RAM and that is overkill.

I tried distrobuilder with repack-windows but the gave me errors.
w7:

ERROR Failed running distrobuilder err=“Failed to modify wim "boot.wim": Failed to modify index 1=Microsoft Windows PE (x64) of "boot.wim": Failed to inject drivers: Failed to parse driver viogpudo classGuid /var/cache/distrobuilder.2032936289/wim/1/Windows/inf”

xp:

ERROR Failed running distrobuilder err=“Failed to mount "/home/kriszos/Downloads/win_xp_pro_sp3.iso" at "/var/cache/distrobuilder.2891059706/source": exit status 32”

Just to make sure it wasnt my pc problem I tried it on fresh debian13 vm with the same result.

ISOs are perfectly fine for booting and installing windows on virtualbox or lib-virt. After successfull instllation (lib-virt) and installing and using virtio drivers i tried incus-migrate with secureboot “off” on XP disk file, but whatever I do it always end up with a bluescreen.

Has anyone was able to achieve this? Maybe some poorly documented raw.qemu features. OR way to add virtual floppy with virio drivers. XP don’t search for drivers on CD-ROM. Or is this just impossible on incus and I should stop wasting my time.

distrobuilder takes the ISO and prepares it so that the final booting in the VM will be as smooth as possible. You could very well boot the initial ISO in the VM, and perform the rest of the installation steps manually.

Some ISO images, especially those that have been already edited by third-party packages, may have problems with distrobuilder. Do you have a vanilla Windows XP/7 ISO? Show the full distrobuilder command line, along with what version of distrobuilder you are using.

I just noticed that https://blog.simos.info/how-to-run-a-windows-virtual-machine-on-incus-on-linux/ suggests the snap package of distrobuilder, which currently serves a 2024 package.

`

`

sudo distrobuilder repack-windows /home/kriszos/Downloads/win_xp_pro_sp3.iso /home/kriszos/Downloads/win_xp_pro_sp3.lxd.iso --windows-version=xp --windows-arch=x86 --disable-overlay --cleanup --debug

version 3.2

You may be on point with the already prepacked XP ISO I created it from DELL CD probably 8 or more years ago.
Win7 Professional N was directly downloaded from Microsoft.
Building distrobuilder 3.3.1 from sources gives me the same errors.

There’s an existing issue to make running old OSes in Incus easier: Add support for OS-specific VM quirks · Issue #3195 · lxc/incus · GitHub . Not sure if XP will work smoothly or not. My limited understanding is that you will need an old enough version of the virtio drivers that work with ancient Windows, but their digital signatures have expired so some manual work is required.

As you mention, plain old QEMU works, so in theory it should be possible to get running in Incus.

XP should be fine as we’ve managed to get 2003 running and it’s basically the same OS.

But yeah, we’ll need the work from @masnax to land first. Also worth mentioning that our focus is really on migrating existing VMs rather than deploying fresh ones, so extra work will likely be needed if we want distrobuilder to know how to repack a Windows XP image.

Yeah, I used raw.qemu config from migration-manager for Winserver 2k3 and io.bus: virtio-blk
Bellow is exact config that worked for WinXP:

config:
  raw.qemu: -device intel-hda -device hda-duplex -audio spice -global q35-pcihost.x-pci-hole64-fix=off -global virtio-blk-pci.disable-legacy=off
  security.csm: "true"
  security.secureboot: "false"
devices:
  eth0:
    network: winxp
    security.acls: ovn-no-internet
    type: nic
  root:
    io.bus: virtio-blk
    path: /
    pool: local
    type: disk

I used above config with vm created from lib-virt vm via incus-migrate. After start and few reboots i needed to reinstal netkvm driver and it kind of work.

On ovn network only ipv6 work, IPv4 - dhcp client is unable to get address, and static IP just don’t work, bridge network both IPv6 and IPv4 work OK. I have no idea why.

I wasn’t able to mount an ISO from incus storage pool at all.

I have a lot of “Unknown” devices in Device Manager but it seems that they are not that crucial.
@gibmat thanks for the tip that pointed to migration-manager and @stgraber thanks for the great work on incus and migration-manager