kvm: kernel doesn't allow setting HyperV VP_INDEX

Discussion in 'Proxmox VE: Installation and configuration' started by raj, May 21, 2019.

  1. raj

    raj Member

    Joined:
    Sep 17, 2011
    Messages:
    206
    Likes Received:
    2
    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
     
    RokaKen likes this.
  2. azop

    azop Member

    Joined:
    Feb 6, 2012
    Messages:
    34
    Likes Received:
    1
    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!!
     
  3. raj

    raj Member

    Joined:
    Sep 17, 2011
    Messages:
    206
    Likes Received:
    2

    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
     
  4. C0kkie

    C0kkie New Member

    Joined:
    May 31, 2019
    Messages:
    3
    Likes Received:
    0
    I have the same problem....is there any solution yet?
     
  5. raj

    raj Member

    Joined:
    Sep 17, 2011
    Messages:
    206
    Likes Received:
    2
    @C0kkie did you try my fix. Just wandering if this would work for you also?
     
  6. C0kkie

    C0kkie New Member

    Joined:
    May 31, 2019
    Messages:
    3
    Likes Received:
    0
    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
     
  7. raj

    raj Member

    Joined:
    Sep 17, 2011
    Messages:
    206
    Likes Received:
    2
    @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
     
  8. C0kkie

    C0kkie New Member

    Joined:
    May 31, 2019
    Messages:
    3
    Likes Received:
    0
    Yep works. Any idea why i need to do this? Wasnt never the case befor
     
  9. raj

    raj Member

    Joined:
    Sep 17, 2011
    Messages:
    206
    Likes Received:
    2
    Unsure as to what has changed. i had to find this the hard way myself. Maybe someone else might be able to explain this. But good to know that at least its working now.
     
    C0kkie likes this.
  10. ixproxmox

    ixproxmox New Member

    Joined:
    Nov 25, 2015
    Messages:
    11
    Likes Received:
    0
    Same problem here, only Windows-hosts. The "args:" workaround works, but very annoying to have to edit this for every machine you create.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice