1. 宿主机和虚拟机之间复制粘贴
宿主机和虚拟机之间在图形界面下相互复制粘贴需要使用 spice vdagent 软件,spice vdagent 软件支持如下功能:
1.支持客户端鼠标模式
2.支持自动调整虚拟机分辨率
3.支持虚拟机和宿主机间相互复制粘贴内容,包括纯文本,富文本
4.支持从宿主机到虚拟机传输文件,不支持从虚拟机直接传输文件到宿主机,如果需要请使用文件共享
环境安装
qemu 命令行中有类似于如下参数:
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5 \ -chardev spicevmc,name=vdagent,id=vdagent \ -device virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0
虚拟机内部安装有 spice vdagent loongnix server:
# yum install spice-vdagent
loongnix desktop:
# apt install spice-vdagent
更多详细信息参考 spice vdagent 官网:https://gitlab.freedesktop.org/spice/linux/vd_agent