Connect to the AppVM with VNC using Xen capabilities

370 views
Skip to first unread message

msg...@gmail.com

unread,
Oct 15, 2017, 1:46:40 AM10/15/17
to qubes-users
Hello.

I want to connect to one of my AppVMs with VNC from remote host using Xen capabilities.
I wanted to do it with the custom Xen config, but I can't figure out how to change the default Xen config or use custom Xen config to start my AppVM. I think it was possible in Qubes OS 3.2 with "qvm-start –custom-config=CUSTOM_CONFIG", but I've installed Qubes OS 4.0 (current-testing) and there is no such option now.
I've found the location of the Xen configs used for VMs in /etc/libvirt/libxl/vmname.xml and tried to change the graphics type parameter from 'qubes' to 'vnc' in my AppVM config with virsh and then start the AppVM, but the Xen config keep reverting back to its original state after I start AppVM. Is it hardcoded for Qubes OS to overwrite this file every time when I start VM?
How can I enable vnc in Xen config for Qubes OS VM?
Rdp/x11vnc and other services that can be installed in the quest OS are not an options, because I need to access the VM even if the network is broken in the VM.

msg...@gmail.com

unread,
Oct 16, 2017, 8:52:14 AM10/16/17
to qubes-users
воскресенье, 15 октября 2017 г., 1:46:40 UTC-4 пользователь msg...@gmail.com написал:
I've found the way to do it in this document:
https://github.com/QubesOS/qubes-core-admin/blob/master/doc/libvirt.rst
It works fine.

Also, there was an error in this libvirt.rst document, it states that it looks for the files:`/etc/qubes/templates/libvirt/by-name/<name>.xml` but it actually looks for files:`/etc/qubes/templates/libvirt/xen/by-name/<name>.xml` in the source code:
https://github.com/QubesOS/qubes-core-admin/blob/master/qubes/vm/__init__.py

msg...@gmail.com

unread,
Oct 17, 2017, 3:17:24 PM10/17/17
to qubes-users
I can change the Xen config, but I can't figure out how to make VNC work properly.
With the default HVM, the Qubes OS will configure Xen to use device model stub domain for the devices (<emulator type='stubdom-linux'/>), including the <graphics type='vnc'/>. So the VNC server will be started for the stub domain.
When I try to connect to the VNC server from dom0 I can see this message:
"Guest has not initialized the display (yet)"
https://i.stack.imgur.com/D5HsM.png
VNC client connects to the vmname-dm VM.
When I searched for this problem, I've found this config, suggesting that VNC should work with stub domain emulator (but it's not certain):
https://www.mail-archive.com/libvir...@redhat.com/msg00118.html
There is also example Xen config for stub domain with VNC that seems to work:
https://wiki.xenproject.org/wiki/StubDom
But there are two separate configs: for HVM and HVM-dm, but in my case there is singe libvirt config and I don't know how to use these example configs for my case.
Can someone suggest how to fix this issue? Is it just wrong libvirt config or does Qubes OS somehow interfere with video/graphics/something else that is breaking VNC.
Reply all
Reply to author
Forward
0 new messages