p/fuel: lib.sh: Use host-passthrough CPU model 41/37941/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 21 Jul 2017 18:02:14 +0000 (20:02 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 21 Jul 2017 18:03:23 +0000 (20:03 +0200)
Fix libvirt 3.x compatibility issues by explicitly setting the CPU
model to host-passthrough via virt-install.

Change-Id: I0e52cbabb0bf42b36dd2b9b5045dc18878e21884
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
patches/opnfv-fuel/0001-mcp-config-AArch64-Use-UEFI-arm64-image.patch
patches/opnfv-fuel/0002-lib.sh-AArch64-Use-VGA-video-mode-for-guests.patch
patches/opnfv-fuel/0003-lib.sh-AArch64-virt-install-Use-virtio-net-pci.patch
patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch [new file with mode: 0644]

index 48981c3..bd647e0 100644 (file)
@@ -26,7 +26,7 @@ index b841e88..17fbbfc 100644
      ram: 4096
 
 diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
-index 679b997..af57dcc 100644
+index 1848c70..c315323 100644
 --- a/mcp/scripts/lib.sh
 +++ b/mcp/scripts/lib.sh
 @@ -18,7 +18,7 @@ cleanup_vms() {
index 8c6e8f5..4ab98b5 100644 (file)
@@ -35,7 +35,7 @@ index a1f5e38..92c7947 100755
  # Check scenario file existence
  if [[ ! -f  ../config/${DEPLOY_SCENARIO}.yaml ]]; then
 diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
-index af57dcc..245a8f4 100644
+index c315323..862fdcc 100644
 --- a/mcp/scripts/lib.sh
 +++ b/mcp/scripts/lib.sh
 @@ -56,6 +56,13 @@ create_vms() {
index 6c32aa1..c49bdde 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
  1 file changed, 16 insertions(+), 4 deletions(-)
 
 diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
-index 245a8f4..5fcecbd 100644
+index 862fdcc..7c4c46f 100644
 --- a/mcp/scripts/lib.sh
 +++ b/mcp/scripts/lib.sh
 @@ -58,24 +58,36 @@ create_vms() {
diff --git a/patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch b/patches/opnfv-fuel/0008-lib.sh-Use-host-passthrough-when-spawning-VMs.patch
new file mode 100644 (file)
index 0000000..8879333
--- /dev/null
@@ -0,0 +1,29 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Fri, 21 Jul 2017 19:59:33 +0200
+Subject: [PATCH] lib.sh: Use host-passthrough when spawning VMs
+
+virsh defaults to using "host-model" instead of "host-passthrough",
+which not only might lead to a small performance hit on x86, it is
+also causing compatibility issues with libvirt 3.x.
+
+Address this by explicitly requesting "host-passthrough" as the
+CPU model for virt-install.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ mcp/scripts/lib.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
+index 7c4c46f..2be3e65 100644
+--- a/mcp/scripts/lib.sh
++++ b/mcp/scripts/lib.sh
+@@ -69,7 +69,7 @@ create_vms() {
+
+   # create vms with specified options
+   for node in "${vnodes[@]}"; do
+-    virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host --accelerate \
++    virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host-passthrough --accelerate \
+     --network network:pxe,model=${virt_pxe_net_model} \
+     --network network:mgmt,model=${virt_net_model} \
+     --network network:internal,model=${virt_net_model} \