kb:linux:kvm:hyperv_enightments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kb:linux:kvm:hyperv_enightments [2015/12/12 21:18] milanokb:linux:kvm:hyperv_enightments [2015/12/12 21:32] (current) milano
Line 1: Line 1:
 ====== Enabling Hyper-V enlightenments with KVM ====== ====== Enabling Hyper-V enlightenments with KVM ======
 +
 +Author: [[http://blog.wikichoon.com/2014/07/enabling-hyper-v-enlightenments-with-kvm.html|Cole Robins]]
    
 Windows has support for several paravirt features that it will use when running on Hyper-V, Microsoft's hypervisor. These features are called enlightenments. Many of the features are similar to paravirt functionality that exists with Linux on KVM (virtio, kvmclock, PV EOI, etc.) Windows has support for several paravirt features that it will use when running on Hyper-V, Microsoft's hypervisor. These features are called enlightenments. Many of the features are similar to paravirt functionality that exists with Linux on KVM (virtio, kvmclock, PV EOI, etc.)
  
-Nowadays QEMU/KVM can also enable support for several Hyper-V enlightenments. When enabled, Windows VMs running on KVM will use many of the same paravirt optimizations they would use when running on Hyper-V. For detailed info, see Vadim's presentation from KVM Forum 2012.+Nowadays QEMU/KVM can also enable support for several Hyper-V enlightenments. When enabled, Windows VMs running on KVM will use many of the same paravirt optimizations they would use when running on Hyper-V. For detailed info, see [[http://www.linux-kvm.org/images/0/0a/2012-forum-kvm_hyperv.pdf|Vadim's presentation from KVM Forum 2012]].
  
 From the QEMU/KVM developers, the recommended configuration is: From the QEMU/KVM developers, the recommended configuration is:
Line 13: Line 15:
 Which maps to the libvirt XML: Which maps to the libvirt XML:
 <code> <code>
-<nowiki> 
  <features>    <features>  
   <hyperv>     <hyperv>  
-   <relaxed state='on'/>  +   <relaxed state='on'/>   // only this option is supported on Centos 6.5 KVM hypervisor
    <vapic state='on'/>      <vapic state='on'/>  
    <spinlocks state='on' retries='8191'/>      <spinlocks state='on' retries='8191'/>  
Line 25: Line 26:
   <timer name='hypervclock' present='yes'/>     <timer name='hypervclock' present='yes'/>  
  </clock>    </clock>  
-</nowiki> 
 </code> </code>
  
 Some details about the individual features: Some details about the individual features:
  
-    relaxed/hv_relaxedAvailable in libvirt 1.0.0+ (commit) and qemu 1.1+ (commit). This bit disables a Windows sanity check that commonly results in a BSOD when the VM is running on a heavily loaded host (example bugs here, here, and here). Sounds similar to the Linux kernel option no_timer_check, which is automatically enabled when Linux is running on KVM. +^ Fetaure ^ Description ^ 
-    vapic/hv_vapicAvailable in libvirt 1.1.0+ (commit) and qemu 1.1+ (commit). +|relaxed/hv_relaxedAvailable in libvirt 1.0.0+ (commit) and qemu 1.1+ (commit). This bit disables a Windows sanity check that commonly results in a BSOD when the VM is running on a heavily loaded host (example bugs here, here, and here). Sounds similar to the Linux kernel option no_timer_check, which is automatically enabled when Linux is running on KVM.| 
-    spinlocks/hv_spinlocksAvailable in libvirt 1.1.0+ (commit) and qemu 1.1+ (commit) +|vapic/hv_vapicAvailable in libvirt 1.1.0+ (commit) and qemu 1.1+ (commit).| 
-    hypervclock/hv_timeAvailable in libvirt 1.2.2+ (commit) and qemu 2.0+ (commit). Sounds similar to kvmclock, a paravirt time source which is used when Linux is running on KVM.+|spinlocks/hv_spinlocksAvailable in libvirt 1.1.0+ (commit) and qemu 1.1+ (commit)| 
 +|hypervclock/hv_timeAvailable in libvirt 1.2.2+ (commit) and qemu 2.0+ (commit). Sounds similar to kvmclock, a paravirt time source which is used when Linux is running on KVM.|
  
  
Line 42: Line 43:
 The next version of virt-manager will enable Hyper-V enlightenments when creating a Windows VM (git commit). virt-xml can also be used to enable these bits easily from the command line for an existing VM: The next version of virt-manager will enable Hyper-V enlightenments when creating a Windows VM (git commit). virt-xml can also be used to enable these bits easily from the command line for an existing VM:
  
 +<code>
  sudo virt-xml $VMNAME --edit --features hyperv_relaxed=on,hyperv_vapic=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=8191  sudo virt-xml $VMNAME --edit --features hyperv_relaxed=on,hyperv_vapic=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=8191
  sudo virt-xml $VMNAME --edit --clock hypervclock_present=yes    sudo virt-xml $VMNAME --edit --clock hypervclock_present=yes  
 +</code>
  
  
Line 50: Line 53:
 Other tools aren't enabling these features yet, though there are bugs tracking this for the big ones: Other tools aren't enabling these features yet, though there are bugs tracking this for the big ones:
  
-    ovirt/vdsm: https://bugzilla.redhat.com/show_bug.cgi?id=1083529 +[[https://bugzilla.redhat.com/show_bug.cgi?id=1083529|ovirt/vdsm]] 
-    openstack: https://bugzilla.redhat.com/show_bug.cgi?id=1083525 +[[https://bugzilla.redhat.com/show_bug.cgi?id=1083525|openstack]] 
-    gnome-boxes: https://bugzilla.gnome.org/show_bug.cgi?id=732811+[[https://bugzilla.gnome.org/show_bug.cgi?id=732811|gnome-boxes]]
  
 (edit 2014-09-08: This change was released in virt-manager-1.1.0)  (edit 2014-09-08: This change was released in virt-manager-1.1.0) 
  • kb/linux/kvm/hyperv_enightments.1449955127.txt.gz
  • Last modified: 2015/12/12 21:18
  • by milano