So I finally figured it out. I had to move virtio.iso to /run/incus/instance
for QEMU to be able to use it.
So here is guide how you can install Windows in Incus without repacking it with Distrobuilder. I tried it only with Windows 10. In this guide I will call my Windows VM instance win10vm
.
TLDR version:
- Set up Incus and Windows VM instance as per Simos guide
- Start and stop the Windows instance so folders in
/run/incus/
are created - Download Virtio ISO and copy it into
/run/incus/win10vm
- Add cdrom to you VM with
incus config set win10vm raw.qemu -- "-cdrom /run/incus/win10vm/virtio.iso"
- Start VM and run Windows installer.
- Install
vioscsi.inf
driver from your Virtio ISO. Path:/vioscsi/w10/amd64
- Finish installation.
- On desktop run
virtio-win-guest-tools.exe
from your Virtio ISO which will install all other missing Virtio drivers. - Finally, remove the Virtio ISO cdrom from Incus config to prevent potential future problems. First stop the VM and then you can use
incus config set win10vm raw.qemu -- ""
Detailed version:
- Download your Windows ISO. Install and prepare Incus. Configure your Windows VM instance according to Simos guide. Dont forget to add your Windows ISO into the instance.
- Start the instance and then stop it so Incus creates folder in
/run/incus/
incus start win10vm
incus stop win10vm --force
- Download recent Virtio ISO. Link are in this Github repo or you can download it here.
- Move your Virtio ISO into directory
/run/incus/win10vm/
so QEMU can use it. If you dont you will getFailed to lock byte 100
error. You will needsudo
to get there. - Add Virtio ISO to VM as cdrom using QEMU flag.
Just runincus config set win10vm raw.qemu -- "-cdrom /run/incus/win10vm/virtio.iso"
Alternatively you can edit Incus config file withincus config edit win10vm
This mounts Virtio ISO as cdrom IDE device into your QEMU instance. We need to mount it as IDE (or SATA) device so Windows installer can read it. - Now you can start the VM with vga console:
incus start win10vm --console=vga
and boot into cdrom by pressing any button during boot sequence. - When I tried this in another VM (nested VM) mouse didnt work (likely because of missing virtio drivers) and I had to use keyboard unitil I installed all drivers at the end. On bare metal mouse worked.
- After clicking
Install now
you will see messageA media driver your computer needs is missing
. This is because without repacking our Windows ISO dont have Virtio drivers which are needed to see drives which are virtio-based in Incus instances. But we have those drivers in our Virtio ISO. So selectBrowse
and navigate toCD Drive
namedvirtio-win
. - Go to
/vioscsi/w10/amd64
and confirm. You should seevioscsi.inf
driver available. Select it and press next. - If everything is OK we continue as with normal Windows install. Activate Windows. Select edition. Accept terms. Custom install. Select drive.
- In Select drive screen you can optionally load additional drivers with Load driver option. But it’s easier to just continue with the installation and install missing virtio drivers all at once using its own installer.
- Then Installing Windows will proceed.
- After that Windows will restart and your VGA console will close. Reconnect with
incus console win10vm --type=vga
Maybe it will restart/close multiple times. - When we get into Windows configuration it’s possible network will not work because of missing drivers. This happened to me in nested VM. I dont know about bare metal install.
- Once configuration is finished go to your Virtio ISO (This PC → CD drive virtio-win) and install all other virtio drivers by running
virtio-win-guest-tools.exe
- After all drivers are installed you just need to restart Windows.
- Thats all. Now everything should work correctly.
- After you’re done remove the Virtio ISO cdrom from Incus config to prevent potential future problems. First stop the VM and then you can use
incus config set win10vm raw.qemu -- ""
which will delete raw.qemu config.
Notes:
This is based on Proxmox guide
Maybe there are other ways to make virtio.iso available to QEMU but I dont know.
Hope this helps someone.
If someone can test this I will be grateful. I hope I didnt make any mistakes.