summaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-12-02 19:33:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-02 19:33:01 +0000
commitdf86bfbebabaf5f49dff2b123da8872c7aaa4bf1 (patch)
treee36fba3777e4b6045b9edad1eb7dbc20f16a23bf /apex
parent5a6ac42f278fbe793375c03462d74f80c1527a5a (diff)
parent8af37f28bcd5bf990ef501601ec6998b8f9b8fcc (diff)
Merge "Fix nested kvm detection and enablement"
Diffstat (limited to 'apex')
-rw-r--r--apex/overcloud/deploy.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py
index 3ddb5f40..809afc13 100644
--- a/apex/overcloud/deploy.py
+++ b/apex/overcloud/deploy.py
@@ -129,7 +129,7 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir,
elif num_control > 1 and not ds['global_params']['ha_enabled']:
num_control = 1
cmd = "openstack overcloud deploy --templates --timeout {} " \
- "--libvirt-type kvm".format(con.DEPLOY_TIMEOUT)
+ .format(con.DEPLOY_TIMEOUT)
# build cmd env args
for option in deploy_options:
cmd += " -e {}".format(option)
@@ -139,6 +139,13 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir,
cmd += ' --control-flavor control --compute-flavor compute'
if net_data:
cmd += ' --networks-file network_data.yaml'
+ libvirt_type = 'kvm'
+ if virtual:
+ with open('/sys/module/kvm_intel/parameters/nested') as f:
+ nested_kvm = f.read().strip()
+ if nested_kvm != 'Y':
+ libvirt_type = 'qemu'
+ cmd += ' --libvirt-type {}'.format(libvirt_type)
logging.info("Deploy command set: {}".format(cmd))
with open(os.path.join(tmp_dir, 'deploy_command'), 'w') as fh: