Description of problem:
guest can't accept all keys which send by send-key command while login guest with level 5
Pkg info
libvirt-1.2.17-3.el7.x86_64
qemu-kvm-rhev-2.3.0-15.el7.x86_64
kernel-3.10.0-302.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Prepare a running guest with graphical desktop installing
host# virsh list
Id Name State
----------------------------------------------------
24 virt-tests-vm1 running
2.Login guest with level 5, then try to use the send-key to crete a file in the guest,
if the following command run successfully, it should touch a file named abc in the guest,
however didn't get the file named abc in guest but get a file name ab insie the guest
host#virsh send-key virt-tests-vm1 --codeset linux 20 24 22 46 35 57 30 48 46 28
# echo $?
0
login the guest
guest# ll abc
ls: cannot access abc: No such file or directory
guest# ll ab
guest# ll ab
-rw-r--r--. 1 root root 0 Aug 7 17:56 ab
3.login guest with level 3, then re-send the key, could get a file named abc inside guest expectly
guest#init 3
host#virsh send-key virt-tests-vm1 --codeset linux 20 24 22 46 35 57 30 48 46 28
guest# ll abc
-rw-r--r--. 1 root root 0 Aug 7 18:04 abc
Actual results:
guest can't accept all keys which send by send-key command while login guest with level 5
Expected results:
Guest should accespt all keys while login guest with both level 3 and level 5
Since the behavior changes depending on guest state the bug is probably either in the sending of the event from the emulated hardware or in the guest kernel that is interpreting it. Moving to qemu for further triage.
(In reply to zhenfeng wang from comment #0)
> Description of problem:
> guest can't accept all keys which send by send-key command while login guest
send-key is for single keys. Don't try to send key sequences with it.
Specifying multiple keys in one send-key command is for key combinations like 'ctrl-alt-del' or 'shift-a', not for sending strings.