Skip to content

Qemu is stuck on the startup intermittently.

Host environment

  • Operating system: ( CENTOS 7)
  • OS/kernel version: (Linux 3.10.0-1160.25.1.F5.1.el7_8.x86_64 #1 SMP Thu Jul 8 01:59:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
  • Architecture: (x86)
  • QEMU flavor: (qemu-system-x86_64)
  • QEMU version: (QEMU emulator version 5.1.0 (qemu-5.1.0-9.fc32) )
  • QEMU cmd options: -machine pc-q35-3.1,accel=kvm,usb=off,dump-guest-core=off -cpu Cooperlake,ss=on,hypervisor=on,tsc-adjust=on,avx512ifma=on,sha-ni=on,avx512vbmi=on,umip=on,avx512vbmi2=on,gfni=on,vaes=on,vpclmulqdq=on,avx512bitalg=on,avx512-vpopcntdq=on,md-clear=on,ibpb=on,amd-stibp=on,amd-ssbd=on,avx512-bf16=off,taa-no=off -boot strict=on

Emulated/Virtualized environment

  • Operating system: (Fedora 32 )
  • OS/kernel version: (Linux virttest1 3.10.0-1160.25.1.F5.1.el7_8.x86_64 #1 SMP Thu Jul 8 01:59:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
  • Architecture: (x86)

Description of problem

Qemu is stuck on the startup intermittently.

We are using kubevirt to launch the VM in kubernetes env. We have compiled qemu with a few flags enabled and using it. All things are working as expected except we are seeing qemu stuck issue during VM startup. Please find logs from system in additional information

Qemu version: qemu-system-x86-core-5.1.0-9.fc32.x86_64.rpm Libvirtd version: 6.6.0

Steps to reproduce

  1. Create and start a VM.

Additional information

TOP OUTPUT:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                  
  **125 qemu       0 -20 8519896  73392  15412 R  99.9   0.1  85:27.96 CPU 0/KVM **                                                                                                                                               
  113 qemu      20   0 8519896  73392  15412 S   0.0   0.1   0:00.14 qemu-system-ori                                                                                                                                          
  121 qemu      20   0 8519896  73392  15412 S   0.0   0.1   0:00.00 qemu-system-ori                                                                                                                                          
  122 qemu      20   0 8519896  73392  15412 S   0.0   0.1   0:00.00 IO iothread1                                                                                                                                             
  124 qemu      20   0 8519896  73392  15412 S   0.0   0.1   0:00.23 IO mon_iothread                                                                                                                                          
  126 qemu       0 -20 8519896  73392  15412 S   0.0   0.1   0:00.00 CPU 1/KVM                                                                                                                                                
  128 qemu      20   0 8519896  73392  15412 S   0.0   0.1   0:00.00 vnc_worker 

qemu logs on error:

KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)

dmesg logs from host:-

[ 7853.643187] kvm: apic: phys broadcast and lowest prio
[ 7853.643265] kvm: apic: phys broadcast and lowest prio
[ 7853.643341] kvm: apic: phys broadcast and lowest prio
[ 7853.643413] kvm: apic: phys broadcast and lowest prio
[ 7853.643486] kvm: apic: phys broadcast and lowest prio
[ 7853.643559] kvm: apic: phys broadcast and lowest prio
[ 7853.643631] kvm: apic: phys broadcast and lowest prio
[ 7853.643703] kvm: apic: phys broadcast and lowest prio
[ 7853.643776] kvm: apic: phys broadcast and lowest prio
[ 7853.643848] kvm: apic: phys broadcast and lowest prio
[ 7853.643920] kvm: apic: phys broadcast and lowest prio
[ 7853.643992] kvm: apic: phys broadcast and lowest prio
[ 7853.644065] kvm: apic: phys broadcast and lowest prio
[ 7853.644137] kvm: apic: phys broadcast and lowest prio
[ 7853.644209] kvm: apic: phys broadcast and lowest prio
[ 7853.644289] kvm: apic: phys broadcast and lowest prio

-->

Edited by Alex Bennée
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information