Jonathan Billings
2016-Sep-25 14:46 UTC
[CentOS] How to enable the svm cpu flag inside a vm?
On Sun, Sep 25, 2016 at 04:38:39PM +0200, Leonard den Ottolander wrote:> The qemu-kvm option "-enable-nesting" that I dug up in the source looks > promising. No mention in the man page on either C6 or C7 but it is > mentioned here: > https://www.redhat.com/archives/libvir-list/2012-October/msg01138.html > > How do I pass the "-enable-nesting" option to qemu-kvm using either > virt-manager.py, virsh or the domain xml?I saw this in the RHEL 7.3 beta release notes: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/7.3_Release_Notes/technology_previews_virtualization.html Nested Virtualization will be a tech preview in RHEL 7.3 Beta, and so it'll be available after RHEL 7.3 is released and CentOS rebuilds it. -- Jonathan Billings <billings at negate.org>
Leonard den Ottolander
2016-Sep-25 14:57 UTC
[CentOS] How to enable the svm cpu flag inside a vm?
Hello Jonathan, On Sun, 2016-09-25 at 10:46 -0400, Jonathan Billings wrote:> On Sun, Sep 25, 2016 at 04:38:39PM +0200, Leonard den Ottolander wrote: > > How do I pass the "-enable-nesting" option to qemu-kvm using either > > virt-manager.py, virsh or the domain xml? > > I saw this in the RHEL 7.3 beta release notes: > > https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/7.3_Release_Notes/technology_previews_virtualization.html > > Nested Virtualization will be a tech preview in RHEL 7.3 Beta, and so > it'll be available after RHEL 7.3 is released and CentOS rebuilds it.Right. The fact that this has been lingering in the source for years on end and only now is being announced as a tech preview seems to answer my question in the sense that "no this is not possible" :S . Guess I'll have to fire up my build vm then and see if nuking that test for "kvm_nested" allows me to pass the svm cpu flag from a C6 host. Regards, Leonard. -- mount -t life -o ro /dev/dna /genetic/research
On 25 September 2016 at 17:57, Leonard den Ottolander >>> >> Nested Virtualization will be a tech preview in RHEL 7.3 Beta, and so >> it'll be available after RHEL 7.3 is released and CentOS rebuilds it. >Officially its gonna be tech-preview in 7.3, but I can tell you we've been successfully using it for testing oVirt since 7.1... (For el7 on top of el7, see [1] for setup example) YMMV though, we only tested with intel CPUs so far... [1]: http://lago.readthedocs.io/en/stable/README.html#virtualization-and-nested-virtualization-support -- Barak Korren bkorren at redhat.com oVirt infra team My views are my own and do not necessarily reflect my employer`s
Leonard den Ottolander
2016-Sep-26 16:35 UTC
[CentOS] How to enable the svm cpu flag inside a vm?
Hi, On Sun, 2016-09-25 at 10:46 -0400, Jonathan Billings wrote:> Nested Virtualization will be a tech preview in RHEL 7.3 Beta, and so > it'll be available after RHEL 7.3 is released and CentOS rebuilds it.Gave the beta a try. The option "nested" for AMD cpu's is no longer automatically set. You have to either add kvm-amd.nested=1 on the kernel boot line or configure modprobe: echo "options kvm-amd nested=1" >> /etc/modprobe.d/kvm_amd.conf Configure the guest to use "host-passthrough" as the cpu type. Using "host-model" (copy host cpu) did not work for me. /dev/kvm wasn't available. I haven't installed Android Studio yet, but since both the svm cpu flag and /dev/kvm seem to be available I expect the Android Emulator to work inside the vm. Enjoy, Leonard. -- mount -t life -o ro /dev/dna /genetic/research