From 8b4c956bf0ec6c1784e41af2a0598cb49c41461f Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 18 Dec 2017 09:52:46 +0000 Subject: [PATCH] roles: bifrost-create-vm-nodes: Set CPU model to 'host-model' The default CPU model is the QEMU GenuineIntel/QEMU Virtual CPU which doesn't offer the best possible performance. It's best to switch to the 'host-model' option which should make the vCPU more similar to the host one. Change-Id: I677064d14f53eaf6757c07016f4c22909f1b240b --- playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml | 1 + .../roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 | 3 +++ .../notes/vm-host-cpu-type-support-a09768f360372506.yaml | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/vm-host-cpu-type-support-a09768f360372506.yaml diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml index cb6cf8c3d..6f558886c 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml @@ -5,6 +5,7 @@ test_vm_memory_size: "3072" test_vm_num_nodes: 1 test_vm_domain_type: "qemu" test_vm_arch: "x86_64" +test_vm_cpu: "host-model" test_vm_groups: {} test_vm_default_groups: "{{ lookup('env', 'DEFAULT_HOST_GROUPS').split() | default(['baremetal'], true) }}" test_vm_disk_gib: "{{ lookup('env', 'VM_DISK') | default(10, true) }}" diff --git a/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 b/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 index a2de6b167..15a99bfc7 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 +++ b/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 @@ -13,6 +13,9 @@ + + + destroy restart diff --git a/releasenotes/notes/vm-host-cpu-type-support-a09768f360372506.yaml b/releasenotes/notes/vm-host-cpu-type-support-a09768f360372506.yaml new file mode 100644 index 000000000..0f63a2f73 --- /dev/null +++ b/releasenotes/notes/vm-host-cpu-type-support-a09768f360372506.yaml @@ -0,0 +1,7 @@ +--- +features: + - Add support for tweaking the vCPU model for the VMs created + by bifrost-create-vm-nodes. The default vCPU model is 'host-model' + which should provide the best possible performance whilst using only + the CPU features which are understood by libvirt. The model can be + changed using the `test_vm_cpu` Ansible variable.