繁体   English   中英

QEMU 中 Spice 的默认端口

[英]Default Port for Spice in QEMU

我在启用 KVM 的 Raspberry Pi 4(运行Ubuntu Desktop 21.04 )上虚拟化 Ubuntu 和其他aarch64操作系统。 我已经使用 QEMU arguments --virtio-gpu,virgl=on --display sdl,gl=on在我的aarch64 Ubuntu 20.04来宾中成功启用了 OpenGL 加速。 但是,我不想使用 SDL 来呈现 window,而是想使用 Spice。 以下将执行此操作:

qemu-system-aarch64 --M virt --enable-kvm --cpu host --m 2G \
--bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
--device usb-ehci --device usb-kbd \
--spice disable-ticketing,gl=on,addr=127.0.0.1,port=3001 \
--device virtio-gpu,virgl=on

(这里有一个你可以用x64系统重现的例子)

qemu-system-x86_64 --M pc-q35 --enable-kvm --cpu host --m 2G \
--device usb-ehci --device usb-kbd \
--spice disable-ticketing,gl=on,addr=127.0.0.1,port=3001 \
--device virtio-gpu,virgl=on

但返回SPICE GL support is local-only for now and incompatible with -spice port/tls-port

当我在--spice参数中省略port=3001时,它不会抛出错误,但我不知道如何连接到这个新 VM。 使用--display spice-app不起作用,因为 Ubuntu 的virt-viewer版本是7.0 ,而不是必要的8.0 因此,我尝试使用remote-viewer (与virt-manager捆绑在一起),但无法连接到127.0.0.1localhost ,即使我尝试使用3000, 3001, 5900, 5901等端口也是如此。

那么,我需要通过remote-viewer (本地)连接到我的 VM 的哪个端口? 我的 VM 在我的 Raspberry Pi 4 上运行,我想通过同一个 Pi 4 连接到它。

选项“gl=on”和“port=...”不兼容,这是在本次提交中引入的
注释解释了 virtlg 使用 unix 套接字,因此与远程访问不兼容。

但是你可以在本地连接,启动 qemu:

 --spice disable-ticketing,gl=on,unix,addr=/tmp/spice.sock 

然后使用以下方式在本地连接:

remote-viewer spice+unix:///tmp/spice.sock

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM