From 8c240455c995cb7bea7fb560ac0bdf2ee25f1e27 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 9 Jul 2019 22:40:23 +0000 Subject: [PATCH] virthost / s390x: setup correct parameters for nested virt. Signed-off-by: Kevin Fenzi --- roles/virthost/files/kvm.conf | 1 + roles/virthost/tasks/main.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 roles/virthost/files/kvm.conf diff --git a/roles/virthost/files/kvm.conf b/roles/virthost/files/kvm.conf new file mode 100644 index 0000000000..ea2bc71642 --- /dev/null +++ b/roles/virthost/files/kvm.conf @@ -0,0 +1 @@ +options kvm nested=1 diff --git a/roles/virthost/tasks/main.yml b/roles/virthost/tasks/main.yml index edfab5b6e0..9e9ca83eed 100644 --- a/roles/virthost/tasks/main.yml +++ b/roles/virthost/tasks/main.yml @@ -123,9 +123,13 @@ # Some virthosts we want to use nested virt (a tech preview in rhel 7.2) # We need this module option set and then need to tweak the libvirt xml to enable it # -- name: setup nested virt on virthosts with nested=true variable +- name: setup nested virt on virthosts with nested=true variable (x86_64) copy: src=kvm_intel.conf dest=/etc/modprobe.d/kvm_intel.conf - when: nested == true + when: nested == true and ansible_architecture is 'x86_64' + +- name: setup nested virt on virthosts with nested=true variable (s390x) + copy: src=kvm.conf dest=/etc/modprobe.d/kvm.conf + when: nested == true and ansible_architecture is 's390x' # # On some hosts in the fedorainfracloud network we want to add some users to be able to manage