VNC Client error with LXC VMs

Hello,

downloading Apps “Ubuntu Plucky LXD”, “Ubuntu Noble LXD”, “Debian Trixie 13 LXD” and “Debian Forky 14 LXD” from MarketPlace, after instantiation a new VM, VNC connection returns “VNC Client Error”. Howerver, with Apps “RockyLinux 9 LXD” and “Ubuntu Jammy LXD”, VNC runs like a charm. I have reconfigured templates in the same way…

Logs reported to frontend are a bit different depending if VNC works or not:

  • logs reported to /var/log/syslog in frontend when click over VNC button on the VM where VNC works fine:
guacd[1886122]: Creating new client for protocol "vnc"
opennebula-guacd[1886122]: guacd[1886122]: INFO:#011Creating new client for protocol "vnc"
opennebula-guacd[1886122]: guacd[1886122]: INFO:#011Connection ID is "$bb8550e7-fa5e-4b98-b28f-ed7bbbd87d73"
guacd[1886122]: Connection ID is "$bb8550e7-fa5e-4b98-b28f-ed7bbbd87d73"
guacd[1328273]: Cursor rendering: local
opennebula-guacd[1328273]: guacd[1328273]: INFO:#011Cursor rendering: local
opennebula-guacd[1328273]: guacd[1328273]: INFO:#011User "@551eff2f-b1cb-41de-b9cd-5a9a2494af6c" joined connection "$bb8550e7-fa5e-4b98-b28f-ed7bbbd87d73"
guacd[1328273]: User "@551eff2f-b1cb-41de-b9cd-5a9a2494af6c" joined connection "$bb8550e7-fa5e-4b98-b28f-ed7bbbd87d73" (1 users now present)
guacd[1328273]: VNC server supports protocol version 3.8 (viewer 3.8)
guacd[1328273]: We have 2 security types to read
guacd[1328273]: 0) Received security type 1
guacd[1328273]: Selecting security type 1 (0/2 in the list)
guacd[1328273]: 1) Received security type 1
guacd[1328273]: Selected Security Scheme 1
guacd[1328273]: No authentication needed
guacd[1328273]: VNC authentication succeeded
guacd[1328273]: Desktop name "VNC Command Terminal"
guacd[1328273]: Connected to VNC server, using protocol version 3.8
guacd[1328273]: VNC server default format:
guacd[1328273]:   8 bits per pixel.
guacd[1328273]:   Colour map (not true colour).
guacd[1328273]: client2server supported messages (bit flags)
guacd[1328273]: 00: 00ff 0081 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 08: 0000 0000 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 10: 0000 0000 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 18: 0000 0000 0000 0000 - 0000 0000 0000 0008
guacd[1328273]: server2client supported messages (bit flags)
guacd[1328273]: 00: 001f 0080 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 08: 0000 0000 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 10: 0000 0000 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: 18: 0000 0000 0000 0000 - 0000 0000 0000 0000
guacd[1328273]: Connected to Server "unknown (LibVNCServer 0.9.13)"
  • logs reported to /var/log/syslog in frontend when click over VNC button on the VM where VNC connection returns a “VNC Client Error”:
guacd[1886122]: Creating new client for protocol "vnc"
opennebula-guacd[1886122]: guacd[1886122]: INFO:#011Creating new client for protocol "vnc"
guacd[1886122]: Connection ID is "$eb080f13-9915-43f9-ab34-e74e259df1c6"
opennebula-guacd[1886122]: guacd[1886122]: INFO:#011Connection ID is "$eb080f13-9915-43f9-ab34-e74e259df1c6"
guacd[1327993]: Cursor rendering: local
opennebula-guacd[1327993]: guacd[1327993]: INFO:#011Cursor rendering: local
opennebula-guacd[1327993]: guacd[1327993]: INFO:#011User "@5265b4fc-b89f-468f-a46f-0f2a23589a89" joined connection "$eb080f13-9915-43f9-ab34-e74e259df1c6"
guacd[1327993]: User "@5265b4fc-b89f-468f-a46f-0f2a23589a89" joined connection "$eb080f13-9915-43f9-ab34-e74e259df1c6" (1 users now present)
guacd[1327993]: VNC server closed connection
guacd[1327993]: Unable to connect to VNC server.
opennebula-guacd[1327993]: guacd[1327993]: ERROR:#011Unable to connect to VNC server.
guacd[1327993]: User "@5265b4fc-b89f-468f-a46f-0f2a23589a89" disconnected (0 users remain)
opennebula-guacd[1327993]: guacd[1327993]: INFO:#011User "@5265b4fc-b89f-468f-a46f-0f2a23589a89" disconnected (0 users remain)
opennebula-guacd[1327993]: guacd[1327993]: INFO:#011Last user of connection "$eb080f13-9915-43f9-ab34-e74e259df1c6" disconnected
guacd[1327993]: Last user of connection "$eb080f13-9915-43f9-ab34-e74e259df1c6" disconnected
guacd[1886122]: Connection "$eb080f13-9915-43f9-ab34-e74e259df1c6" removed.
opennebula-guacd[1886122]: guacd[1886122]: INFO:#011Connection "$eb080f13-9915-43f9-ab34-e74e259df1c6" removed.

syslog in server reports a “VNC server supports protocol version 3.8 (viewer 3.8)” when VNC connection is established correctly.

Both VMs are created using images downloaded from MarketPlace/Apps.

Where is the problem?

My environment runs OpenNebula-6.8.0-1.

Thanks.

The VNC server for the LXC VMs exports the output of a command executed in the LXC host. By default, that command is lxc-console and it is supposed to output a login prompt. Sometimes the console output might fail depending on the distro and you might need a command like lxc-attachinstead, which outputs a shell inside the container, bypassing auth.

Try changing that command at /var/lib/one/remotes/etc/vmm/lxc/lxcrc and run onehost sync –force afterwards. Then try again with the VMs with VNC problems.

Hi @dclavijo,

After changing parameter and sync:

oneadmin@myserver:\~$ cat /var/lib/one/remotes/etc/vmm/lxc/lxcrc
##############################################################################
# VNC Options
##############################################################################
# 
# Options to customize the VNC access to the container:
# - :command: to be executed in the VNC terminal.
# - :width: of the terminal
# - :height: of the terminal
# - :timeout: seconds to close the terminal if no input has been received
:vnc:
:command: ‘sudo lxc-attach’
#:command: ‘sudo lxc-console’
:width: 800
:height: 600
:timeout: 300

################################################################################
# OpenNebula Configuration Options
################################################################################
# 
# Default path for the datastores. This only need to be change if the
# corresponding value in oned.conf has been modified.
:datastore_location: /var/lib/one/datastores
# 
# Path to the LXC default configuration file. This file will be included in
# the configuration of every LXC container (lxc.include)
:default_lxc_config: /usr/share/lxc/config/common.conf

################################################################################
# Container storage interface mount options
################################################################################
# 
# Options to customize the mounting process of the container disks
# :bindfs: arguments passed to bindfs -o 
# :dev\_: Mount options for disk devices (in the host). Options are set per
# fs type (e.g. dev_xfs, dev_ext3…)
# :disk: Mount options for data DISK (lxc.mount.entry).
# :rootfs: Mount options for root fs (lxc.rootfs.options)
# :mountpoint: Default Path to mount data disk in the container. This can be
# set per DISK using the TARGET attribute.
:mountopts:
:bindfs: ‘suid’
:dev_xfs: ‘nouuid’
:disk: ‘rbind,create=dir,optional’
:rootfs: ‘’
:mountpoint: ‘media/one-disk.$id’

the result is the same: VM LXC Rocky-8 starts fine (now, without login, directly to the shell), but Debian-13 retuns “VNC Client Error”.

Thanks.

Hi @dclavijo,

I have upgraded my test environment to OpenNebula-7.0.1, maintaining distro Ubuntu-22.04. However, error is the same when I try to connect using VNC-Guacamole to the LXC VM.

File “/var/log/one/fireeedge.log” shows:

[2025-11-12T11:34:12.070Z] - [info] worker: vm.info, [102,false]: {"VM":{"ID":"102","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME":"Test-ONE-7.0.1-KVM","PERMISSIONS"...
[2025-11-12T11:34:12.671Z] - [info] worker: grouppool.info, []: {"GROUP_POOL":{"GROUP":[{"ID":"121","NAME":"GD-GIA","TEMPLATE":{"SUNSTONE":{"GROUP_ADMIN_DEFAULT_VIEW":"groupadmin","GR...
[2025-11-12T11:34:12.881Z] - [info] worker: vm.monitoring, [102]: {"MONITORING_DATA":{"MONITORING":[{"CPU":"4.02","CPU_FORECAST":"4.02","DISKRDBYTES":"155788406","DISKRDIOPS":"5549","...
[2025-11-12T11:34:13.374Z] - [info] worker: vm.action, [resume,102]: 102
[2025-11-12T11:34:13.553Z] - [info] worker: userpool.info, []: {"USER_POOL":{"USER":[{"ID":"904","GID":"121","GROUPS":{"ID":"121"},"GNAME":"GD-GIA","NAME":"gd-gia-tutor","PASSWORD":"a...
[2025-11-12T11:34:13.881Z] - [info] worker: vm.info, [102,false]: {"VM":{"ID":"102","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME":"Test-ONE-7.0.1-KVM","PERMISSIONS"...
[2025-11-12T11:57:56.005Z] - [info] worker: user.info, [-1,false]: {"USER":{"ID":"0","GID":"0","GROUPS":{"ID":"0"},"GNAME":"oneadmin","NAME":"oneadmin","PASSWORD":"1e67037bc5e90f888a4...
[2025-11-12T11:57:56.615Z] - [info] worker: grouppool.info, []: {"GROUP_POOL":{"GROUP":[{"ID":"121","NAME":"GD-GIA","TEMPLATE":{"SUNSTONE":{"GROUP_ADMIN_DEFAULT_VIEW":"groupadmin","GR...
[2025-11-12T11:57:57.175Z] - [info] worker: system.version, []: "\"7.0.1\""
[2025-11-12T11:57:57.327Z] - [info] worker: zonepool.info, []: {"ZONE_POOL":{"ZONE":{"ID":"0","NAME":"OpenNebula","STATE":"0","TEMPLATE":{"ENDPOINT":"http://localhost:2633/RPC2"},"SER...
[2025-11-12T11:57:57.799Z] - [info] worker: templatepool.info, [-2,-1,-1]: {"VMTEMPLATE_POOL":{"VMTEMPLATE":[{"ID":"58","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME...
[2025-11-12T11:57:57.929Z] - [info] worker: vnpool.info, [-2,-1,-1,0]: {"VNET_POOL":{"VNET":[{"ID":"2","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME":"Deep","PERMISS...
[2025-11-12T11:57:58.011Z] - [info] worker: imagepool.info, [-2,-1,-1]: {"IMAGE_POOL":{"IMAGE":[{"ID":"50","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME":"rockylinux...
[2025-11-12T11:58:14.483Z] - [info] worker: user.info, [-1,false]: {"USER":{"ID":"0","GID":"0","GROUPS":{"ID":"0"},"GNAME":"oneadmin","NAME":"oneadmin","PASSWORD":"1e67037bc5e90f888a4...
[2025-11-12T11:58:14.945Z] - [info] worker: grouppool.info, []: {"GROUP_POOL":{"GROUP":[{"ID":"121","NAME":"GD-GIA","TEMPLATE":{"SUNSTONE":{"GROUP_ADMIN_DEFAULT_VIEW":"groupadmin","GR...
[2025-11-12T11:58:15.664Z] - [info] worker: system.version, []: "\"7.0.1\""
[2025-11-12T11:58:16.593Z] - [info] worker: vm.info, [105,false]: {"VM":{"ID":"105","UID":"0","GID":"0","UNAME":"oneadmin","GNAME":"oneadmin","NAME":"Test-ONE-7.0.1-LXC-Rocky8","PERMI...
[2025-11-12T11:58:17.258Z] - [info] Tunnel SSH created with PID: 44729 to connection: 12
[2025-11-12T11:58:17.655Z] - [info] Closing unused ssh connection: 44729
 Error: not opened
[2025-11-12T11:58:17.655Z] - [error] WS connection closed: Error: not opened

File “/var/log/one/fireeedge.error” shows:

[2025-11-12 nov 2025 12:58:17] [Connection 12]  Closing connection with error:  Error: not opened
    at WebSocket.send (/usr/lib/one/fireedge/node_modules/opennebula-guacamole/node_modules/ws/lib/WebSocket.js:218:38)
    at ClientConnection.send (/usr/lib/one/fireedge/node_modules/opennebula-guacamole/lib/ClientConnection.js:138:24)
    at GuacdClient.sendBufferToWebSocket (/usr/lib/one/fireedge/node_modules/opennebula-guacamole/lib/GuacdClient.js:172:35)
    at GuacdClient.processReceivedData (/usr/lib/one/fireedge/node_modules/opennebula-guacamole/lib/GuacdClient.js:163:14)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

And file “/var/log/syslog” shows:

Nov 12 12:58:10 myserver systemd[1]: message repeated 3 times: [ Condition check resulted in OpenNebula SSH persistent connection cleaner being skipped.]
Nov 12 12:58:17 myserver guacd[846]: Creating new client for protocol "vnc"
Nov 12 12:58:17 myserver opennebula-guacd[846]: guacd[846]: INFO:#011Creating new client for protocol "vnc"
Nov 12 12:58:17 myserver opennebula-guacd[846]: guacd[846]: INFO:#011Connection ID is "$b8c00d37-49da-431f-a452-b9e4fb4ff114"
Nov 12 12:58:17 myserver guacd[846]: Connection ID is "$b8c00d37-49da-431f-a452-b9e4fb4ff114"
Nov 12 12:58:17 myserver kernel: [ 3382.098483] IN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=49437 DF PROTO=TCP SPT=45050 DPT=4822 WINDOW=65495 RES=0x00 SYN URGP=0
Nov 12 12:58:17 myserver kernel: [ 3382.098497] IN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=49437 DF PROTO=TCP SPT=45050 DPT=4822 WINDOW=65495 RES=0x00 SYN URGP=0
Nov 12 12:58:17 myserver guacd[44742]: Cursor rendering: local
Nov 12 12:58:17 myserver opennebula-guacd[44742]: guacd[44742]: INFO:#011Cursor rendering: local
Nov 12 12:58:17 myserver opennebula-guacd[44742]: guacd[44742]: INFO:#011User "@74090efc-3bb9-4fa3-a723-d0344a1ce947" joined connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" (1 users now present)
Nov 12 12:58:17 myserver guacd[44742]: User "@74090efc-3bb9-4fa3-a723-d0344a1ce947" joined connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" (1 users now present)
Nov 12 12:58:17 myserver kernel: [ 3382.144848] IN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=19772 DF PROTO=TCP SPT=56324 DPT=5900 WINDOW=65495 RES=0x00 SYN URGP=0
Nov 12 12:58:17 myserver kernel: [ 3382.144859] IN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=19772 DF PROTO=TCP SPT=56324 DPT=5900 WINDOW=65495 RES=0x00 SYN URGP=0
Nov 12 12:58:17 myserver guacd[44742]: VNC server closed connection
Nov 12 12:58:17 myserver opennebula-guacd[44742]: guacd[44742]: ERROR:#011Unable to connect to VNC server.
Nov 12 12:58:17 myserver guacd[44742]: Unable to connect to VNC server.
Nov 12 12:58:17 myserver guacd[44742]: User "@74090efc-3bb9-4fa3-a723-d0344a1ce947" disconnected (0 users remain)
Nov 12 12:58:17 myserver opennebula-guacd[44742]: guacd[44742]: INFO:#011User "@74090efc-3bb9-4fa3-a723-d0344a1ce947" disconnected (0 users remain)
Nov 12 12:58:17 myserver opennebula-guacd[44742]: guacd[44742]: INFO:#011Last user of connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" disconnected
Nov 12 12:58:17 myserver guacd[44742]: Last user of connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" disconnected
Nov 12 12:58:17 myserver guacd[846]: Connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" removed.
Nov 12 12:58:17 myserver opennebula-guacd[846]: guacd[846]: INFO:#011Connection "$b8c00d37-49da-431f-a452-b9e4fb4ff114" removed.

With KVM VMs all works fine… I’m getting the same results I got with OpenNebula-6.8.0-1: VNC connection to KVM VMs OK but VNC connection to LXC VMs NO-OK…

Help, please.

Thanks!

1 Like