RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 868843 - qemu should check if requested keymap is available
Summary: qemu should check if requested keymap is available
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1011006
TreeView+ depends on / blocked
 
Reported: 2012-10-22 09:29 UTC by hongming
Modified: 2013-09-23 13:22 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1011006 (view as bug list)
Environment:
Last Closed: 2013-09-23 13:22:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description hongming 2012-10-22 09:29:43 UTC
Description of problem:
libvirt should check the setting keymap of spice device.If set it using any characters and numbers , the guest still can be started. 

Version-Release number of selected component (if applicable):
libvirt-0.10.2-4.el6.x86_64
qemu-kvm-0.12.1.2-2.329.el6.x86_64

How reproducible:
100%


Steps to Reproduce:
1.# virsh dumpxml rhel6.3-new
<domain>
......
  <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1' keymap='fdshjlf78970'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
......
</domain>


2.# virsh start rhel6.3-new
Domain rhel6.3-new started

3.# ps -ef|grep qemu-kvm
qemu     10532     1 55 17:26 ?        00:00:04 /usr/libexec/qemu-kvm -name 
.......
serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -k fdshjlf78970 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device 
......

  
Actual results:
If set keymap of spice using any characters and numbers , the guest still can be started. 


Expected results:
libvirt should check the setting keymap of spice device.

Additional info:

Comment 2 Jiri Denemark 2012-10-22 10:13:52 UTC
libvirt has no idea what keymaps are supported by QEMU. QEMU itself should fail if it is asked to use a keymap which it doesn't support. Since qemu-kvm -k sadfdsfsdf fails as expected, it's likely that the error is somewhere in spice code, in which case qemu-kvm may not be the right component...

Comment 3 Markus Armbruster 2012-10-29 06:43:13 UTC
Quick check shows qemu-kvm fails as expected:
$ qemu-system-x86_64 -nodefaults --enable-kvm -S -vnc :0 -monitor stdio -k fdshjlf78970
Could not read keymap file: 'fdshjlf78970'

Reporter, please provide the full qemu-kvm command line.  You should be able to find it in libvirt logs.

Comment 4 hongming 2012-10-29 06:55:20 UTC
It should be "-spice ". In your command , it is "-vnc".


# ps -ef|grep rhel6.3
qemu     24730     1 46 14:46 ?        00:00:14 /usr/libexec/qemu-kvm -name rhel6.3 -S -M rhel5.4.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid 9669ae9b-4996-b7e7-5648-53a6df93d5aa -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6.3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/kvm-rhel6.3-x86_64.img,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=27,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:c5:20:41,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -k fdshjlf78970 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

Comment 5 Jiri Denemark 2012-10-29 07:03:57 UTC
Markus, the important part seems to be -spice option. If you try without it, qemu reports an error. However, with -spice, no error is reported and qemu starts just fine.

Comment 6 Markus Armbruster 2013-02-11 12:57:45 UTC
As far as I can tell, we completely ignore -k with -spice.  Spice has no use for it, because it works with AT key codes.

We could reject use of -k together with -spice instead of ignoring it silently.

Comment 9 Ademar Reis 2013-09-23 13:22:21 UTC
WONTFIX for RHEL6. RHEL7 clone: 1011006


Note You need to log in before you can comment on or make changes to this bug.