summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-12-18 10:22:03 +0000
committerMarkos Chandras <mchandras@suse.de>2017-12-18 10:24:43 +0000
commit00617d7f8b9b6eeb0271c64b5fa04522ee0ef21b (patch)
treec346ec7757656d73c3eac57bb2572fd62e7ccff0
parent6c728e29fee8e36b8ad66964e13ed2b311ef7bee (diff)
bifrost: Set vCPU model to 'host-passthrough'
The default CPU model of QEMU GenuineIntel/QEMU Virtual CPU is not the best option for vCPU in terms of performance. As such, lets use the real host CPU. This has also been submitted upstream and the template should be removed once the upstream patch has been merged and the SHA for bifrost is bumped. Change-Id: I23d86933604c290d5650b73f420972d0a2b23dc8 Link: https://review.openstack.org/#/c/528677/ Signed-off-by: Markos Chandras <mchandras@suse.de>
-rw-r--r--bifrost/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j262
-rwxr-xr-xbifrost/scripts/bifrost-provision.sh2
2 files changed, 64 insertions, 0 deletions
diff --git a/bifrost/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2 b/bifrost/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2
new file mode 100644
index 00000000..15a99bfc
--- /dev/null
+++ b/bifrost/playbooks/roles/bifrost-create-vm-nodes/templates/testvm.xml.j2
@@ -0,0 +1,62 @@
+<domain type='{{ test_vm_domain_type }}'>
+ <name>{{ vm_name }}</name>
+ <memory unit='MiB'>{{ test_vm_memory_size }}</memory>
+ <vcpu>{{ test_vm_cpu_count }}</vcpu>
+ <os>
+ <type arch='{{ test_vm_arch }}' machine='{{ test_vm_machine }}'>hvm</type>
+ <boot dev='network'/>
+ <bootmenu enable='no'/>
+ <bios useserial='yes' rebootTimeout='10000'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='{{ test_vm_cpu }}'>
+ <model fallback='allow'/>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>{{ test_vm_emulator }}</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='{{ test_vm_disk_cache }}'/>
+ <source file='{{ vm_volume_path }}'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </disk>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <interface type='network'>
+ <source network='{{ test_vm_network }}'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes'/>
+ <video>
+ <model type='cirrus' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <serial type='file'>
+ <source path='{{ vm_log_file }}'/>
+ <target port='0'/>
+ <alias name='serial0'/>
+ </serial>
+ <serial type='pty'>
+ <source path='/dev/pts/49'/>
+ <target port='1'/>
+ <alias name='serial1'/>
+ </serial>
+ <console type='file'>
+ <source path='{{ vm_log_file }}'/>
+ <target type='serial' port='0'/>
+ <alias name='serial0'/>
+ </console>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh
index d705f31f..ec46b1ef 100755
--- a/bifrost/scripts/bifrost-provision.sh
+++ b/bifrost/scripts/bifrost-provision.sh
@@ -102,6 +102,7 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
-i inventory/localhost \
test-bifrost-create-vm.yaml \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e test_vm_cpu='host-passthrough' \
-e test_vm_memory_size=${VM_MEMORY_SIZE} \
-e enable_venv=${ENABLE_VENV} \
-e test_vm_domain_type=${VM_DOMAIN_TYPE} \
@@ -114,6 +115,7 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
-e use_cirros=${USE_CIRROS} \
-e testing_user=${TESTING_USER} \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e test_vm_cpu='host-passthrough' \
-e inventory_dhcp=${INVENTORY_DHCP} \
-e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \
-e enable_venv=${ENABLE_VENV} \