From a209e443dfc4657b67934eaf39038079e0d5f12c Mon Sep 17 00:00:00 2001
From: caoyuan <cao.yuan@99cloud.net>
Date: Wed, 24 Jan 2018 10:28:52 +0800
Subject: [PATCH] Add cpu_mode in vagrant/bootstrap.sh

With libvirt 2.0, when using qemu cpu mode is not properly
evaluated and need to be set to cpu_mode = none.

Add this option when kvm is not supported, otherwise user
will still facing errors when launching instances over qemu.

Change-Id: I7aa6df356085263d25c6afcc812f035d3ded942b
---
 contrib/dev/vagrant/bootstrap.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/dev/vagrant/bootstrap.sh b/contrib/dev/vagrant/bootstrap.sh
index db521f462a..fa9d463b2b 100644
--- a/contrib/dev/vagrant/bootstrap.sh
+++ b/contrib/dev/vagrant/bootstrap.sh
@@ -205,7 +205,8 @@ EOF
     mkdir -p /etc/kolla/config/nova/
     cat > /etc/kolla/config/nova/nova-compute.conf <<EOF
 [libvirt]
-virt_type=qemu
+virt_type = qemu
+cpu_mode = none
 EOF
 
     # Launch a local registry (and mirror) to speed up pulling images.