Browse Source
Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example conf_example_aarch64.yml and conf_example_x86.yml. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-4-robert.foley@linaro.org> Message-Id: <20200701135652.1366-8-alex.bennee@linaro.org>pull/107/head
committed by
Alex Bennée
5 changed files with 155 additions and 1 deletions
@ -0,0 +1,51 @@ |
|||
# |
|||
# Example yaml for use by any of the scripts in tests/vm. |
|||
# Can be provided as an environment variable QEMU_CONFIG |
|||
# |
|||
qemu-conf: |
|||
|
|||
# If any of the below are not provided, we will just use the qemu defaults. |
|||
|
|||
# Login username and password(has to be sudo enabled) |
|||
guest_user: qemu |
|||
guest_pass: "qemupass" |
|||
|
|||
# Password for root user can be different from guest. |
|||
root_pass: "qemupass" |
|||
|
|||
# If one key is provided, both must be provided. |
|||
#ssh_key: /complete/path/of/your/keyfile/id_rsa |
|||
#ssh_pub_key: /complete/path/of/your/keyfile/id_rsa.pub |
|||
|
|||
cpu: max |
|||
machine: virt,gic-version=max |
|||
memory: 16G |
|||
|
|||
# The below is a example for how to configure NUMA topology with |
|||
# 4 NUMA nodes and 2 different NUMA distances. |
|||
qemu_args: "-smp cpus=16,sockets=2,cores=8 |
|||
-numa node,cpus=0-3,nodeid=0 -numa node,cpus=4-7,nodeid=1 |
|||
-numa node,cpus=8-11,nodeid=2 -numa node,cpus=12-15,nodeid=3 |
|||
-numa dist,src=0,dst=1,val=15 -numa dist,src=2,dst=3,val=15 |
|||
-numa dist,src=0,dst=2,val=20 -numa dist,src=0,dst=3,val=20 |
|||
-numa dist,src=1,dst=2,val=20 -numa dist,src=1,dst=3,val=20" |
|||
|
|||
# By default we do not set the DNS. |
|||
# You override the defaults by setting the below. |
|||
#dns: 1.234.567.89 |
|||
|
|||
# By default we will use a "block" device, but |
|||
# you can also boot from a "scsi" device. |
|||
# Just keep in mind your scripts might need to change |
|||
# As you will have /dev/sda instead of /dev/vda (for block device) |
|||
boot_dev_type: "block" |
|||
|
|||
# By default the ssh port is not fixed. |
|||
# A fixed ssh port makes it easier for automated tests. |
|||
#ssh_port: 5555 |
|||
|
|||
# To install a different set of packages, provide a command to issue |
|||
#install_cmds: "apt-get update ; apt-get build-dep -y qemu" |
|||
|
|||
# Or to skip the install entirely, just provide "" |
|||
#install_cmds: "" |
|||
@ -0,0 +1,50 @@ |
|||
# |
|||
# Example yaml for use by any of the x86 based scripts in tests/vm. |
|||
# Can be provided as an environment variable QEMU_CONFIG |
|||
# |
|||
qemu-conf: |
|||
|
|||
# If any of the below are not provided, we will just use the qemu defaults. |
|||
|
|||
# Login username and password(has to be sudo enabled) |
|||
guest_user: "qemu" |
|||
guest_pass: "qemupass" |
|||
|
|||
# Password for root user can be different from guest. |
|||
root_pass: "qemupass" |
|||
|
|||
# Provide default ssh keys of current user. |
|||
# You need to edit the below for your user. |
|||
#ssh_key_file: /home/<user>/.ssh/id_rsa |
|||
#ssh_pub_key_file: /home/<user>/.ssh/id_rsa.pub |
|||
|
|||
cpu: max |
|||
machine: pc |
|||
memory: 8G |
|||
|
|||
# The below is a example for how to configure NUMA topology with |
|||
# 4 NUMA nodes and 2 different NUMA distances. |
|||
qemu_args: "-smp cpus=8,sockets=2,cores=4 |
|||
-object memory-backend-ram,size=4G,policy=bind,host-nodes=0,id=ram-node0 |
|||
-object memory-backend-ram,size=4G,policy=bind,host-nodes=0,id=ram-node1 |
|||
-object memory-backend-ram,size=4G,policy=bind,host-nodes=1,id=ram-node2 |
|||
-object memory-backend-ram,size=4G,policy=bind,host-nodes=1,id=ram-node3 |
|||
-numa node,cpus=0-1,nodeid=0 -numa node,cpus=2-3,nodeid=1 |
|||
-numa node,cpus=4-5,nodeid=2 -numa node,cpus=6-7,nodeid=3 |
|||
-numa dist,src=0,dst=1,val=15 -numa dist,src=2,dst=3,val=15 |
|||
-numa dist,src=0,dst=2,val=20 -numa dist,src=0,dst=3,val=20 |
|||
-numa dist,src=1,dst=2,val=20 -numa dist,src=1,dst=3,val=20" |
|||
|
|||
# By default we do not set the DNS. |
|||
# You override the defaults by setting the below. |
|||
#dns: "1.234.567.89" |
|||
|
|||
# By default we will use a "block" device, but |
|||
# you can also boot from a "scsi" device. |
|||
# Just keep in mind your scripts might need to change |
|||
# As you will have /dev/sda instead of /dev/vda (for block device) |
|||
boot_dev_type: "block" |
|||
|
|||
# By default the ssh port is not fixed. |
|||
# A fixed ssh port makes it easier for automated tests. |
|||
ssh_port: 5555 |
|||
Loading…
Reference in new issue