kvm: kernel doesn't allow setting HyperV VP_INDEX

raj

Renowned Member
Sep 17, 2011
219
4
83
www.businessparksolutions.com
Hi Team,

After upgrading proxmox yesterday to the latest version, 1 windows kvm would not boot. It kept coming with kvm: kernel doesn't allow setting HyperV VP_INDEX.

The only way I could get it to boot was to disable the option of KVM hardware virtualization. Unfortunately by doing that the kvm was too slow, about 20 mins to boot and 15 to be logged in so unusable.
Read around a lot all night and found another option that if added on the config of the actual kvm would allow it to boot with KVM hardware virtualization.

args: -cpu host,hypervisor=off

Here is an example of hefore and after of the same kvm box.

BEFORE

agent: 1
boot: cdn
bootdisk: scsi0
cores: 2
ide0: Datastore:iso/virtio-win-0.1.149.iso,media=cdrom,size=316634K
machine: pc-i440fx-2.6
memory: 10240
name: acme
net0: e1000=xx:xx:xx:xx:xx:xx,bridge=vmbr0,link_down=1
numa: 0
ostype: win8
protection: 1
scsi0: Datastore:10001/vm-10001-disk-0.qcow2,discard=on,size=100G
scsi1: Datastore:10001/vm-10001-disk-1.qcow2,discard=on,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=8beaa325-e75a-4793-9397-4d89f6952ddb
sockets: 2
startup: order=1,up=100,down=100
vga: qxl


AFTER

agent: 1
args: -cpu host,hypervisor=off
boot: cdn
bootdisk: scsi0
cores: 2
ide0: Datastore:iso/virtio-win-0.1.149.iso,media=cdrom,size=316634K
machine: pc-i440fx-2.6
memory: 10240
name: acme
net0: e1000=xx:xx:xx:xx:xx:xx,bridge=vmbr0,link_down=1
numa: 0
ostype: win8
protection: 1
scsi0: Datastore:10001/vm-10001-disk-0.qcow2,discard=on,size=100G
scsi1: Datastore:10001/vm-10001-disk-1.qcow2,discard=on,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=8beaa325-e75a-4793-9397-4d89f6952ddb
sockets: 2
startup: order=1,up=100,down=100
vga: qxl

That did make my live very hard yesterday and all night but hope it will help someone else

Rajbps
 
  • Like
Reactions: RokaKen
I have the same problem. My KVM was running fine for 600 days, I had to stop and had this error:

Stop
kvm: error: failed to set MSR 0x40000090 to 0x10000
kvm: /home/builder/source/qemu.tmp/target/i386/kvm.c:1910: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

I upgraded (dist-upgrade), now I have this error:

kvm: kernel doesn't allow setting HyperV VP_INDEX
TASK ERROR: start failed: command '/usr/bin/kvm -id 104 -name Win2008 -chardev 'socket,id=qmp,path=/var/run/qemu-server/104.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/104.pid -daemonize -smbios 'type=1,uuid=0beaa789-7e83-4ecd-90ab-1aa05b024501' -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/104.vnc,x509,password -no-hpet -cpu 'kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,enforce' -m 3000 -object 'memory-backend-ram,id=ram-node0,size=3000M' -numa 'node,nodeid=0,cpus=0-3,memdev=ram-node0' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'cirrus-vga,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:fc7facdb66c7' -drive 'file=/dev/pve/vm-104-disk-1,if=none,id=drive-ide0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap104i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=32:39:36:33:37:32,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime' -machine 'type=pc' -global 'kvm-pit.lost_tick_policy=discard'' failed: exit code 1

Help!!
 
I have the same problem. My KVM was running fine for 600 days, I had to stop and had this error:

Stop
kvm: error: failed to set MSR 0x40000090 to 0x10000
kvm: /home/builder/source/qemu.tmp/target/i386/kvm.c:1910: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

I upgraded (dist-upgrade), now I have this error:

kvm: kernel doesn't allow setting HyperV VP_INDEX
TASK ERROR: start failed: command '/usr/bin/kvm -id 104 -name Win2008 -chardev 'socket,id=qmp,path=/var/run/qemu-server/104.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/104.pid -daemonize -smbios 'type=1,uuid=0beaa789-7e83-4ecd-90ab-1aa05b024501' -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/104.vnc,x509,password -no-hpet -cpu 'kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,enforce' -m 3000 -object 'memory-backend-ram,id=ram-node0,size=3000M' -numa 'node,nodeid=0,cpus=0-3,memdev=ram-node0' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'cirrus-vga,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:fc7facdb66c7' -drive 'file=/dev/pve/vm-104-disk-1,if=none,id=drive-ide0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap104i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=32:39:36:33:37:32,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime' -machine 'type=pc' -global 'kvm-pit.lost_tick_policy=discard'' failed: exit code 1

Help!!


Hi Azop,

Did you add that line in the config of that kvm please

args: -cpu host,hypervisor=off


Or the other option is to disable KVM hardware virtualisation under options of that KVM

The second option make my KVM too slow to be usable at all.

Rajbps
 
@C0kkie did you try my fix. Just wandering if this would work for you also?

I disabled KVM Virtualisation and that worked, but its fucking slow then. And i need to use kvm 64 cpu then.
I never had a problem like that :|
Also it just happens with windows KVMs, linux working fine
 
@C0kkie can you add this in the config file of that kvm and try mine worked and I have enable kvm virtualisation also and its working fine again.

args: -cpu host,hypervisor=off

See my original post up

Do report back if that does the trick for you
 
  • Like
Reactions: gorotman
@C0kkie can you add this in the config file of that kvm and try mine worked and I have enable kvm virtualisation also and its working fine again.

args: -cpu host,hypervisor=off

See my original post up

Do report back if that does the trick for you

Yep works. Any idea why i need to do this? Wasnt never the case befor
 
Same problem here, only Windows-hosts. The "args:" workaround works, but very annoying to have to edit this for every machine you create.
 
@C0kkie can you add this in the config file of that kvm and try mine worked and I have enable kvm virtualisation also and its working fine again.

args: -cpu host,hypervisor=off

See my original post up

Do report back if that does the trick for you

Hi, same problem. Raj's solution (post #3) works as workround, but I hope to find why the vm fails.
 
I tried Raj's fix and it lets me boot my windows VM's but after like a minute or two the vms just freeze entirely, even on a setup iso (so its not the os itself) VM worked perfectly before updating but now i cant boot them at all. and using the disabled KVM virtualization its so unbelievably slow i cant even connect RDP without it timing out
 
I tried Raj's fix and it lets me boot my windows VM's but after like a minute or two the vms just freeze entirely, even on a setup iso (so its not the os itself) VM worked perfectly before updating but now i cant boot them at all. and using the disabled KVM virtualization its so unbelievably slow i cant even connect RDP without it timing out

do you have rebooted your proxmox server after upgrade ? vp_index has been added in 2016, didn't you have done any update since 3years ?
 
do you have rebooted your proxmox server after upgrade ? vp_index has been added in 2016, didn't you have done any update since 3years ?
I just updated today to 5.4-13 I wasnt on a very old version before that. it was probably within the last year or so. and Yes ive rebooted proxmox after updating as other services that were updated required a reboot to fully apply
 
I just updated today to 5.4-13 I wasnt on a very old version before that. it was probably within the last year or so. and Yes ive rebooted proxmox after updating as other services that were updated required a reboot to fully apply

Damn, that's strange.
could be related to this patch. (where this error message has been added)
https://patchwork.kernel.org/patch/10529719/ (added in qemu 3.0)



can you send your vm config file
/etc/pve/qemu-sever/<vmid>.conf

running kernel version:
#uname -a

proxmox packages
#pve-version -v

and your cpu info

#cat /proc/cpuinfo
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!