Run Windows 7 VM without virtio/nvme support in Incus

Hi.
I have ZVOLs with old Windows 7 VMs without virtio drivers and nvme support. I used AHCI emulation in QEMU/libvirt earlier.
How can I restore these machines? Reinstallation is not a solution. Now I can’t even run them in Incus because the io.bus can only be nvme, virtio-blk or virtio-scsi.

Could you perhaps run them as a VM inside an incus machinine?

I didn’t understand what you mean.
I’ve created an instance and run it. But the VM can’t boot properly from the existing ZVOL (it just hangs) because Windows 7 doesn’t support NVMe/virtio disks, and there are simply no others in Incus.

Any ideas?
Why Incus doesn’t support AHCI emulation?

Incus supports only hotpluggable devices by default. Its because its code is structured that way and because of security. Add disk device usable for mounting ISO files in Windows installer · Issue #1688 · lxc/incus · GitHub

For this cases Incus offers things like raw.qemu to manually add these things for people that need it. But I understand this is not really solution when using Incus through Truenas.

My first thought would be if its possible to install nvme driver into Windows 7 and use that.

Or you can install virtio drivers. But its not that easy. TrueNAS 25.04-BETA.1 is Now Available! - #12 by TheJulianJES

If you like challenge I devised a way to install virtio drivers into already installed Windows so its identical as if you repacked it with distrobuilder.

I think the registry could be same for every windows version but I didnt check that.

I don’t know if this is the answer you want, but you can use a driver injection tool to install drivers into an offline windows install.

I can’t install the NVMe/virtio drivers inside an existing Windows VM on zvol from previous TrueNAS release because it doesn’t boot. A vicious circle :slight_smile:

Well… I’m familiar with the Linux shell. I’ll look into the raw.qemu, thank you.
Can zvol be added as a raw.qemu? I used it before for VM as SATA disk in libvirt settings (AHCI in TrueNAS WebUI)

You use a bootable cd with the driver files and Injection tool. I can try and dig out the util tommorow if useful

Rollback to previous Truenas version where it’s bootable and add drivers there is not possible?

About raw.qemu for adding AHCI, I only did that as method to add cd-rom. I didn’t try drive. But I believe it’s doable.

This would have been better avoided. Linux kernel versions 6.6 and below behave inappropriately with my new hardware.

Ok, so as I see it. Either manually configure QEMU via Incus to add AHCI drive. But just temporarily for purpose of installing drivers.
Or offline inject drivers to zvol as @shoulders says.

Both sounds fun :slight_smile:
When I have time I can try to check how mount zvol as ahci.

1 Like

How can I do this offline? Can you give me a hint for searching?

It’s such a simple, thing… add an ahci bus… connect drives to it.

Would be good if it were an option in TrueNAS

1 Like

You will find appropriate commands in this guide. GUIDE: How to install/migrate Windows VM to Fangtooth/Incus using Virtio drivers

2 Likes