.. _installing_libvirt: libvirt/QEMU Installation ######################### This article assumes you already have a working `libvirt` Windows virtual machine. If you use `virt-manager`, this guide also applies because `virt-manager` uses `libvirt` as its back end. A passed-through or virtual GPU is strongly recommended, but the IDD can start in software mode without one. .. _libvirt_determining_memory: Determining memory ^^^^^^^^^^^^^^^^^^ Calculate the base IVSHMEM requirement as: .. math:: \text{BASE SIZE} = \left(\left\lceil\frac{\text{WIDTH} \times 4}{256}\right\rceil \times 256\right) \times \text{HEIGHT} \times 3 Additional shared memory is required for protocol metadata and alignment. The values below include that requirement and are rounded up to a power of two. If a configured mode does not fit, the IDD omits it from the Windows mode list. If a client-requested dynamic resolution does not fit, the helper refuses it and reports the minimum power-of-two size to configure. The current IDD does not publish a truncated frame. .. note:: Increasing this value beyond what you need does not improve performance. It only reserves more host RAM for the VM. .. list-table:: Common IDD values :widths: 60 40 :header-rows: 1 * - Maximum resolution - Total IVSHMEM size (MiB) * - 1920x1080 (1080p) - 64 * - 1920x1200 - 64 * - 2560x1440 (1440p) - 128 * - 3440x1440 - 128 * - 3840x2160 (4K) - 256 * - 5120x1440 - 128 * - 5120x2880 (5K) - 256 * - 7680x4320 (8K) - 512 .. _libvirt_determining_memory_hdr: HDR uses the same 32-bit IDD transport allocation as SDR, so it does not double the IVSHMEM requirement. Native Linux HDR presentation has separate compositor and display requirements; see :ref:`client_hdr`. .. _libvirt_ivshmem: IVSHMEM ^^^^^^^ There are two methods of configuring IVSHMEM, using shared memory directly, or using the KVMFR kernel module. While the KVMFR module is slightly more complicated to configure, it substantially improves performance as it allows Looking Glass to use your GPUs DMA engine to transfer the frame data. .. toctree:: :maxdepth: 1 ivshmem_kvmfr ivshmem_shm .. seealso:: :ref:`igpu_kvmfr_recommended` .. _libvirt_spice_server: Keyboard/mouse/display/audio ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The IDD provides the primary video, keyboard and mouse paths directly over LGMP. SPICE is optional, but is recommended for display fallback, clipboard and audio services. .. note:: The current client owns its SPICE connection and service settings. The canonical options are ``spice:enable``, ``spice:input``, ``spice:clipboard``, ``spice:audio`` and ``spice:usbAudio``. Keep a ```` device if you want these services. For a usable display fallback, set the VM's ``