Windows Virtualization

Hey all,

I'm trying to install WinX(I know, I know) in a VM. I have setup libvirt and virt-manager and get to the install portion of Windows in the VM but it seems that there are no drivers found for the vhd.

I tried to add the virtio-win.iso from 'Index of /groups/virt/virtio-win/direct-downloads' both the stable and latest isos, but the drivers don't install and/or dont populate. I understand that the drivers may be for AMD and not Intel chipsets/hardware.

Does anyone know what I'm missing or what the right VirtIO drivers I need are?

System:
  Kernel: 5.15.11-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=7bda3b14-f8fd-4850-bc94-366cbe221f09 rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    systemd.unified_cgroup_hierarchy=1 loglevel=3
  Desktop: Qtile 0.19.0 wm: LG3D vt: 1 dm: SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Latitude 5520 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0G60M3 v: A00 serial: <superuser required> UEFI: Dell
    v: 1.12.2 date: 09/13/2021
Battery:
  ID-1: BAT0 charge: 62.4 Wh (100.0%) condition: 62.4/62.4 Wh (100.0%)
    volts: 17.4 min: 15.2 model: SWD-COS4.196 DELL 1K2CF18 type: Li-poly
    serial: <filter> status: Full
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: Discharging
CPU:
  Info: model: 11th Gen Intel Core i7-1185G7 bits: 64 type: MT MCP
    arch: Tiger Lake family: 6 model-id: 0x8C (140) stepping: 1 microcode: 0x88
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 3034 high: 4384 min/max: 400/4800 scaling:
    driver: intel_pstate governor: performance cores: 1: 2293 2: 3405 3: 2797
    4: 3785 5: 1000 6: 3112 7: 3503 8: 4384 bogomips: 28876
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell
    driver: i915 v: kernel bus-ID: 0000:00:02.0 chip-ID: 8086:9a49
    class-ID: 0300
  Device-2: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 3-6:2 chip-ID: 1bcf:28c4 class-ID: 0e02
    serial: <filter>
  Display: x11 server: X.Org 1.21.1.2 driver: loaded: intel
    unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1013x570mm (39.9x22.4")
    s-diag: 1162mm (45.8")
  Monitor-1: eDP1 res: 1920x1080 hz: 60 dpi: 143
    size: 340x190mm (13.4x7.5") diag: 389mm (15.3")
  Monitor-2: DP1-2-8 res: 1920x1080 hz: 60 dpi: 79
    size: 620x340mm (24.4x13.4") diag: 707mm (27.8")
  Monitor-3: DP1-3 res: 1920x1080 hz: 60 dpi: 79
    size: 620x340mm (24.4x13.4") diag: 707mm (27.8")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 0000:00:1f.3 chip-ID: 8086:a0c8 class-ID: 0403
  Device-2: GN Netcom Jabra PRO 9470 type: USB
    driver: jabra,snd-usb-audio,usbhid bus-ID: 3-1.2:6 chip-ID: 0b0e:1042
    class-ID: 0300 serial: <filter>
  Device-3: Lenovo ThinkPad USB-C Dock Gen2 USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-1.3.3.2:10
    chip-ID: 17ef:a396 class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.15.11-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel
    bus-ID: 0000:00:14.3 chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Intel Ethernet I219-LM vendor: Dell driver: e1000e v: kernel
    port: N/A bus-ID: 0000:00:1f.6 chip-ID: 8086:15fb class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-3: Lenovo USB-C Dock Ethernet type: USB driver: r8152
    bus-ID: 2-1.1:4 chip-ID: 17ef:a387 class-ID: 0000 serial: <filter>
  IF: enp0s13f0u1u1 state: down mac: <filter>
  IF-ID-1: virbr0 state: up speed: 10 Mbps duplex: unknown mac: <filter>
  IF-ID-2: vnet0 state: unknown speed: 10 Mbps duplex: full mac: <filter>
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev:
    class-ID: 0104
Drives:
  Local Storage: total: 596.45 GiB used: 55.96 GiB (9.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba
    model: KBG40ZNS512G NVMe KIOXIA 512GB size: 476.94 GiB block-size:
    physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 10410106 temp: 70.8 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Samsung
    model: Flash Drive FIT size: 119.51 GiB block-size: physical: 512 B
    logical: 512 B speed: <unknown> type: SSD serial: <filter> rev: 1100
    scheme: GPT
Partition:
  ID-1: / raw-size: 119.25 GiB size: 119.25 GiB (100.00%)
    used: 55.96 GiB (46.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%)
    used: 562 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 119.25 GiB size: 119.25 GiB (100.00%)
    used: 55.96 GiB (46.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 119.25 GiB size: 119.25 GiB (100.00%)
    used: 55.96 GiB (46.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 119.25 GiB size: 119.25 GiB (100.00%)
    used: 55.96 GiB (46.9%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.36 GiB used: 33.2 MiB (0.2%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 64.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 322 Uptime: 7h 41m wakeups: 134 Memory: 15.36 GiB
  used: 11.11 GiB (72.3%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1312 lib: 351 Shell: Zsh v: 5.8
  running-in: kitty inxi: 3.3.11

Thanks for any assistance.

Maybe you can try with the ISO's or the virtio-win AUR package suggested here?
https://wiki.archlinux.org/title/QEMU#Preparing_a_Windows_guest

1 Like

3 posts were split to a new topic: [Thread hijack] Windows GPU passthrough

Could this help here?

1 Like

Ran into that same problem too. Download VirtIO driver ISO, when installing with Virt Manager, I had to "Add Hardware" and add a 2nd CDROM with the VirtIO driver. Loaded the AMD driver even though I'm intel. It's currently installing.

I needed my windows vm to interact properly with my Unraid server so I could interact with the SAMBA shares on it, and I didn't see a good way for folder passthrough from linux to windows guest. So, that's why I am using macvtap for network. This config lets me copy paste text from host/guest back and forth and use my network devices.

Insert the Windows ISO in first CD ROM, Virtio-Win in a secondary CD ROM and during installation, when you are partitioning, browse for drivers and navigate to the amd64/win10 folder in the Virtio-Win CD-ROM for it to detect the viostor driver. After windows has installed, install the guest tools and restart.

My preferred configuration for Windows to work well within Virt-Manager on Nvidia is to have:

OS use UEFI Secure boot with TPM

<os>
  <type arch="x86_64" machine="pc-q35-6.1">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.secboot.fd</loader>
  <nvram>/var/lib/libvirt/qemu/nvram/Windows-11_VARS.fd</nvram>
</os>

<tpm model="tpm-crb">
  <backend type="emulator" version="2.0"/>
</tpm>

Display

<graphics type="spice" port="5900" autoport="no" listen="127.0.0.1">
  <listen type="address" address="127.0.0.1"/>
  <image compression="off"/>
  <gl enable="no"/>
</graphics>

Channels

<channel type="spicevmc">
  <target type="virtio" name="com.redhat.spice.0" state="disconnected"/>
  <alias name="channel1"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

<channel type="spiceport">
  <source channel="org.spice-space.webdav.0"/>
  <target type="virtio" name="org.spice-space.webdav.0" state="disconnected"/>
  <alias name="channel0"/>
  <address type="virtio-serial" controller="0" bus="0" port="3"/>
</channel>

Video

<video>
  <model type="virtio" heads="1" primary="yes">
    <acceleration accel3d="no"/>
  </model>
  <alias name="video0"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>

Vsock

<vsock model="virtio">
  <cid auto="yes" address="3"/>
  <alias name="vsock0"/>
  <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
</vsock>

Network

<interface type="direct">
  <mac address="<MAC_ID>"/>
  <source dev="<DEVICE_ID>" mode="bridge"/>
  <target dev="macvtap0"/>
  <model type="virtio"/>
  <link state="up"/>
  <alias name="net0"/>
  <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
</interface>

Just simplify the issue and just install VirtualBox + Guest Additions, that should take care of folder sharing. In fact, I now run a Windows 11 VM inside VirtualBox. It works for me all the time, except GPU passthrough which is a different animal to deal with.

Thanks everyone, I will let you know what happens.

I spent the past 2 days digging into those topics myself.

Just found this great list of VFIO resources on their reddit channel

For file sharing, from what I've seen, there are 2 options: samba file sharing (got it setup), or hugepages (haven't tried yet)

Even after doing that, the drive isn't found.

No new devices drivers were found. Make sure the installation media contains the correct drivers, and then click OK.

Make sure you're selecting the AMD driver folder for the right OS even if you're on Intel. You might just be selecting the wrong folder.

amd64/w10/

even tried the old versions.

i should probably also say that I have the same issue w/ VirtualBox and Gnome-Boxes

it's so weird, everything I can find and everything being suggested is failing. I know that M$ is making it more and more difficult to virtualize Windows in Linux, but this is ridiculous. I'm almost to the point that I want to boot into windows and try from there. then go back to Garuda and convert the image.

What does the XML look like for your Windows VM in Virt-Manager?

it’s so weird, everything I can find and everything being suggested is failing.

It’s frustrating when it doesn’t work and none of the online solutions work. Spent 3 full days trying to get VM to work. Taking a break until someone can give me a hint.

hang on lemme grab it.

currently:

<domain type="kvm">
  <name>win10</name>
  <uuid>94154808-dd84-4580-acb1-d6da4d95bad1</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">4194304</memory>
  <currentMemory unit="KiB">4194304</currentMemory>
  <vcpu placement="static">3</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-6.2">hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
    </hyperv>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model" check="partial"/>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <boot order="2"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/huff/isos/winx-x64.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/huff/isos/virtio-win-0.1.208.iso"/>
      <target dev="sdc" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="2"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:9e:f6:04"/>
      <source network="default"/>
      <model type="e1000e"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>

Based on that configuration, I wouldn't think you even need the Virtio drivers to see the hard drive to install if you're using SATA bus. Could try changing the disk xml to use virtio instead of sata and see if that helps. But, when I created machines without using virtio devices I didn't need the drivers to do installation or detect devices.

agreed, and maybe i need to change that disk, but it tells me there arent any drivers when i try to install w/o virtio and there arent any disks.

P.S. sorry for the long reply time, this is on my work computer and I was really busy this wknd.

same issue when adding VirtIO disk instead of SATA disk and setting the .qcow file as the VIO disk.

blarg!