LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Virt-Manager Oddities, and slackware from source builds (https://www.linuxquestions.org/questions/slackware-14/virt-manager-oddities-and-slackware-from-source-builds-4175636992/)

lawnm0wer 08-23-2018 06:50 PM

Virt-Manager Oddities, and slackware from source builds
 
Hello slackers! My first problem, is that I'm trying to setup virt-manager. I recently built it and its deps through sbopkg, I checked the slackdocs page on it and set up a libvirt group for my current non-root account.

the problem is, I open it up, and get this error message

Code:

Unable to connect to libvirt.

Verify that the 'libvirtd' daemon is running.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1035, in _do_open
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 144, in open
    open_flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

I don't know what I missed or what else I need to be able to get virt-manager working with my system. The main idea is to be able to have at least reasonable GPU passthrough performance and use spice with it.

For my second problem, I am installing slackware on an old laptop that I want to take with me for the sake of travel. except that the performance is not up to my standards, so I figured I'd build the kernel by hand, then I remember my attempts at gentoo, the reasons I went back to slack, and figured "why not build the other programs?"

so I downloaded the sources of 14.2.

How I would automate the process of chmodding and executing the .SlackBuild(s) of the sources? I for one don't want to do this all by hand as it would cost me more time than I'm willing to spend on it.

mralk3 08-23-2018 07:38 PM

Did you start libvirt? Directions are on the read me here:

https://slackbuilds.org/slackbuilds/...libvirt/README

It needs to be set to start at boot.

lawnm0wer 08-24-2018 07:14 PM

Quote:

Originally Posted by mralk3 (Post 5895032)
Did you start libvirt? Directions are on the read me here:

https://slackbuilds.org/slackbuilds/...libvirt/README

It needs to be set to start at boot.

yes I did, it turns out that not only is libvirt working, virt-manager works when I'm on root, but not on my user account. For a matter of clarification with my OP, I added the libvirt group after I installed everything. Maybe that screwed something up, or wasn't sufficient enough?

EDIT: Also, I tried making a test VM, and libvirt spat out the following:

Code:

Unable to complete install: 'unsupported configuration: this QEMU does not support 'qxl' video device'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 2545, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 498, in start_install
    doboot, transient)
  File "/usr/share/virt-manager/virtinst/guest.py", line 434, in _create_guest
    domain = self.conn.createXML(install_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3659, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: unsupported configuration: this QEMU does not support 'qxl' video device

at the moment, I'm going to install ovmf on my system, and poke through my bios to see if I can find anything I can do to remedy this problem. I would still like help on how to resolve libvirt not working for users.

mralk3 08-25-2018 09:46 PM

You need: https://slackbuilds.org/repository/1...f86-video-qxl/
and I also usually install: https://slackbuilds.org/repository/1...spice-vdagent/

You need to start it up without qxl enabled and then install qxl, power off, enable qxl, start up and qxl will work in the VM.

lawnm0wer 09-11-2018 07:13 PM

back to square two
 
Hoo boy...

What an adventure I've had this past few weeks with slackware.

so here's what happened. Something went really wrong in between messing with virt-manager's options while root. somehow I did something that caused my system to not be able to detect any screens, so I had to backup my data and reinstall slackware from the bare command line. Eventually I managed to not only get a Windows 7 VM working, but I managed to install the virtio drivers from redhat onto the machine for better performance... unfortunately, this did not include gaming performance; the moment I tried to start a backed up copy of xonotic, all my plans went down the toilet.

So I pulled out the extra GPU I had bought specifically as a host GPU for passthrough, and put my stronger, gaming GPU on the other bus, and tried to pass it through immediately for shiz and giggles. got an error that I don't remember, so I reinstalled slackware again to be safe.

two hours of untangling virt-manager deps later, I got my win7 VM working again. I tried to pass it through to my VM on my fresh install, and it puked out this error.

Code:

Error starting domain: internal error: qemu unexpectedly closed the monitor: 2018-09-12 04:21:55.339+0000: Domain id=1 is tainted: high-privileges
2018-09-12T04:21:55.882537Z qemu-kvm: -device vfio-pci,host=07:00.1,id=hostdev0,bus=pci.0,addr=0x9: vfio error: 0000:07:00.1: group 22 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 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1508, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1080, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: qemu unexpectedly closed the monitor: 2018-09-12 04:21:55.339+0000: Domain id=1 is tainted: high-privileges
2018-09-12T04:21:55.882537Z qemu-kvm: -device vfio-pci,host=07:00.1,id=hostdev0,bus=pci.0,addr=0x9: vfio error: 0000:07:00.1: group 22 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

at this point, I realize that I need some help and advice regarding this problem. I don't know where to start to find information, because it's either outdated or for distros that are radically different from slackware, so I have the following questions:
  • My GPU is EFI-based, I did not install OVMF on slackware, Should I install OVMF and try again?
  • Will I be able to use spice to avoid the need for a KVM-switch? if so, is it worth the effort?
  • Since spice is installed, will the windows 7 spice drivers be necessary for better machine and gaming performance?
  • I've heard about audio issues, what are common problems that people have with audio and how should I avoid them?
  • is there any reason I should install Xen over KVM/Qemu that isn't "multiple simultaneous VMs running at once"? Should I even bother?
  • what other software or dependencies should I install on my slackware-based host so I can get the most out of my gpu-passthrough experience?

My best-case-scenario goal, is something like this: http://www.youtube.com/watch?v=ssfvpLXK8po given my hardware is AMD-based, it'd be far from exact.
At the very least, I want to pass my GPU through to a windows 7 VM, and be able to game smoothly on it, while keeping all my writing and other stuff on slackware.

Machine specs for reference
  • Mobo : Asus sabertooth 990FX
  • GPUs :Sapphire RX 580
  • Sapphire HD 6450
  • CPU : AMD FX8350 4.2ghz
  • Host OS : Slackware-current (8/21/18 build)

ninikos 09-12-2018 10:16 AM

I am using exact the same motherboard and processor on my main desktop and three graphics cards, two are used for passthrough: an amd 7350 graphics and an nvidia quadro fx 3800.

Even though I don't use libvirt, because I could not get the passthrough to work, I have made this little command called vms. See here

https://www.linuxquestions.org/quest...es-4175637126/

I have been using it to successfully run linuxes, windows, macos and freebsd with full 3d hardware acceleration. Have a look here for pointers about passthrough, even if you don't use vms, it might be useful

https://docs.slackware.com/howtos:em...ci-passthrough

Also, for audio on a windows guest, the best way is to buy a cheap pci sound card and pass it through to the guest, or buy a cheap usb card and pass through the host's usb controller. Windows usually have smaller buffer sizes for audio and because of this, there are clicks and pops here and there caused by buffer underruns and on top of that a lot of latency, especially when running games and videos.

lawnm0wer 09-12-2018 05:26 PM

Quote:

Originally Posted by ninikos (Post 5902562)
I am using exact the same motherboard and processor on my main desktop and three graphics cards, two are used for passthrough: an amd 7350 graphics and an nvidia quadro fx 3800.

Even though I don't use libvirt, because I could not get the passthrough to work, I have made this little command called vms. See here

https://www.linuxquestions.org/quest...es-4175637126/

I have been using it to successfully run linuxes, windows, macos and freebsd with full 3d hardware acceleration. Have a look here for pointers about passthrough, even if you don't use vms, it might be useful

https://docs.slackware.com/howtos:em...ci-passthrough

Also, for audio on a windows guest, the best way is to buy a cheap pci sound card and pass it through to the guest, or buy a cheap usb card and pass through the host's usb controller. Windows usually have smaller buffer sizes for audio and because of this, there are clicks and pops here and there caused by buffer underruns and on top of that a lot of latency, especially when running games and videos.

MASSIVE EDIT:
Can you please make it clear that you're using alienbob's slackbuild of VDE, and not the slackbuilds.org's slackbuild? I figured this out only after searching for TigerVNC and finally understanding how you managed to get that to work, as the slackbuilds.org version of VDE refuses to compile.

other than that, I've managed to boot an iso of my windows 7 disc, so I'll continue to look through the manuals on VMS, so far it's promising!

ninikos 09-14-2018 02:06 AM

Quote:

Originally Posted by lawnm0wer (Post 5902718)
MASSIVE EDIT:
Can you please make it clear that you're using alienbob's slackbuild of VDE, and not the slackbuilds.org's slackbuild? I figured this out only after searching for TigerVNC and finally understanding how you managed to get that to work, as the slackbuilds.org version of VDE refuses to compile.

I have been using the slackbuilds.org vde.SlackBuild, but I haven't tried to compile it for some time. But alienbob's SlackBuild should also work fine.

You need VDE if you want to use VDE network, I have to remove that from REQUIRES, since it's really an optional dependency.

55020 09-14-2018 03:55 AM

Quote:

Originally Posted by lawnm0wer (Post 5902718)
the slackbuilds.org version of VDE refuses to compile

That's something we can help you with. Are you on 14.2, or are you on -current? If you're on -current, you need to use Ponce's unofficial repo for *everything*. Ponce's repo specifically has a fix for building vde2 with openssl-1.1.x.

https://github.com/Ponce/slackbuilds...2/network/vde2

lawnm0wer 09-20-2018 09:11 PM

Quote:

Originally Posted by 55020 (Post 5903201)
That's something we can help you with. Are you on 14.2, or are you on -current? If you're on -current, you need to use Ponce's unofficial repo for *everything*. Ponce's repo specifically has a fix for building vde2 with openssl-1.1.x.

https://github.com/Ponce/slackbuilds...2/network/vde2

yes, that was exactly the thing. Ninikos, sorry that I made such a quick assumption, I've had a few frustrating weeks with tech.

I am marking this thread as solved, since I am not using virt-manager anymore, and my other questions I have made in a different thread.


All times are GMT -5. The time now is 08:12 AM.