[virt-tools-list] Docs on getting VirGL working with virt-manager?

Daniel Kasak d.j.kasak.dk at gmail.com
Thu Feb 21 10:33:30 UTC 2019


On Thu, Feb 21, 2019 at 11:57 PM Erik Skultety <eskultet at redhat.com> wrote:

> On Tue, Feb 19, 2019 at 09:42:44PM +1100, Daniel Kasak wrote:
> > On Wed, Feb 20, 2019 at 8:43 AM Cole Robinson <crobinso at redhat.com>
> wrote:
> >
> > > On 2/19/19 4:04 AM, Daniel Kasak wrote:
> > > > On Wed, Feb 20, 2019 at 1:29 AM Cole Robinson <crobinso at redhat.com
> > > > <mailto:crobinso at redhat.com>> wrote:
> > > >
> > > >     On 2/18/19 7:39 AM, Daniel Kasak wrote:
> > > >     > On Tue, Feb 19, 2019 at 12:38 AM Cole Robinson
> > > >     <crobinso at redhat.com <mailto:crobinso at redhat.com>
> > > >     > <mailto:crobinso at redhat.com <mailto:crobinso at redhat.com>>>
> wrote:
> > > >     >
> > > >     >     On 2/17/19 10:57 AM, Daniel Kasak wrote:
> > > >     >     > On Sat, Feb 9, 2019 at 2:05 AM Cole Robinson
> > > >     <crobinso at redhat.com <mailto:crobinso at redhat.com>
> > > >     >     <mailto:crobinso at redhat.com <mailto:crobinso at redhat.com>>
> > > >     >     > <mailto:crobinso at redhat.com <mailto:crobinso at redhat.com>
> > > >     <mailto:crobinso at redhat.com <mailto:crobinso at redhat.com>>>>
> wrote:
> > > >     >     >
> > > >     >     >     On 2/8/19 7:49 PM, Daniel Kasak wrote:
> > > >     >     >     > I've changed the following from the default:
> > > >     >     >     >
> > > >     >     >     > Display Spice:
> > > >     >     >     >  - Listen type
> > > >     >     >     >     - Default ( Address ) - no matter what other
> > > options I
> > > >     >     choose with
> > > >     >     >     > this, I get "SPICE GL support is local-only ..."
> > > >     >     >     >     - None - I get "Error starting domain: internal
> > > >     error: qemu
> > > >     >     >     > unexpectedly closed the monitor"
> > > >     >     >     >
> > > >     >     >
> > > >     >     >     This last bit should be the working config, but that
> > > >     error means
> > > >     >     >     something went wrong launching qemu. pastebin your
> > > >     >     >     /var/log/libvirt/qemu/$vmname.log and I will check
> > > >     >     >
> > > >     >     >
> > > >     >     > It's taken a while to figure out exactly what's going on
> > > >     here ...
> > > >     >     there
> > > >     >     > are *no* logs in that directory. But I caught systemd
> > > logging:
> > > >     >     >   Process 15334 (qemu-system-x86) of user 1000 dumped
> core.
> > > >     >     >  ... each time I tried to start the VM.
> > > >     >     >
> > > >     >     > I've tried with qemu-3.1.0 and qemu built from git.
> > > >     >     >
> > > >     >     > Is there a way to get virt-manager to spit out the exact
> > > >     command line
> > > >     >     > it's using to invoke qemu?
> > > >     >
> > > >     >     Are you using qemu:///session maybe? Then the logs will be
> in
> > > >     >     ~/.cache/libvirt/qemu/log/ . The log file is the the
> canonical
> > > >     location
> > > >     >     to find the qemu command line that libvirt is generating
> > > >     >
> > > >     >
> > > >     > Aha. I have the command-line now. Thanks :) Full log:
> > > >
> > > >     >
> > > >     > char device redirected to /dev/pts/7 (label charserial0)
> > > >     > ./run.sh: line 49: 31512 Bad system call         (core dumped)
> > > >     LC_ALL=C
> > > >     >
> > > >
> > >
> PATH=/home/dkasak/Applications/.bin:/opt/efl/bin:/usr/lib/llvm/7/bin:/opt/e22/bin:/opt/rocm/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
> > > >     > HOME=/home/dkasak USER=dkasak LOGNAME=dkasak
> QEMU_AUDIO_DRV=spice
> > > >     > /usr/bin/qemu-system-x86_64 -name
> > > >     guest=Android-x86,debug-threads=on -S
> > > >     > -machine
> > > >     pc-i440fx-3.1,accel=tcg,usb=off,vmport=off,dump-guest-core=off
> > > >     > -cpu kvm64 -m 1024 -realtime mlock=off -smp
> > > >     > 2,sockets=2,cores=1,threads=1 -uuid
> > > >     3e432cc9-8ce8-4089-912f-8ef50d9a9c8a
> > > >     > -no-user-config -nodefaults -mon
> > > >     > chardev=charmonitor,id=monitor,mode=control -rtc
> > > >     base=utc,driftfix=slew
> > > >     > -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown
> > > -global
> > > >     > PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
> strict=on
> > > >     > -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device
> > > >     >
> > > >
> > >
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5
> > > >     > -device
> > > >     >
> ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1
> > > >     > -device
> > > >     >
> ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2
> > > >     -drive
> > > >     >
> > > >
> > >
> file=/home/dkasak/.local/share/libvirt/images/Android-x86.qcow2,format=qcow2,if=none,id=drive-ide0-0-0
> > > >     > -device
> > > >     >
> > > ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
> > > >     > -drive if=none,id=drive-ide0-0-1,readonly=on -device
> > > >     > ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1
> -netdev
> > > >     > user,id=hostnet0 -device
> > > >     >
> > > e1000,netdev=hostnet0,id=net0,mac=52:54:00:74:b8:ea,bus=pci.0,addr=0x3
> > > >     > -chardev pty,id=charserial0 -device
> > > >     > isa-serial,chardev=charserial0,id=serial0 -device
> > > >     > usb-tablet,id=input0,bus=usb.0,port=1 -spice
> > > >     >
> > > >
> > >
> port=0,disable-ticketing,image-compression=off,gl=on,rendernode=/dev/dri/renderD128,seamless-migration=on
> > > >     > -device
> > > virtio-vga,id=video0,virgl=on,max_outputs=1,bus=pci.0,addr=0x2
> > > >     > -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
> > > >     > hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev
> > > >     > spicevmc,id=charredir0,name=usbredir -device
> > > >     > usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2
> -chardev
> > > >     > spicevmc,id=charredir1,name=usbredir -device
> > > >     > usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device
> > > >     > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -sandbox
> > > >     >
> > > >
> > >
> on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
> > > >     > -msg timestamp=on
> > > >
> > > >
> > > >     Does dropping the -sandbox line make things work? Maybe that 'Bad
> > > system
> > > >     call' thing is a seccomp error
> > > >
> > > >
> > > > It changes things ...
> > > >
> > > > Now qemu just hangs instead of core-dumping :) strace on the process
> > > gives:
> > > >
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=29564013}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=29596135}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=29462631}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
> > > > ppoll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16,
> > > > events=POLLIN}, {fd=17, events=POLLIN}, {fd=19, events=POLLIN}], 5,
> > > > {tv_sec=0, tv_nsec=29485905}, NULL, 8) = 0 (Timeout)
> > > >
> > >
> > > Try disabling seccomp_sandbox in /etc/libvirt/qemu.conf, restarting
> > > libvirtd, and trying libvirt again. Trying to get a libvirt qemu
> command
> > > line to run manually has a bunch of hurdles
> > >
> >
> > Done ( including the service restart ), but qemu still core dumps :(
> >
> > FYI I have the following enabled in my kernel config:
> >
> > Symbol: SECCOMP [=y]
> > Symbol: HAVE_ARCH_SECCOMP_FILTER [=y]
> > Symbol: SECCOMP_FILTER [=y]
> >
> > Nothing else appears in my ~/.cache/libvirt/qemu/log logfile - just:
> >  2019-02-19 10:32:55.126+0000: shutting down, reason=failed
> >   ... after the qemu command.
> >
> > Would that core dump be useful? systemd is saying:
> >  Feb 19 21:40:58 nanginator systemd-coredump[12860]: Resource limits
> > disable core dumping for process 12855 (qemu-system-x86).
> >
> > I can figure out how to bump those limits if it's of use ...
> >
> > Thanks for all your help, by the way. Much appreciated :)
>
> Hi, can you attach the VM XML config (virsh dumpxml <domain_name>)? Since
> this
> is about VirGL, what GPU and CPU do you have on this system?
>
> Erik
>

Hi Eric. Thanks for the response.

Yeah I have an AMD system.

AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx
OpenGL renderer string: AMD RAVEN (DRM 3.27.0, 5.0.0-rc4, LLVM 7.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.1.0-devel
(git-338d399fd0)
OpenGL core profile shading language version string: 4.50

XML Config:

<domain type='qemu'>
  <name>Android-x86</name>
  <uuid>3e432cc9-8ce8-4089-912f-8ef50d9a9c8a</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.1'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state='off'/>
  </features>
  <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>kvm64</model>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </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='/home/dkasak/.local/share/libvirt/images/Android-x86.qcow2'/>
      <target dev='hda' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <interface type='user'>
      <mac address='52:54:00:74:b8:ea'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
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>
    <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'>
      <listen type='none'/>
      <image compression='off'/>
      <gl enable='yes'/>
    </graphics>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </sound>
    <video>
      <model type='virtio' heads='1' primary='yes'>
        <acceleration accel3d='yes'/>
      </model>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
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='0x00' slot='0x06'
function='0x0'/>
    </memballoon>
  </devices>
</domain>

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20190221/b550adfe/attachment.htm>


More information about the virt-tools-list mailing list