Windows vm cannot boot after updating kernel to 5.11

tloe

New Member
Apr 15, 2021
7
1
1
43
Bash:
➜  ~ qm start 100  
kvm: error: failed to set MSR 0x48f to 0xffffff00036dfb
kvm: ../target/i386/kvm.c:2701: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
start failed: QEMU exited with code 1
Bash:
➜  ~ qm config 100  
agent: 1
args: -cpu host,+vmx,-hypervisor,-mpx,kvm=off
boot: order=scsi0;ide2;net0
cores: 4
cpu: host
ide0: local:iso/virtio-win-0.1.185.iso,media=cdrom,size=402812K
ide2: local:iso/Win10_20H2_v2_EnglishInternational_x64.iso,media=cdrom
kvm: 1
machine: pc-i440fx-5.2
memory: 4096
name: WindowBuild
net0: virtio=42:F8:C4:D1:92:A3,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: local-lvm:vm-100-disk-0,cache=writeback,discard=on,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=a330d1ae-6b3c-4509-a36b-d9438d6c5e6d
sockets: 1
vga: qxl
vmgenid: 0f79142f-5f42-4993-96b9-c82209b68007
➜  ~

Read some older post about setting ignore_msrs, buit that did not do much..

Bash:
echo Y > /sys/module/kvm/parameters/ignore_msrs

I have also done apt update and apt dist-upgrade and rebooted..
 
Last edited:
Kernel 5.11 changed the default related to nested virtualization, which you are explicitly trying to use with your "args: +vmx" statement. Is there a specific reason you are using it this way? CPU type 'host' should enable nested virt by default.

For more troubleshooting, can you post the output of grep -R "" /sys/module/kvm{_amd,_intel,}/parameters as well as lscpu on the host?
 
  • Like
Reactions: Moayad
Hum.. There was a reason as I was setting up a gitlab windows runner and needed to run docker in hyper-v.. I decided to just use the gitlab shell executor instead.. So I actually don't need the args anymore.. I removed them and it started just fine now :)
 
Hello,


Ubuntut 20.04 and QEMU Virt-Manager - Nested virtualization suddenly doesnt work

Since Yesterday when i want start Windows 10 VM in Ubuntu 20.04 and QEMU 4.2.1 also tryed 5.2 and 6.2 and latest

i get this error:

Code:
qemu-system-x86_64: error: failed to set MSR 0x48f to 0xffffff00036dfb
qemu-system-x86_64: /home/user/qemu-4.2.1/target/i386/kvm.c:2691: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.



i have kvm ignore_msrs=1 and so on tryed ON and OFF like before it worked in XML


Code:
<cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="11" threads="2"/>
    <cache mode="passthrough"/>
    <feature policy="require" name="hypervisor"/>
    <feature policy="disable" name="mpx"/>
    <feature policy="require" name="ibpb"/>
    <feature policy="require" name="md-clear"/>
    <feature policy="require" name="spec-ctrl"/>
    <feature policy="require" name="ssbd"/>
    <feature policy="require" name="invtsc"/>
  </cpu>


Anyone can help it worked now for years but now not anymore since apt update and apt upgrade need downgrade Ubuntu Linux Kernel?


i need CPU Host-Passthrough otherwise Windows 10 has no good performance like in all Windows 10 Gaming VM GPU Passthrough Tutorials stand and also i tested

Hope any one can help here also GRUB



Code:
 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on kvm.ignore_msrs=1 video=efifb:off vfio-pci.ids=10de:2486,10de:228b,10de:2503,10de:228e isolcpus=3-13,17-27 nohz_full=3-13,17-27 rcu_nocbs=3-13,17-27 msr.allow_writes=on kvm.intel_nested=1"


A and
Ubuntu Linux Kernel
5.11.0-43-generic



and when start MacOS VM also with CPU Host-Passthrough it work witout an Error hmm


Thank ya
Kind Regards