<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Vnc on Major Hayden</title><link>https://major.io/tags/vnc/</link><description>Recent content in Vnc on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Thu, 09 Jul 2026 20:41:49 +0000</lastBuildDate><atom:link href="https://major.io/tags/vnc/index.xml" rel="self" type="application/rss+xml"/><item><title>Fixing OpenStack noVNC consoles that ignore keyboard input</title><link>https://major.io/p/fixing-openstack-novnc-consoles-that-ignore-keyboard-input/</link><pubDate>Thu, 18 May 2017 16:58:56 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/fixing-openstack-novnc-consoles-that-ignore-keyboard-input/</guid><description>&lt;p&gt;I opened up a noVNC console to a virtual machine today in my OpenStack cloud but found that the console wouldn&amp;rsquo;t take keyboard input. The &lt;strong&gt;Send Ctrl-Alt-Del&lt;/strong&gt; button in the top right of the window worked just fine, but I couldn&amp;rsquo;t type anywhere in the console. This happened on an Ocata OpenStack cloud deployed with &lt;a href="https://github.com/openstack/openstack-ansible"&gt;OpenStack-Ansible&lt;/a&gt; on CentOS 7.&lt;/p&gt;
&lt;h2 id="test-the-network-path"&gt;Test the network path&lt;/h2&gt;
&lt;p&gt;The network path to the console is a little deep for this deployment, but here&amp;rsquo;s a quick explanation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My laptop connects to HAProxy&lt;/li&gt;
&lt;li&gt;HAProxy sends the traffic to the nova-novncproxy service&lt;/li&gt;
&lt;li&gt;nova-novncproxy connects to the correct VNC port on the right hypervisor&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If all of that works, I get a working console! I knew the network path was set up correctly because I could see the console in my browser.&lt;/p&gt;
&lt;p&gt;My next troubleshooting step was to dump network traffic with &lt;code&gt;tcpdump&lt;/code&gt; on the hypervisor itself. I dumped the traffic on port 5900 (which was the VNC port for this particular instance) and watched the output. Whenever I wiggled the mouse over the noVNC console in my browser, I saw a flurry of network traffic. The same thing happened if I punched lots of keys on the keyboard. At this point, it was clear that the keyboard input was making it to the hypervisor, but it wasn&amp;rsquo;t being handled correctly.&lt;/p&gt;
&lt;h2 id="test-the-console"&gt;Test the console&lt;/h2&gt;
&lt;p&gt;Next, I opened up &lt;code&gt;virt-manager&lt;/code&gt;, connected to the hypervisor, and opened a connection to the instance. The keyboard input worked fine there. I opened up &lt;code&gt;remmina&lt;/code&gt; and connected via plain old VNC. The keyboard input worked fine there, too!&lt;/p&gt;
&lt;h2 id="investigate-in-the-virtual-machine"&gt;Investigate in the virtual machine&lt;/h2&gt;
&lt;p&gt;The system journal in the virtual machine had some interesting output:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;kernel: atkbd serio0: Unknown key released (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
kernel: atkbd serio0: Unknown key released (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
kernel: atkbd serio0: Unknown key pressed (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
kernel: atkbd serio0: Unknown key pressed (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
kernel: atkbd serio0: Unknown key released (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
kernel: atkbd serio0: Unknown key released (translated set 2, code 0x0 on isa0060/serio0).
kernel: atkbd serio0: Use &amp;#39;setkeycodes 00 &amp;lt;keycode&amp;gt;&amp;#39; to make it known.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It seems like my keyboard input was being lost in translation - literally. I have a US layout keyboard (Thinkpad X1 Carbon) and the virtual machine was configured with the &lt;code&gt;en-us&lt;/code&gt; keymap:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# virsh dumpxml 4 | grep vnc
 &amp;lt;graphics type=&amp;#39;vnc&amp;#39; port=&amp;#39;5900&amp;#39; autoport=&amp;#39;yes&amp;#39; listen=&amp;#39;192.168.250.41&amp;#39; keymap=&amp;#39;en-us&amp;#39;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A thorough Googling session revealed that it is &lt;a href="https://github.com/novnc/noVNC/issues/666#issuecomment-248303186"&gt;not recommended to set a keymap for virtual machines&lt;/a&gt; in libvirt in most situations. I set the &lt;code&gt;nova_console_keymap&lt;/code&gt; variable in &lt;code&gt;/etc/openstack_deploy/user_variables.yml&lt;/code&gt; to an empty string:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;nova_console_keymap: &amp;#39;&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I redeployed the nova service using the OpenStack-Ansible playbooks:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;openstack-ansible os-nova-install.yml
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once that was done, I powered off the virtual machine and powered it back on. (This is needed to ensure that the libvirt changes go into effect for the virtual machine.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Great success!&lt;/strong&gt; The keyboard was working in the noVNC console once again!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Photo credit: &lt;a href="https://commons.wikimedia.org/wiki/File:Televideo925Terminal.jpg"&gt;Wikipedia&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Enabling VNC as a pseudo-KVM with VMWare Server</title><link>https://major.io/p/enabling-vnc-as-a-pseudo-kvm-with-vmware-server/</link><pubDate>Wed, 25 Mar 2009 01:28:59 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/enabling-vnc-as-a-pseudo-kvm-with-vmware-server/</guid><description>&lt;p&gt;Mac users &lt;a href="http://communities.vmware.com/thread/155201"&gt;feel a little left&lt;/a&gt; out when it comes to &lt;a href="http://www.vmware.com/products/server/"&gt;VMWare Server&lt;/a&gt; clients. There&amp;rsquo;s one for Windows and Linux, but Mac users are out of luck. Sure, you can VNC into a Linux box, use X forwarding, or use RDC to access a Windows box, but a real Mac client would really be helpful.&lt;/p&gt;
&lt;p&gt;However, I stumbled upon some documentation that will allow you to VNC to a VMWare Server VM&amp;rsquo;s main screen. It&amp;rsquo;s equivalent to having a network KVM connected to the VM so you can have out-of-band management. With VMWare server 2.x, you can enable it by following these steps:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Create a new VM in VMWare Server, but &lt;em&gt;don&amp;rsquo;t start the VM&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; SSH to the server and find your VM&amp;rsquo;s .vmx file. Normally, you can find the file in a location like &lt;code&gt;/var/lib/vmware/[vmname]/[vmname].vmx&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Add the following lines to the end of the .vmx file:&lt;/p&gt;
&lt;pre lang="html"&gt;RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.password = "vncpassword"
RemoteDisplay.vnc.port = "5900"&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 4.&lt;/strong&gt; Change the VNC port and password to values that suit your environment and then start the VM.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DUH!&lt;/strong&gt; Don&amp;rsquo;t set two VM&amp;rsquo;s to use the same vnc port, but that should go without saying.&lt;/p&gt;</description></item></channel></rss>