Slackware This Forum is for the discussion of Slackware Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
04-07-2021, 10:49 AM
#1
Member
Registered: Sep 2003
Distribution: Slackware64 current
Posts: 95
Rep:
Create a virtual machine with QEMU
Hi,
I'm trying do make a virtual machine using QEMU so that I can remove dual boot with Windows 10. I read that QEMU supports PCI Passthrough, so I can use my graphics card with maximum performance.
When I run virt-manager, I got stuck at step 5 of 5, and I got this error:
libvirt.libvirtError: unsupported configuration: domain configuration does not support video model 'qxl'
I tried to change with Video VGA, but I got another error:
libvirt.libvirtError: unsupported configuration: USB redirection is not supported by this version of QEMU
I installed a lot of packages, here they are:
qemu
vde
audit
virt-manager
libvirt
libosinfo
osinfo-db
osinfo-db-tools
spice-protocol
xf86-video-qxl
urlgrabber
yajl
spice-guest-tools
vala
opus
spice-gtk - pacchetto già fatto
meson
ninja
gtk-vnc - pacchetto già fatto
usbredir
My hardware configuration should be compliant with IOMMU:
Mainboard: ASRock X570 Steel Legend
CPU: AMD Ryzen 7 5800X
Graphics card: Radeon RX 580
Is someone already using a Windows guest with PCI passthrough? Could you tell me the right configuration? So finally I will be able to remove the Windows partition and use it only for necessity (especially games) with QEMU.
Many thanks in advance.
Scorpion77
04-07-2021, 12:51 PM
#2
Member
Registered: Apr 2014
Location: California, USA
Distribution: slackware64-current
Posts: 231
Rep:
Just glancing at your list, xf86-video-qxl should be installed in a linux guest, not the host. As far as pass through (I've never used it), I believe you need to pass options to kernel at boot, something like "iommu=pt" If windows is your guest OS, you will need to install Spice tools for windows.
04-07-2021, 02:37 PM
#3
Senior Member
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Does the guest launches with less options ?
At least I have some win7 an 10 running with qemu but on laptop. Never checked for graphic card as I'm using that for (proprietary) office work.
Maybe the command launch could help too ?
04-07-2021, 07:52 PM
#4
Member
Registered: Dec 2020
Location: South Australia
Distribution: slackware64-current
Posts: 95
Rep:
I looked into pass-through at one point and it requires a separate dedicated GPU for each guest and your system only has the one. You could theoretically run slackware completely headless (not even a console) and let the guest own the gpu but that's probably not what you're after.
From a quick search this seems to have a reasonable rundown of the requirements and setup.
https://wiki.gentoo.org/wiki/GPU_pas...bvirt_qemu_kvm
04-08-2021, 03:49 AM
#5
Member
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174
Rep:
This is my build order for qemu - libvirt - virt-manager
Code:
# For QEMU
libbsd
netcat-openbsd
virglrenderer
acpica
ovmf
libseccomp
libiscsi
libnfs
usbredir
alabaster
imagesize
pytz
pytzdata
python3-babel
MarkupSafe
Jinja2
snowballstemmer
sphinxcontrib-applehelp
sphinxcontrib-devhelp
sphinxcontrib-htmlhelp
sphinxcontrib-jsmath
sphinxcontrib-qthelp
sphinxcontrib-serializinghtml
Sphinx
numactl
spice-protocol
softhsm
pcsc-lite
libcacard
spice
vde2
liburcu
glusterfs
liburing
device-tree-compiler
snappy
daemon
rdma-core
rng-tools
multipath-tools
qemu
# FOR LIBVIRT
osinfo-db-tools
osinfo-db
libosinfo
yajl
urlgrabber
wheel
python-zipp
python-importlib_metadata
python3-pyrsistent
python3-attrs
python3-jsonschema
nftables (rebuild slackware package)
python3-slip
python3-decorator
firewalld
sanlock
phodav
libvirt
# FOR VIRT-MANAGER
spice-gtk
gtk-vnc
libvirt-glib
libvirt-python
tunctl
virt-manager
You can use my slackbuilds to build with latest stable version
https://gitlab.com/w41l/slackbuilds/-/tree/master/
04-08-2021, 08:21 AM
#6
Member
Registered: Sep 2003
Distribution: Slackware64 current
Posts: 95
Original Poster
Rep:
Quote:
Originally Posted by
Tonus
Does the guest launches with less options ?
At least I have some win7 an 10 running with qemu but on laptop. Never checked for graphic card as I'm using that for (proprietary) office work.
Maybe the command launch could help too ?
This is the output of virt-manager --debug related to Video QXL:
Code:
[gio, 08 apr 2021 15:16:46 virt-manager 4000] DEBUG (installer:599) Generated install XML:
<domain type="kvm">
<name>win10</name>
<uuid>9972b551-808b-41c3-9674-f7e7377c3451</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>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
<boot dev="cdrom"/>
<boot dev="hd"/>
</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"/>
<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_reboot>destroy</on_reboot>
<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="/WinSSD/win10.qcow2"/>
<target dev="sda" bus="sata"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/WinD/W10HomePro20H2x64.iso"/>
<target dev="sdb" bus="sata"/>
<readonly/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:e0:22:b0"/>
<model type="e1000e"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich9"/>
<video>
<model type="qxl"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>
[gio, 08 apr 2021 15:16:46 virt-manager 4000] DEBUG (installer:601) Generated boot XML:
<domain type="kvm">
<name>win10</name>
<uuid>9972b551-808b-41c3-9674-f7e7377c3451</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>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
<boot dev="hd"/>
</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"/>
<clock offset="localtime">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
<timer name="hypervclock" present="yes"/>
</clock>
<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="/WinSSD/win10.qcow2"/>
<target dev="sda" bus="sata"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/WinD/W10HomePro20H2x64.iso"/>
<target dev="sdb" bus="sata"/>
<readonly/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:e0:22:b0"/>
<model type="e1000e"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich9"/>
<video>
<model type="qxl"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>
[gio, 08 apr 2021 15:16:46 virt-manager 4000] DEBUG (error:101) error dialog message:
summary=Impossibile completare l'installazione: 'unsupported configuration: domain configuration does not support video model 'qxl''
details=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/lib64/python3.9/site-packages/libvirt.py", line 4376, in createXML
raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: unsupported configuration: domain configuration does not support video model 'qxl'
This is the output of virt-manager --debug related to Video VGA:
Code:
[gio, 08 apr 2021 15:19:54 virt-manager 4000] DEBUG (installer:599) Generated install XML:
<domain type="kvm">
<name>win10</name>
<uuid>8a31c60d-7293-4ea1-818e-595517326966</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>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
<boot dev="cdrom"/>
<boot dev="hd"/>
</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"/>
<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_reboot>destroy</on_reboot>
<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="/WinSSD/win10.qcow2"/>
<target dev="sda" bus="sata"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/WinD/W10HomePro20H2x64.iso"/>
<target dev="sdb" bus="sata"/>
<readonly/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:cc:d3:4b"/>
<model type="e1000e"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich9"/>
<video>
<model type="vga"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>
[gio, 08 apr 2021 15:19:54 virt-manager 4000] DEBUG (installer:601) Generated boot XML:
<domain type="kvm">
<name>win10</name>
<uuid>8a31c60d-7293-4ea1-818e-595517326966</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>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
<boot dev="hd"/>
</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"/>
<clock offset="localtime">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
<timer name="hypervclock" present="yes"/>
</clock>
<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="/WinSSD/win10.qcow2"/>
<target dev="sda" bus="sata"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/WinD/W10HomePro20H2x64.iso"/>
<target dev="sdb" bus="sata"/>
<readonly/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:cc:d3:4b"/>
<model type="e1000e"/>
</interface>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich9"/>
<video>
<model type="vga"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>
[gio, 08 apr 2021 15:19:54 virt-manager 4000] DEBUG (error:101) error dialog message:
summary=Impossibile completare l'installazione: 'unsupported configuration: USB redirection is not supported by this version of QEMU'
details=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/lib64/python3.9/site-packages/libvirt.py", line 4376, in createXML
raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: unsupported configuration: USB redirection is not supported by this version of QEMU
04-08-2021, 08:27 AM
#7
Member
Registered: Sep 2003
Distribution: Slackware64 current
Posts: 95
Original Poster
Rep:
Quote:
Originally Posted by
walecha
This is my build order for qemu - libvirt - virt-manager
Code:
# For QEMU
libbsd
netcat-openbsd
virglrenderer
acpica
ovmf
libseccomp
libiscsi
libnfs
usbredir
alabaster
imagesize
pytz
pytzdata
python3-babel
MarkupSafe
Jinja2
snowballstemmer
sphinxcontrib-applehelp
sphinxcontrib-devhelp
sphinxcontrib-htmlhelp
sphinxcontrib-jsmath
sphinxcontrib-qthelp
sphinxcontrib-serializinghtml
Sphinx
numactl
spice-protocol
softhsm
pcsc-lite
libcacard
spice
vde2
liburcu
glusterfs
liburing
device-tree-compiler
snappy
daemon
rdma-core
rng-tools
multipath-tools
qemu
# FOR LIBVIRT
osinfo-db-tools
osinfo-db
libosinfo
yajl
urlgrabber
wheel
python-zipp
python-importlib_metadata
python3-pyrsistent
python3-attrs
python3-jsonschema
nftables (rebuild slackware package)
python3-slip
python3-decorator
firewalld
sanlock
phodav
libvirt
# FOR VIRT-MANAGER
spice-gtk
gtk-vnc
libvirt-glib
libvirt-python
tunctl
virt-manager
You can use my slackbuilds to build with latest stable version
https://gitlab.com/w41l/slackbuilds/-/tree/master/
Wow! So many packages! When I have some time I try to compile and install them. Thank you.
04-08-2021, 10:33 AM
#8
Member
Registered: Sep 2003
Distribution: Slackware64 current
Posts: 95
Original Poster
Rep:
Quote:
Originally Posted by
notzed
I looked into pass-through at one point and it requires a separate dedicated GPU for each guest and your system only has the one. You could theoretically run slackware completely headless (not even a console) and let the guest own the gpu but that's probably not what you're after.
From a quick search this seems to have a reasonable rundown of the requirements and setup.
https://wiki.gentoo.org/wiki/GPU_pas...bvirt_qemu_kvm
Thank you, so I can't do it, I have only one GPU.
04-08-2021, 12:04 PM
#9
Member
Registered: Apr 2014
Location: California, USA
Distribution: slackware64-current
Posts: 231
Rep:
Quote:
Originally Posted by
scorpion77
Wow! So many packages! When I have some time I try to compile and install them. Thank you.
I use ponce's repo for current exclusively - my build order is a bit more modest and works well for current 86_x64
gtksourceview3
osinfo-db-tools
osinfo-db
libosinfo
yajl
numactl
libvirt
libvirt-glib
libvirt-python
gtk-vnc
spice-protocol
spice
usbredir
spice-gtk
device-tree-compiler
libnfs
libseccomp
snappy
vde2
virglrenderer
qemu
virt-manager
acpica
ovmf
Last edited by truepatriot76; 04-08-2021 at 05:20 PM .
04-08-2021, 05:17 PM
#10
Member
Registered: Apr 2021
Posts: 99
Rep:
You need gst-plugins-ugly with x264 built with it.
04-08-2021, 09:12 PM
#11
Member
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174
Rep:
Actually that was my build order for qemu-libvirt for used in server environment. That's why it had packages for managing and accessing SAN server with multipath I/O, firewalld, etc. If you have nvme drive in your system, and using linux 5.10+, then I highly recommend to build qemu against liburing. You can use high capacity I/O for your vm with very very low CPU usage on the host. In epyc server, I got gigabit I/O with less then 5% CPU. But I think io_uring still does not work nicely with windows vm. Sometimes they got BSOD when doing high I/O, tested when extracting large ISO. To use io_uring just pass parameter on the vm disk configuration: io="io_uring".
Anyway, this is my GPU passthrough test using second GPU of my laptop, using it's own monitor through hdmi port on the gpu:
https://imgur.com/sigBGdk
https://i.imgur.com/Q9dpCQx.jpg
I'm booting slackware64-current with driver radeon and amdgpu blacklisted, then using this option in kernel boot line:
Code:
vmlinuz root=... ro intel_iommu=on iommu=pt kvm.ignore_msrs=1 kvm.report_ignored_msrs=0 pcie_acs_override=downstream,multifunction vfio_iommu_type1.allow_unsafe_interrupts=1 rd.driver.pre=vfio-pci vfio_pci.ids=1002:6640,1002:aac0
I also had to pass my usb mouse to the guest.
Last edited by walecha; 04-08-2021 at 09:15 PM .
Reason: info for monitor and mouse
1 members found this post helpful.
All times are GMT -5. The time now is 12:58 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News