diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-11-08 08:44:20 +0000 |
---|---|---|
committer | Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com> | 2018-11-20 14:02:20 +0000 |
commit | db53b626cc5019048a324b6ce589598e048dbed4 (patch) | |
tree | f5d62552e01490802c6ebde5bb8d71eceb2a0d21 /yardstick/benchmark/contexts/standalone/model.py | |
parent | 11bfaf23160da0f0391a2152dddb19b3a0bae766 (diff) |
Make VM machine type as a user configuration
For backward compatibility, the default value of this
option has been left unchanged.
JIRA: YARDSTICK-1528
Change-Id: I42ceca96501f1136cba27d85c2d82240bd45c10c
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts/standalone/model.py')
-rw-r--r-- | yardstick/benchmark/contexts/standalone/model.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py index fda667137..aa5fdd391 100644 --- a/yardstick/benchmark/contexts/standalone/model.py +++ b/yardstick/benchmark/contexts/standalone/model.py @@ -45,7 +45,7 @@ VM_TEMPLATE = """ <vcpu cpuset='{cpuset}'>{vcpu}</vcpu> {cputune} <os> - <type arch="x86_64" machine="pc-i440fx-xenial">hvm</type> + <type arch="x86_64" machine="{machine}">hvm</type> <boot dev="hd" /> </os> <features> @@ -306,6 +306,7 @@ class Libvirt(object): cpuset = Libvirt.pin_vcpu_for_perf(connection, hw_socket) cputune = extra_spec.get('cputune', '') + machine = extra_spec.get('machine_type', 'pc-i440fx-xenial') mac = StandaloneContextHelper.get_mac_address(0x00) image = cls.create_snapshot_qemu(connection, index, flavor.get("images", None)) @@ -316,7 +317,8 @@ class Libvirt(object): memory=memory, vcpu=vcpu, cpu=cpu, numa_cpus=numa_cpus, socket=socket, threads=threads, - vm_image=image, cpuset=cpuset, cputune=cputune) + vm_image=image, cpuset=cpuset, + machine=machine, cputune=cputune) # Add CD-ROM device vm_xml = Libvirt.add_cdrom(cdrom_img, vm_xml) |