barrier.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. QEMU Barrier Client
  2. ===================
  3. Generally, mouse and keyboard are grabbed through the QEMU video
  4. interface emulation.
  5. But when we want to use a video graphic adapter via a PCI passthrough
  6. there is no way to provide the keyboard and mouse inputs to the VM
  7. except by plugging a second set of mouse and keyboard to the host
  8. or by installing a KVM software in the guest OS.
  9. The QEMU Barrier client avoids this by implementing directly the Barrier
  10. protocol into QEMU.
  11. `Barrier <https://github.com/debauchee/barrier>`__
  12. is a KVM (Keyboard-Video-Mouse) software forked from Symless's
  13. synergy 1.9 codebase.
  14. This protocol is enabled by adding an input-barrier object to QEMU.
  15. Syntax::
  16. input-barrier,id=<object-id>,name=<guest display name>
  17. [,server=<barrier server address>][,port=<barrier server port>]
  18. [,x-origin=<x-origin>][,y-origin=<y-origin>]
  19. [,width=<width>][,height=<height>]
  20. The object can be added on the QEMU command line, for instance with::
  21. -object input-barrier,id=barrier0,name=VM-1
  22. where VM-1 is the name the display configured in the Barrier server
  23. on the host providing the mouse and the keyboard events.
  24. by default ``<barrier server address>`` is ``localhost``,
  25. ``<port>`` is ``24800``, ``<x-origin>`` and ``<y-origin>`` are set to ``0``,
  26. ``<width>`` and ``<height>`` to ``1920`` and ``1080``.
  27. If the Barrier server is stopped QEMU needs to be reconnected manually,
  28. by removing and re-adding the input-barrier object, for instance
  29. with the help of the HMP monitor::
  30. (qemu) object_del barrier0
  31. (qemu) object_add input-barrier,id=barrier0,name=VM-1