Skip to content

Commit

Permalink
kvm: Passthrough host CPU in order to allow nesting
Browse files Browse the repository at this point in the history
Before this patch the virtual CPU was the stock qemu CPU, in the sense that
the virtual CPU features were set according to the default qemu CPU.
With this change the CPU features of the host will be copied at start to the
domain definition. This includes features like svm and vmx, which in turn allow
to run nested virtualization if the host is configured accordingly i.e.
`kvm_intel nested=y` in `/etc/modprobe.d/kvm.conf`.

Resolves #kubernetes#2553

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
  • Loading branch information
fabiand committed Feb 16, 2018
1 parent 9fe9154 commit e8d3bad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/drivers/kvm/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const domainTmpl = `
<apic/>
<pae/>
</features>
<cpu mode='host-passthrough'></cpu>
<os>
<type>hvm</type>
<boot dev='cdrom'/>
Expand Down

0 comments on commit e8d3bad

Please sign in to comment.