VScaler: Setting Nested Virtualisation KVM

From Define Wiki
Jump to navigation Jump to search

Setup the KVM Module to allow nested VMs:

 
[root@house-vscaler nova]# echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf 
[root@house-vscaler nova]# cat /etc/modprobe.d/dist.conf 
options kvm-intel nested=y
[root@house-vscaler nova]# scp /etc/modprobe.d/dist.conf node01:/etc/modprobe.d/
dist.conf                                                                                                                                                      100%   27     0.0KB/s   00:00    
[root@house-vscaler nova]# scp /etc/modprobe.d/dist.conf node02:/etc/modprobe.d/
dist.conf                                                                                                                                                      100%   27     0.0KB/s   00:00    
[root@house-vscaler nova]# scp /etc/modprobe.d/dist.conf node03:/etc/modprobe.d/
dist.conf                                                                                                                                                      100%   27     0.0KB/s   00:00    
[root@house-vscaler nova]#

Then REPEAT on each node (or reboot)

[root@node02 ~]# cat /sys/module/kvm_intel/parameters/nested
N
[root@node02 ~]# modprobe kvm 
[root@node02 ~]# modprobe kvm_intel 
[root@node02 ~]# cat /sys/module/kvm_intel/parameters/nested
Y

Setup the kolla environment for nova.conf

[root@house-vscaler ~]# cat /etc/kolla/config/nova/nova.conf 
[libvirt]
virt_type=kvm
cpu_mode=host-passthrough

Reconfigure OpenStack (using Kolla reconfigure)

[root@house-vscaler ~]# source /etc/kolla/admin-openrc.sh 
[root@house-vscaler ~]# kolla-ansible -i vscaler/multinode reconfigure

You should end up with this: (fail should be=0 everywhere) 

PLAY RECAP **************************************************************************************************************************************************************************************
node01                     : ok=240  changed=2    unreachable=0    failed=0   
node02                     : ok=48   changed=0    unreachable=0    failed=0   
node03                     : ok=48   changed=0    unreachable=0    failed=0