[libvirt PATCH v2 0/4] Enable copy/paste for vnc displays

Jonathon Jongsma posted 4 patches 2 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220324192544.2095897-1-jjongsma@redhat.com
Test syntax-check passed
docs/formatdomain.rst                         | 23 ++++++
src/conf/domain_conf.c                        | 70 +++++++++++++++++--
src/conf/domain_conf.h                        | 24 ++++---
src/conf/domain_validate.c                    |  1 +
src/conf/schemas/domaincommon.rng             | 51 +++++++++-----
src/libvirt_private.syms                      |  4 +-
src/libxl/libxl_conf.c                        |  8 +--
src/libxl/xen_xl.c                            | 16 ++---
src/qemu/qemu_capabilities.c                  |  2 +
src/qemu/qemu_capabilities.h                  |  1 +
src/qemu/qemu_command.c                       | 32 +++++++--
src/qemu/qemu_monitor_json.c                  | 27 +++++++
src/qemu/qemu_process.c                       |  1 +
src/qemu/qemu_validate.c                      |  9 +++
src/security/security_apparmor.c              |  2 +
src/security/security_dac.c                   |  2 +
.../caps_6.1.0.x86_64.xml                     |  1 +
.../caps_6.2.0.aarch64.xml                    |  1 +
.../caps_6.2.0.x86_64.xml                     |  1 +
.../caps_7.0.0.x86_64.xml                     |  1 +
...l-qemu-vdagent-features.x86_64-latest.args | 41 +++++++++++
.../channel-qemu-vdagent-features.xml         | 37 ++++++++++
.../channel-qemu-vdagent.x86_64-latest.args   | 41 +++++++++++
.../qemuxml2argvdata/channel-qemu-vdagent.xml | 37 ++++++++++
tests/qemuxml2argvtest.c                      |  2 +
...el-qemu-vdagent-features.x86_64-latest.xml | 58 +++++++++++++++
.../channel-qemu-vdagent.x86_64-latest.xml    | 58 +++++++++++++++
tests/qemuxml2xmltest.c                       |  2 +
tests/testutilsqemu.c                         |  1 +
29 files changed, 500 insertions(+), 54 deletions(-)
create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent-features.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent-features.xml
create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent.xml
create mode 100644 tests/qemuxml2xmloutdata/channel-qemu-vdagent-features.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/channel-qemu-vdagent.x86_64-latest.xml
[libvirt PATCH v2 0/4] Enable copy/paste for vnc displays
Posted by Jonathon Jongsma 2 years, 1 month ago
This patch series enables support for the qemu-vdagent character device which
enables copy/paste support between guest and client when using vnc graphics.

The guest must be configured with something like the following:

    <channel type='qemu-vdagent'>
      <source>
        <clipboard copypaste='yes'/>
        <mouse mode='client'/>
      </source>
      <target type='virtio' name='com.redhat.spice.0'/>
    </channel>

Copy/paste sync requires a vnc client that has support for copy/paste commands.
Currently virt-viewer does not work, but the version of tigervnc provided by
fedora (executable name 'vncviewer') does work.

More details about this device on Gerd's blog:
https://www.kraxel.org/blog/2021/05/qemu-cut-paste/

For now I have left the target to be configurable to match the spicevmc
channel, although Marc-Andre has suggested to simply hard-code it to the virtio
name com.redhat.spice.0

Changes in v2:
 - change xml syntax to use <clipboard> and <mouse> sub-elements of <source>
   defined in the same way as they are for the spice display.
 - fix a build failure when apparmor was enabled
 - Add another test for when features are turned off

Jonathon Jongsma (4):
  qemu: add capability for qemu-vdagent chardev
  Rename virDomainGraphicsSpiceMouseMode to virDomainMouseMode
  conf: add qemu-vdagent channel
  qemu: add support for qemu-vdagent channel

 docs/formatdomain.rst                         | 23 ++++++
 src/conf/domain_conf.c                        | 70 +++++++++++++++++--
 src/conf/domain_conf.h                        | 24 ++++---
 src/conf/domain_validate.c                    |  1 +
 src/conf/schemas/domaincommon.rng             | 51 +++++++++-----
 src/libvirt_private.syms                      |  4 +-
 src/libxl/libxl_conf.c                        |  8 +--
 src/libxl/xen_xl.c                            | 16 ++---
 src/qemu/qemu_capabilities.c                  |  2 +
 src/qemu/qemu_capabilities.h                  |  1 +
 src/qemu/qemu_command.c                       | 32 +++++++--
 src/qemu/qemu_monitor_json.c                  | 27 +++++++
 src/qemu/qemu_process.c                       |  1 +
 src/qemu/qemu_validate.c                      |  9 +++
 src/security/security_apparmor.c              |  2 +
 src/security/security_dac.c                   |  2 +
 .../caps_6.1.0.x86_64.xml                     |  1 +
 .../caps_6.2.0.aarch64.xml                    |  1 +
 .../caps_6.2.0.x86_64.xml                     |  1 +
 .../caps_7.0.0.x86_64.xml                     |  1 +
 ...l-qemu-vdagent-features.x86_64-latest.args | 41 +++++++++++
 .../channel-qemu-vdagent-features.xml         | 37 ++++++++++
 .../channel-qemu-vdagent.x86_64-latest.args   | 41 +++++++++++
 .../qemuxml2argvdata/channel-qemu-vdagent.xml | 37 ++++++++++
 tests/qemuxml2argvtest.c                      |  2 +
 ...el-qemu-vdagent-features.x86_64-latest.xml | 58 +++++++++++++++
 .../channel-qemu-vdagent.x86_64-latest.xml    | 58 +++++++++++++++
 tests/qemuxml2xmltest.c                       |  2 +
 tests/testutilsqemu.c                         |  1 +
 29 files changed, 500 insertions(+), 54 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent-features.x86_64-latest.args
 create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent-features.xml
 create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent.x86_64-latest.args
 create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent.xml
 create mode 100644 tests/qemuxml2xmloutdata/channel-qemu-vdagent-features.x86_64-latest.xml
 create mode 100644 tests/qemuxml2xmloutdata/channel-qemu-vdagent.x86_64-latest.xml

-- 
2.35.1

Re: [libvirt PATCH v2 0/4] Enable copy/paste for vnc displays
Posted by Marc-André Lureau 1 year, 11 months ago
Hi Jonathon

On Thu, Mar 24, 2022 at 11:26 PM Jonathon Jongsma <jjongsma@redhat.com>
wrote:

> This patch series enables support for the qemu-vdagent character device
> which
> enables copy/paste support between guest and client when using vnc
> graphics.
>
> The guest must be configured with something like the following:
>
>     <channel type='qemu-vdagent'>
>       <source>
>         <clipboard copypaste='yes'/>
>         <mouse mode='client'/>
>       </source>
>       <target type='virtio' name='com.redhat.spice.0'/>
>     </channel>
>
> Copy/paste sync requires a vnc client that has support for copy/paste
> commands.
> Currently virt-viewer does not work, but the version of tigervnc provided
> by
> fedora (executable name 'vncviewer') does work.
>
> More details about this device on Gerd's blog:
> https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
>
> For now I have left the target to be configurable to match the spicevmc
> channel, although Marc-Andre has suggested to simply hard-code it to the
> virtio
> name com.redhat.spice.0
>
> Changes in v2:
>  - change xml syntax to use <clipboard> and <mouse> sub-elements of
> <source>
>    defined in the same way as they are for the spice display.
>  - fix a build failure when apparmor was enabled
>  - Add another test for when features are turned off
>
>
Is there anything missing to merge this?
thanks


> Jonathon Jongsma (4):
>   qemu: add capability for qemu-vdagent chardev
>   Rename virDomainGraphicsSpiceMouseMode to virDomainMouseMode
>   conf: add qemu-vdagent channel
>   qemu: add support for qemu-vdagent channel
>
>  docs/formatdomain.rst                         | 23 ++++++
>  src/conf/domain_conf.c                        | 70 +++++++++++++++++--
>  src/conf/domain_conf.h                        | 24 ++++---
>  src/conf/domain_validate.c                    |  1 +
>  src/conf/schemas/domaincommon.rng             | 51 +++++++++-----
>  src/libvirt_private.syms                      |  4 +-
>  src/libxl/libxl_conf.c                        |  8 +--
>  src/libxl/xen_xl.c                            | 16 ++---
>  src/qemu/qemu_capabilities.c                  |  2 +
>  src/qemu/qemu_capabilities.h                  |  1 +
>  src/qemu/qemu_command.c                       | 32 +++++++--
>  src/qemu/qemu_monitor_json.c                  | 27 +++++++
>  src/qemu/qemu_process.c                       |  1 +
>  src/qemu/qemu_validate.c                      |  9 +++
>  src/security/security_apparmor.c              |  2 +
>  src/security/security_dac.c                   |  2 +
>  .../caps_6.1.0.x86_64.xml                     |  1 +
>  .../caps_6.2.0.aarch64.xml                    |  1 +
>  .../caps_6.2.0.x86_64.xml                     |  1 +
>  .../caps_7.0.0.x86_64.xml                     |  1 +
>  ...l-qemu-vdagent-features.x86_64-latest.args | 41 +++++++++++
>  .../channel-qemu-vdagent-features.xml         | 37 ++++++++++
>  .../channel-qemu-vdagent.x86_64-latest.args   | 41 +++++++++++
>  .../qemuxml2argvdata/channel-qemu-vdagent.xml | 37 ++++++++++
>  tests/qemuxml2argvtest.c                      |  2 +
>  ...el-qemu-vdagent-features.x86_64-latest.xml | 58 +++++++++++++++
>  .../channel-qemu-vdagent.x86_64-latest.xml    | 58 +++++++++++++++
>  tests/qemuxml2xmltest.c                       |  2 +
>  tests/testutilsqemu.c                         |  1 +
>  29 files changed, 500 insertions(+), 54 deletions(-)
>  create mode 100644
> tests/qemuxml2argvdata/channel-qemu-vdagent-features.x86_64-latest.args
>  create mode 100644
> tests/qemuxml2argvdata/channel-qemu-vdagent-features.xml
>  create mode 100644
> tests/qemuxml2argvdata/channel-qemu-vdagent.x86_64-latest.args
>  create mode 100644 tests/qemuxml2argvdata/channel-qemu-vdagent.xml
>  create mode 100644
> tests/qemuxml2xmloutdata/channel-qemu-vdagent-features.x86_64-latest.xml
>  create mode 100644
> tests/qemuxml2xmloutdata/channel-qemu-vdagent.x86_64-latest.xml
>
> --
> 2.35.1
>
>
>

-- 
Marc-André Lureau
Re: [libvirt PATCH v2 0/4] Enable copy/paste for vnc displays
Posted by Jonathon Jongsma 1 year, 11 months ago
On 5/9/22 11:06 AM, Marc-André Lureau wrote:
> Hi Jonathon
> 
> On Thu, Mar 24, 2022 at 11:26 PM Jonathon Jongsma <jjongsma@redhat.com 
> <mailto:jjongsma@redhat.com>> wrote:
> 
>     This patch series enables support for the qemu-vdagent character
>     device which
>     enables copy/paste support between guest and client when using vnc
>     graphics.
> 
>     The guest must be configured with something like the following:
> 
>          <channel type='qemu-vdagent'>
>            <source>
>              <clipboard copypaste='yes'/>
>              <mouse mode='client'/>
>            </source>
>            <target type='virtio' name='com.redhat.spice.0'/>
>          </channel>
> 
>     Copy/paste sync requires a vnc client that has support for
>     copy/paste commands.
>     Currently virt-viewer does not work, but the version of tigervnc
>     provided by
>     fedora (executable name 'vncviewer') does work.
> 
>     More details about this device on Gerd's blog:
>     https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
>     <https://www.kraxel.org/blog/2021/05/qemu-cut-paste/>
> 
>     For now I have left the target to be configurable to match the spicevmc
>     channel, although Marc-Andre has suggested to simply hard-code it to
>     the virtio
>     name com.redhat.spice.0
> 
>     Changes in v2:
>       - change xml syntax to use <clipboard> and <mouse> sub-elements of
>     <source>
>         defined in the same way as they are for the spice display.
>       - fix a build failure when apparmor was enabled
>       - Add another test for when features are turned off
> 
> 
> Is there anything missing to merge this?
> thanks

Thanks for the ping on this. I suppose I was waiting to see if anybody 
else had any opinions on whether the virtio name should be configurable 
or not (which you had recommended against), and then it fell off my 
radar for a little bit. I will push it tomorrow if nobody speaks up 
before then.

Jonathon

Re: [libvirt PATCH v2 0/4] Enable copy/paste for vnc displays
Posted by Michal Prívozník 1 year, 11 months ago
On 5/9/22 20:53, Jonathon Jongsma wrote:
> On 5/9/22 11:06 AM, Marc-André Lureau wrote:
>> Hi Jonathon
>>
>> On Thu, Mar 24, 2022 at 11:26 PM Jonathon Jongsma <jjongsma@redhat.com
>> <mailto:jjongsma@redhat.com>> wrote:
>>
>>     This patch series enables support for the qemu-vdagent character
>>     device which
>>     enables copy/paste support between guest and client when using vnc
>>     graphics.
>>
>>     The guest must be configured with something like the following:
>>
>>          <channel type='qemu-vdagent'>
>>            <source>
>>              <clipboard copypaste='yes'/>
>>              <mouse mode='client'/>
>>            </source>
>>            <target type='virtio' name='com.redhat.spice.0'/>
>>          </channel>
>>
>>     Copy/paste sync requires a vnc client that has support for
>>     copy/paste commands.
>>     Currently virt-viewer does not work, but the version of tigervnc
>>     provided by
>>     fedora (executable name 'vncviewer') does work.
>>
>>     More details about this device on Gerd's blog:
>>     https://www.kraxel.org/blog/2021/05/qemu-cut-paste/
>>     <https://www.kraxel.org/blog/2021/05/qemu-cut-paste/>
>>
>>     For now I have left the target to be configurable to match the
>> spicevmc
>>     channel, although Marc-Andre has suggested to simply hard-code it to
>>     the virtio
>>     name com.redhat.spice.0
>>
>>     Changes in v2:
>>       - change xml syntax to use <clipboard> and <mouse> sub-elements of
>>     <source>
>>         defined in the same way as they are for the spice display.
>>       - fix a build failure when apparmor was enabled
>>       - Add another test for when features are turned off
>>
>>
>> Is there anything missing to merge this?
>> thanks
> 
> Thanks for the ping on this. I suppose I was waiting to see if anybody
> else had any opinions on whether the virtio name should be configurable
> or not (which you had recommended against), and then it fell off my
> radar for a little bit. I will push it tomorrow if nobody speaks up
> before then.

Yeah, sorry. I had this on my review radar but then got side tracked
terribly. Patches look good so go ahead and push.

Michal