Synnefo console with national characters

27 views
Skip to first unread message

Istvan Bernath

unread,
Oct 22, 2014, 5:06:36 AM10/22/14
to syn...@googlegroups.com
Hi,

Is there anybody that can tell me what to do if I want
Synnefo's console feature support a national keyboard,
also with special characters?

Best Regards
Istvan

Vangelis Koukis

unread,
Oct 27, 2014, 7:47:47 AM10/27/14
to Istvan Bernath, syn...@googlegroups.com
Hello Istvan,

Please bear in mind that the console is only meant for troubleshooting
and not for everyday work.

Making the console work with a Danish keyboard needs setting up both
QEMU and the OS inside the VM itself properly. It may be easier to just
leave the default "en-us" console keymap enabled inside the VM, and
install an English keyboard setting on the users' PCs, or even use the
on-screen keyboard that the latest Synnefo 0.16 console provides.

That being said, I have set up a Danish keyboard on Windows and have
verified that the following works:

* Assume the VM is snf-1234.
* QEMU needs to know that the keymap to emulate is Danish.
# gnt-instance modify -H keymap=da snf-1234
* Reboot the machine from the Synnefo UI, so that QEMU restarts.
You should see that the QEMU process references the Danish keymap:
# pgrep -f snf-1234
24748
# ps www 24748
# cat /var/run/ganeti/kvm-hypervisor/keymap/snf-1234
include en-us
include da
* Ensure that the OS inside the machine has been setup to use a Danish
keymap for the console. E.g., for Debian:
# dpkg-reconfigure console-data
# dpkg-reconfigure keyboard-configuration
# service keyboard-setup restart
Please see https://wiki.debian.org/Keyboard for all the details.

Note that making these modifications will lead to the console
only working for people with Danish keyboards. :)

To make the change of QEMU keymap permanent and have it apply for all
new VMs, you can use the GANETI_CREATEINSTANCE_KWARGS setting in
Synnefo.

For existing VMs, you have to run gnt-instance modify for each one of
them and ensure they are rebooted (QEMU process restarted), for the
modified console keymap to take effect.

Hope the above helps!

Please let us know how it goes,
Vangelis.

--
Vangelis Koukis
vko...@grnet.gr
OpenPGP public key ID:
pub 1024D/1D038E97 2003-07-13 Vangelis Koukis <vko...@cslab.ece.ntua.gr>
Key fingerprint = C5CD E02E 2C78 7C10 8A00 53D8 FBFC 3799 1D03 8E97

Only those who will risk going too far
can possibly find out how far one can go.
-- T.S. Eliot
signature.asc

Istvan Bernath

unread,
Nov 17, 2014, 9:08:00 PM11/17/14
to Vangelis Koukis, syn...@googlegroups.com
Dear Vangelis,

Thanks for your kind reply!
I've now enabled the Danish console keyboard on the VMs
where it was requested.
The only problem is the two middle keys in the top row of the
numeric keypad, on the Danish keyboard "/" and "*".
They are resulting in "7" and "'", but with shift key pressed
they are returning the correct character. Behaves like the
"/,7" and the "*,'" keys from the alphanumeric keyboard.
That is something one can live with :-)
As well the Danish characters are replaced with black rhombuses
on the linux consoles in text mode, but the special characters
are OK, and that is the most important.

Would you be so kind to give me the right way to configure the
GANETI_CREATEINSTANCE_KWARGS? I could not find the
right documentation and with faulty entries Cyclades goes
out of function.

Thanks again!

Best Regards
Istvan

________________________________________
Fra: Vangelis Koukis [vko...@grnet.gr]
Sendt: 27. oktober 2014 12:47
Til: Istvan Bernath
Cc: syn...@googlegroups.com
Emne: Re: [synnefo] Synnefo console with national characters

Vangelis Koukis

unread,
Dec 2, 2014, 4:56:03 AM12/2/14
to Istvan Bernath, syn...@googlegroups.com
On Tue, Nov 18, 2014 at 02:07:22am +0000, Istvan Bernath wrote:
> I've now enabled the Danish console keyboard on the VMs
> where it was requested.
> The only problem is the two middle keys in the top row of the
> numeric keypad, on the Danish keyboard "/" and "*".
> They are resulting in "7" and "'", but with shift key pressed
> they are returning the correct character. Behaves like the
> "/,7" and the "*,'" keys from the alphanumeric keyboard.
> That is something one can live with :-)
> As well the Danish characters are replaced with black rhombuses
> on the linux consoles in text mode, but the special characters
> are OK, and that is the most important.
>
> Would you be so kind to give me the right way to configure the
> GANETI_CREATEINSTANCE_KWARGS? I could not find the
> right documentation and with faulty entries Cyclades goes
> out of function.
>
> Thanks again!
>

Hello Istvan!

There is short documentation for the parameter at the Synnefo settings
file which defines it, 20-snf-cyclades-app-backend.conf.
I am copying/pasting from there:

## The following dictionary defines deployment-specific
## arguments to the RAPI CreateInstance call.
## At a minimum it should contain the
## 'os' and 'hvparams' keys.
##
## More specifically:
## a) os:
## The OS provider to use (customized Ganeti Instance Image)
## b) hvparams:
## Hypervisor-specific parameters (serial_console = False, see #785),
## for each hypervisor(currently 'kvm'. 'xen-pvm' and 'xen-hvm').
## c) If using the DRBD disk_template, you may want to include
## wait_for_sync = False (see #835).
##
#GANETI_CREATEINSTANCE_KWARGS = {
# 'os': 'snf-image+default',
# 'hvparams': {'kvm': {'serial_console': False},
# 'xen-pvm': {},
# 'xen-hvm': {}},
#}
#

So we need to set a KVM-specific parameter, keymap=da.

I believe all you need to do is add the appropriate key at the dictionary which
also defines the KVM-specific parameter serial_console=False. So, the
definition of GANETI_CREATEINSTANCE_KWARGS becomes:

GANETI_CREATEINSTANCE_KWARGS = {
'os': 'snf-image+default',
'hvparams': {'kvm': {'serial_console': False,
'keymap': 'da'},
'xen-pvm': {},
'xen-hvm': {}},
}

I have not yet had a chance to test this setting thoroughly, so I cannot
guarantee it will work, but please try it out and let me know how it goes.

Best regards,
Vangelis.
> --
> You received this message because you are subscribed to the Google Groups "Synnefo" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to synnefo+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
signature.asc

Istvan Bernath

unread,
Dec 2, 2014, 9:14:21 PM12/2/14
to Vangelis Koukis, syn...@googlegroups.com
Hi Vangelis,

Thanks for your kind reply!

The suggested KWARGS syntax was correct. The new VM's console now
defaults to en_us keyboard, with special characters, like the "|" accessible.
That's a great improvement. There are still some minor problems with keyboard
mapping, and the Danish national characters are represented with a black rhombus
but that's OK for the time being.
As I can see, the new VM's create an entry like:
/var/run/ganeti/kvm-hypervisor/keymap/snf-502
with content:
root@synnefo:~# cat /var/run/ganeti/kvm-hypervisor/keymap/snf-502
include en-us
include da
while the old VMs does not have any entry under
/var/run/ganeti/kvm-hypervisor/keymap
but maybe that’s intended that way.

Thanks again for your kind help!

Best Regards
Istvan

________________________________________
Fra: Vangelis Koukis [vko...@grnet.gr]

Sendt: 2. december 2014 10:56


Til: Istvan Bernath
Cc: syn...@googlegroups.com

Emne: Re: SV: [synnefo] Synnefo console with national characters

Reply all
Reply to author
Forward
0 new messages