wiki:TipAndDoc/VM/KVM/virtio

virtio-gpu

QXL vs virtio-vga

  • 結論から言うと、SPICEが未対応のためvirt-manager下では3D accelerationを有効にできない

QXL

  • mitty@guest:~$ lspci
    00:02.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04)
    
  • mitty@guest:~$ dmesg | grep drm
    [    1.057734] [drm] Initialized drm 1.1.0 20060810
    [    1.110306] [drm] Device Version 0.0
    [    1.110308] [drm] Compression level 0 log level 0
    [    1.110309] [drm] Currently using mode #0, list at 0x488
    [    1.110309] [drm] 12286 io pages at offset 0x1000000
    [    1.110310] [drm] 16777216 byte draw area at offset 0x0
    [    1.110310] [drm] RAM header offset: 0x3ffe000
    [    1.110311] [drm] rom modes offset 0x488 for 128 modes
    [    1.110364] [drm] qxl: 16M of VRAM memory size
    [    1.110364] [drm] qxl: 63M of IO pages memory ready (VRAM domain)
    [    1.110365] [drm] qxl: 64M of Surface memory size
    [    1.112882] [drm] main mem slot 1 [f4000000,3ffe000]
    [    1.112884] [drm] surface mem slot 2 [f8000000,4000000]
    [    1.113677] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.113679] [drm] No driver support for vblank timestamp query.
    [    1.113891] [drm] fb mappable at 0xF4000000, size 3145728
    [    1.113891] [drm] fb: depth 24, pitch 4096, width 1024, height 768
    [    1.113892] fb: switching to qxldrmfb from VESA VGA
    [    1.115537] fbcon: qxldrmfb (fb0) is primary device
    [    1.116425] [drm:qxl_enc_commit [qxl]] *ERROR* head number too large or missing monitors config: ffffc90000748000, 0
    [    1.118767] qxl 0000:00:02.0: fb0: qxldrmfb frame buffer device
    [    1.136842] [drm] Initialized qxl 0.1.0 20120117 for 0000:00:02.0 on minor 0
    
  • minecraftは一応動いた
    • 仮想CPU 4コア、メモリ4GBでCPU負荷50%程度、35fps(minecraftの3D設定はなるべく低負荷に設定)

virtio-vga (no 3D)

  • mitty@guest:~$ lspci
    00:02.0 VGA compatible controller: Red Hat, Inc Virtio GPU (rev 01)
    
  • mitty@guest:~$ dmesg | grep drm
    [    0.690401] [drm] Initialized drm 1.1.0 20060810
    [    0.714409] [drm] pci: virtio-vga detected
    [    0.714412] fb: switching to virtiodrmfb from VESA VGA
    [    0.714786] [drm] virgl 3d acceleration not available
    [    0.715117] [drm] virtio vbuffers: 80 bufs, 192B each, 15kB total.
    [    0.715164] [drm] number of scanouts: 1
    [    0.715177] [drm] number of cap sets: 0
    [    0.717593] virtio_gpu virtio0: fb0: virtiodrmfb frame buffer device
    [    0.726158] [drm] Initialized virtio_gpu 0.0.1 0 on minor 0
    
  • 3Dが有効にならない場合、QXLとほぼ変わらない
    • 仮想CPU 4コア、メモリ4GBでCPU負荷50%程度、33fps(minecraftの3D設定はなるべく低負荷に設定)

errors

  1. mitty@host:~$ diff -u virgil.orig.xml virgil.gl.xml
    • virgil.

      old new  
      8787    <graphics type='spice' autoport='yes' listen='0.0.0.0'> 
      8888      <listen type='address' address='0.0.0.0'/> 
      8989      <image compression='off'/> 
       90      <gl enable='yes'/> 
      9091    </graphics> 
      9192    <sound model='ich6'> 
      9293      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> 
    • mitty@host:~$ virsh start virgil
      error: Failed to start domain virgil
      error: unsupported configuration: This QEMU doesn't support spice OpenGL
      
  2. mitty@host:~$ diff -u virgil.orig.xml virgil.gl.xml
    • virgil.

      old new  
      1 <domain type='kvm'> 
       1<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> 
      22  <name>virgil</name> 
      33  <uuid>afd14745-a9f3-44ea-b2da-e2eefabea22b</uuid> 
      44  <memory unit='KiB'>4194304</memory> 
       
      8484    </channel> 
      8585    <input type='mouse' bus='ps2'/> 
      8686    <input type='keyboard' bus='ps2'/> 
      87     <graphics type='spice' autoport='yes' listen='0.0.0.0'> 
      88       <listen type='address' address='0.0.0.0'/> 
      89       <image compression='off'/> 
      90     </graphics> 
       87    <graphics type='sdl' display=':0' xauth='/home/mitty/.Xauthority'/> 
      9188    <sound model='ich6'> 
      9289      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> 
      9390    </sound> 
       
      105102      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> 
      106103    </memballoon> 
      107104  </devices> 
       105  <qemu:commandline> 
       106    <qemu:arg value='-set'/> 
       107    <qemu:arg value='device.video0.driver=virtio-vga'/> 
       108    <qemu:arg value='-display'/> 
       109    <qemu:arg value='gtk,gl=on'/> 
       110  </qemu:commandline> 
      108111</domain> 
    • mitty@host:~$ virsh start virgil
      error: Failed to start domain virgil
      error: internal error: process exited while connecting to monitor: Unable to init server: Could not connect: Connection refused
      2016-10-08T15:12:30.027297Z qemu-system-x86_64: OpenGL is not supported by the display
      
    • ホスト上でXを動かせば良さそう -> Virt-Manager 1.4 Exposes The New OpenGL Options - Phoronix
Last modified 9 months ago Last modified on Oct 9, 2016 12:38:56 AM

Attachments (2)

Download all attachments as: .zip