aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-07-21 19:59:33 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-07-31 18:18:36 +0200
commit63ae02248a14aba9166e66768a5fcaed41f23fd1 (patch)
tree022da5144299eb3f616aee0a65d222646b368017 /mcp/scripts/lib.sh
parent4c4b6719b43b399a9478df18ed95a6bac148e775 (diff)
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. Change-Id: Ia7c5e8ff906c02fed2193c268cbb3594c5607bc6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 964f80fde..4abeb0946 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -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 \