lib.sh: Use host-passthrough when spawning VMs 85/38385/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 21 Jul 2017 17:59:33 +0000 (19:59 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 31 Jul 2017 16:18:36 +0000 (18:18 +0200)
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.

Change-Id: Ia7c5e8ff906c02fed2193c268cbb3594c5607bc6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/scripts/lib.sh

index 964f80f..4abeb09 100644 (file)
@@ -62,7 +62,9 @@ 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=virtio \
     --network network:mgmt,model=virtio \
     --network network:internal,model=virtio \