Bug 371511

Summary: Keyboard-keys is wrong in kvm-installation
Product: [Fedora] Fedora Reporter: Espen Stefansen <libbe>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: andris.pavenis, berrange, crobinso, hbrock
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-21 08:27:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Espen Stefansen 2007-11-08 17:17:38 UTC
Description of problem:
I installed a virtual F8 in on my F8-installation. And then changed the 
keyboard and text to Norwegian BokmÄl. Now most of the keys are wrong. Only a-
z, A-z and 0-9 is working as it should. Every other key is wrong. I can't even 
be root, since i can't find '-'. I also tried Swedish keyboard-settings, and 
that one seems wrong as well.

Version-Release number of selected component (if applicable):
Both installations are a fresh F8.
kvm-36-7.fc8


How reproducible:
Every time

Steps to Reproduce:
1. Install f8 in libvirt
2. Boot and change keyboard
3. 
  
Actual results:
Only the following keys a-z, A-z and 0-9 works as it should

Expected results:
All keys should work

Additional info:

Comment 1 Jeremy Katz 2007-11-09 14:44:50 UTC
What is the keyboard layout set to in the host and the guest?  Also, can you see
what the qemu-kvm command line is? 

Comment 2 Espen Stefansen 2007-11-09 15:05:51 UTC
The keyboard layout is set to 'no' on both the host and the guest.
[root@itse68482 misc]# cat /etc/sysconfig/keyboard 
KEYBOARDTYPE="pc"
KEYTABLE="no"

/usr/bin/qemu-kvm -M pc -m 500 -smp 1 -monitor pty -boot c -hda /mnt/misc/
virtual/rawhide.img -net nic,macaddr=00:16:3e:10:33:ee,vlan=0 -net 
tap,fd=11,script=,vlan=0 -usb -vnc 127.0.0.1:0


Comment 3 Daniel Berrangé 2007-11-09 15:25:23 UTC
You need to pass  '-k no'  to KVM to tell it to use 'no' keylayout too.

Comment 4 Espen Stefansen 2007-11-09 15:30:10 UTC
But isn't this something that should be taken care of automatically? In virt-
manager?

Comment 5 Andris Pavenis 2007-11-21 16:11:44 UTC
Or at least to be able to specify keyboard layout in settings of virt-manager.


Comment 6 Cole Robinson 2008-03-17 14:45:25 UTC
Hi, do you still see this issue with current rawhide or f8 packages? If so,
after the install can you do a 'virsh --connect qemu:///system dumpxml
<domname>' from the command line and post that here. Also,
~/.virt-manager/virt-manager.log as well. Thanks.

Comment 7 Andris Pavenis 2008-03-17 19:35:25 UTC
I'm getting it on x86_64 with qemu-0.9.0-7.fc8, virt-manager-0.5.3-1.fc8,
keyboard layout: fi.

[root@ap ~]# virsh --connect qemu:/system dumpxml Slackware-11
<domain type='kvm' id='1'>
  <name>Slackware-11</name>
  <uuid>eaae37fe-077b-fa9c-8718-f14dfcdd2632</uuid>
  <memory>512000</memory>
  <currentMemory>512000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/opt/kvm/slackware-11'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:7d:de:81'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' listen='127.0.0.1'/>
  </devices>
</domain>


Comment 8 Cole Robinson 2008-03-17 20:02:08 UTC
yes this is a bug on the virt-manager side. virt-manager should be able to set
up most keymaps to automatically work, but in the 'fi' case we didn't have a
mapping set up correctly. Current upstream has the option of setting the keymap
manually for the guest, but only after the initial install phase. 

As a quick fix, edit /usr/share/virt-manager/virtManager/keytable.py and replace
the line "":"fi" with "fi":"fi" and guests should set up a keymap correctly when
created. Also, current upstream has the ability to manually set the keymap for a
guest after the initial install phase.

Comment 9 Cole Robinson 2008-03-17 21:56:49 UTC
This should now be fixed upstream, also with some better logging. 

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=98cd7845a3b5

If that fix I suggested doesn't work, can you report that here?

Comment 10 Andris Pavenis 2008-03-18 21:04:42 UTC
Does not seem to work in Fedora 8 (x86_64). I didn't patch virt-manager yet.
only patched keytable.py ("se_FI":"fi" to "fi":"fi").




Comment 11 Cole Robinson 2008-03-18 21:20:31 UTC
Just to clarify, this won't fix an existing guest. It will only fix the mapping
for newly created guests. Did you try and create a new guest?

Comment 12 Bug Zapper 2008-05-14 03:51:59 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Fedora Update System 2008-12-01 18:10:53 UTC
virt-manager-0.6.0-0.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-0.fc9

Comment 14 Fedora Update System 2008-12-01 18:22:43 UTC
virt-manager-0.6.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-1.fc9

Comment 15 Fedora Update System 2008-12-03 01:29:30 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10705

Comment 16 Fedora Update System 2008-12-21 08:26:30 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.