1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Fri, 21 Jul 2017 19:59:33 +0200
3 Subject: [PATCH] lib.sh: Use host-passthrough when spawning VMs
5 virsh defaults to using "host-model" instead of "host-passthrough",
6 which not only might lead to a small performance hit on x86, it is
7 also causing compatibility issues with libvirt 3.x.
9 Address this by explicitly requesting "host-passthrough" as the
10 CPU model for virt-install.
12 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
14 mcp/scripts/lib.sh | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
18 index b75e47e..55df750 100644
19 --- a/mcp/scripts/lib.sh
20 +++ b/mcp/scripts/lib.sh
21 @@ -67,7 +67,7 @@ create_vms() {
23 # create vms with specified options
24 for node in "${vnodes[@]}"; do
25 - virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host --accelerate \
26 + virt-install --name ${node} --ram ${vnodes_ram[$node]} --vcpus ${vnodes_vcpus[$node]} --cpu host-passthrough --accelerate \
27 --network network:pxe,model=virtio \
28 --network network:mgmt,model=virtio \
29 --network network:internal,model=virtio \