Virtual Machine software

Hello,
I would like to know what is the best Virtual Machine software to run Windows on Garuda KDE ?
I need the best possible performance possible inside VM because I want to use it to run Unreal Engine.
Also it should be stable or atleast be able to create snapshots.

If you have a second GPU you can add, you can pass it through to a qemu VM and get near-native performance on Windows. That being said, it isn't a plug and play type solution. It requires a bit of setup.

If not, there are only two real options. VMware Workstation Pro which is an easy to use paid proprietary solution and qemu which is free software but a bit more complicated to setup. Either way, expect a significant performance drop from bare metal as it relates to GPU performance.

Windows graphics performance in VirtualBox is quite poor.

3 Likes

And what about KVM? I heard it is pretty good but I can not seem to make it work. Every time I get this:

error message
Unable to complete install: 'Requested operation is not valid: network 'default' is not active'

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
  callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/createvm.py", line 2001, in _do_async_install
  installer.start_install(guest, meter=meter)
File "/usr/share/virt-manager/virtinst/install/installer.py", line 701, in start_install
  domain = self._create_guest(
File "/usr/share/virt-manager/virtinst/install/installer.py", line 649, in _create_guest
  domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python3.9/site-packages/libvirt.py", line 4376, in createXML
  raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active

I was following this video Windows 10 on KVM - YouTube
Basically almost everything is left on default.

kvm is the virtualization technology sitting underneath qemu.

You are using virt-manager which is a front-end for libvirt that sort of sits on top of both qemu and kvm.

I took a quick peek at that video but it looks like it is assuming you already have a working virt-manager environment. That is some work to setup. It is tough to say from your output what the issue is but I would start by making sure you have the packages iptables-nft and dnsmasq installed.

The Arch wiki has a pretty good write-up on what needs to be done:
https://wiki.archlinux.org/title/Libvirt

3 Likes

KVM was installed in my system by default so I assumed everithing was set up propertly :smiley:
I will take a look at it tomorrow. Thanks for the reply.

So I made it working. But there is still one thing. I need a SATA SSD passthrough but I am not able to make it work.

Every time I get this error
Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
  callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
  callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
  ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in startup
  self._backend.create()
File "/usr/lib/python3.9/site-packages/libvirt.py", line 1353, in create
  raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: unsupported configuration: host doesn't support passthrough of host PCI devices

There is what I tryed so far:
• SVM Mode enabled in bios.
• systemctl start virtlogd.service
• added amd_iommu=on iommu=pt iommu=1 to GRUB_CMDLINE_LINUX_DEFAULT
• added unix_sock_group = "libvirt", unix_sock_rw_perms = "0770" to /etc/libvirt/libvirtd.conf
• usermod -a -G libvirt {MY_USERNAME}
• systemctl start libvirtd
• systemctl enable libvirtd
• added user = "{MY_USERNAME}" and group = "{MY_USERNAME}" to /etc/libvirt/qemu.conf
• systemctl restart libvirtd
• usermod -a -G kvm "{MY_USERNAME}"
• usermod -a -G libvirt "{MY_USERNAME}"

I tryed a few ways of adding SSD to KVM. I do not exactly remeber which was the last. But there is XML from Disk tab in VM details:

<disk type="block" device="disk">
  <driver name="qemu" type="raw"/>
  <source dev="/dev/disk/by-id/63B9D4536E6AE71B"/>
  <target dev="vdb" bus="virtio"/>
  <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</disk>

ls -l /dev/disk/by-uuid/

lrwxrwxrwx 10 root  3 júl 16:03  58C80CC4C80CA1FC -> ../../sda1
lrwxrwxrwx 10 root  3 júl 16:03  63B9D4536E6AE71B -> ../../sdb1
lrwxrwxrwx 15 root  3 júl 16:03  67ff22b8-b895-4fc8-8a44-b341923d92c8 -> ../../nvme0n1p1
inxi -Fza
System:    Kernel: 5.12.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0 
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=67ff22b8-b895-4fc8-8a44-b341923d92c8 
rw rootflags=subvol=@ amd_iommu=on iommu=pt iommu=1 quiet splash rd.udev.log_priority=3 
vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3 
Desktop: KDE Plasma 5.22.2 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM 
Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Desktop Mobo: ASRock model: B450 Gaming K4 serial: <filter> BIOS: American Megatrends 
v: P5.00 date: 05/10/2021 
CPU:       Info: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 family: 17 (23) 
model-id: 71 (113) stepping: 0 microcode: 8701021 cache: L2: 3 MiB 
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86392 
Speed: 3445 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 3445 2: 3515 
3: 3848 4: 3610 5: 3599 6: 3748 7: 3978 8: 3370 9: 3563 10: 3603 11: 3603 12: 3612 
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 and seccomp 
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
Type: spectre_v2 
mitigation: Full AMD retpoline, IBPB: conditional, STIBP: conditional, RSB filling 
Type: srbds status: Not affected 
Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: ASUSTeK driver: nvidia v: 465.31 
alternate: nouveau,nvidia_drm bus-ID: 0a:00.0 chip-ID: 10de:1b81 class-ID: 0300 
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 
screens: 1 
Screen-1: 0 s-res: 3840x1080 s-dpi: 81 s-size: 1204x343mm (47.4x13.5") s-diag: 1252mm (49.3") 
Monitor-1: HDMI-1 res: 1920x1080 hz: 60 dpi: 96 size: 509x286mm (20.0x11.3") diag: 584mm (23") 
Monitor-2: DP-0 res: 1920x1080 dpi: 82 size: 598x336mm (23.5x13.2") diag: 686mm (27") 
OpenGL: renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 direct render: Yes 
Audio:     Device-1: NVIDIA GP104 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
bus-ID: 0a:00.1 chip-ID: 10de:10f0 class-ID: 0403 
Device-2: AMD Starship/Matisse HD Audio vendor: ASRock driver: snd_hda_intel v: kernel 
bus-ID: 0c:00.4 chip-ID: 1022:1487 class-ID: 0403 
Sound Server-1: ALSA v: k5.12.14-zen1-1-zen running: yes 
Sound Server-2: JACK v: 0.125.0 running: no 
Sound Server-3: PulseAudio v: 14.2 running: yes 
Sound Server-4: PipeWire v: 0.3.31 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169 
v: kernel port: d000 bus-ID: 09:00.0 chip-ID: 10ec:8168 class-ID: 0200 
IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Bluetooth: Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB driver: btusb v: 0.8 
bus-ID: 1-4:2 chip-ID: 0a12:0001 class-ID: e001 
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter> 
Drives:    Local Storage: total: 2.84 TiB used: 122.79 GiB (4.2%) 
SMART Message: Unable to run smartctl. Root privileges required. 
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: WDS100T2B0C-00PXH0 
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
rotation: SSD serial: <filter> rev: 211070WD scheme: MBR 
ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD20EZRZ-00Z5HB0 size: 1.82 TiB 
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> 
rev: 0A80 scheme: MBR 
ID-3: /dev/sdb maj-min: 8:16 vendor: Kingston model: SV300S37A120G size: 111.79 GiB block-size: 
physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: BBF0 
scheme: MBR 
Partition: ID-1: / raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 122.7 GiB (13.2%) fs: btrfs 
dev: /dev/nvme0n1p1 maj-min: 259:1 
ID-2: /home raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 122.7 GiB (13.2%) fs: btrfs
dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /var/log raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 122.7 GiB (13.2%)
fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
ID-4: /var/tmp raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 122.7 GiB (13.2%)
fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:      Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
ID-1: swap-1 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram0
ID-2: swap-2 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram1
ID-3: swap-3 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram2
ID-4: swap-4 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram3
ID-5: swap-5 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram4
ID-6: swap-6 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram5
ID-7: swap-7 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram6
ID-8: swap-8 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram7
ID-9: swap-9 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram8
ID-10: swap-10 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram9
ID-11: swap-11 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram10
ID-12: swap-12 type: zram size: 2.61 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram11
Sensors:   System Temperatures: cpu: 53.4 C mobo: 42.0 C gpu: nvidia temp: 57 C
Fan Speeds (RPM): fan-1: 329 fan-2: 0 fan-3: 637 fan-4: 476 fan-5: 0 gpu: nvidia fan: 36%
Power: 12v: N/A 5v: N/A 3.3v: 3.31 vbat: 3.26
Info:      Processes: 372 Uptime: 3m wakeups: 0 Memory: 31.28 GiB used: 4.1 GiB (13.1%) Init: systemd
v: 248 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: pacman: 1712 lib: 507
Shell: fish v: 3.2.2 default: Zsh v: 5.8 running-in: konsole inxi: 3.3.04

You can always use qemu, IMO its the easiest to setup as compared to like Virtualbox. Do note that using software like unreal engine is very resource intensive, I suggest you use raw hardware. You can always have 2 disks having windows and Garuda or dual boot on the same disk, and yes please don't kill me for suggesting dual boot.

Note - Please don't dual boot, WIndows likes to mess grub during every update.

I am familiar with dual boot but I want to be able access the Windows from linux. So SSD passthrough is the ideal solution for me. This way I could boot it directly or as VM.

You need a gpu pass through as well.

Yes for best performance it would be good. But I don't need it for VM to work.
Only thing what I need to be able to use Windows as dualboot or VM is SSD passthrough.

I figured it out. For anyone with motherboard ASRock B450: Bios settings are there a little bit confusing.
Enabled IOMMU support - ASRock Forums

Now I am facing error: Please ensure all devices within the iommu_group are bound to their vfio bus driver.
Anyone know how to fix it ?

ERROR Details
Error starting domain: internal error: qemu unexpectedly closed the monitor: 2021-07-04T19:03:16.171493Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.171717Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.171898Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.172307Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.198190Z qemu-system-x86_64: -device vfio-pci,host=0000:02:00.1,id=hostdev0,bus=pci.6,addr=0x0: vfio 0000:02:00.1: group 0 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
  callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
  callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
  ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in startup
  self._backend.create()
File "/usr/lib/python3.9/site-packages/libvirt.py", line 1353, in create
  raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2021-07-04T19:03:16.171493Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.171717Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.171898Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.172307Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.svme-addr-chk [bit 28]
2021-07-04T19:03:16.198190Z qemu-system-x86_64: -device vfio-pci,host=0000:02:00.1,id=hostdev0,bus=pci.6,addr=0x0: vfio 0000:02:00.1: group 0 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

Nope, but other seacrch for this too :wink:

1 Like

I tend to agree with @SGS here. This thread is starting to seem more like a call for others to do your research for you, rather than a need for technical assistance at this point.

I finally managed to make everything working. But there is still one thing driving me crazy.
When I have VM window in fullscreen mode It automnatically sits on top of each other window. I want to be able to bring other windows in front of VM's one. Also I can not even Alt+Tab from VM because active window is behind.

Any idea how to disable this feature ?

There should be no reason you can’t bring other windows in front of a full screen VM. My guess is the issue is that since you are running the VM fullscreen your input is being locked in the VM which most of the time is what you want. Try pressing the left ctrl+alt. This should unlock your input from the VM and then things like alt-tab should work like you are wanting.

3 Likes

Considering you’re using a Garuda distro you can use Garuda Welcome and go to the gaming section and just use Wine.

If you really want to use a VM software, you can go this route: Garuda Welcome → Garuda Assistant → Oracle VM Virtual Box.

Comparing the functionality in Wine to a full Windows environment is silly. It isn’t even close. Many things don’t work properly in Wine. You are comparing emulation to virtualization.

At this point, Virtualbox is the least performant VM solution, especially for Windows. There was a point when I loved Virtualbox but Oracle hasn’t been the best steward of the technology and it has fallen behind KVM/QEMU and VMware by a substantial margin at this point.

6 Likes

It is strange. Sometimes it is working sometimes no. I don't know what is causing it but sometimes every fullscreened window is automatically set to stay above others.
Probably some bug...

Also do u guys have some tips and tricks how to get best possible performance for CPU in windows 10 VM ?
I have assigned 10 out of 12 threads and done CPU pinning.