aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/QemuUtils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-03-26Optimize Qemu installation to speed up vhost testsPeter Mikus1-0/+4
Currently Qemu is being installed if there is a change of qsz parameter between tests/suites. Qemu is installed always into the same directory. This patch changes the default behavior to install qemu over and install pathced version to separate directory. It also disables force install. Change-Id: I0d7493a02b026a6ae4a5ea8bacf54656de9db567 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-03-20Add max-pkt-len parameter to dpdk testpmd startTibor Frank1-3/+10
Change-Id: I114c187f007c10223502669c2ba85c63d09cd84a Signed-off-by: Tibor Frank <tifrank@cisco.com>
2018-02-23FIX: Qemu path overridePeter Mikus1-8/+12
Currently there is bug that Qemu path is not correctly composed and cannot be properly overriden due to race condition in code. This patch is fixing functions to properly work with path. Change-Id: I276458d2d23c7a14441a4de4a56eff6431242ab9 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-10add new topology parameter: archGabriel Ganne1-4/+9
if unset, arch variable will default to "x86_64" * Note on "arm64" vs "aarch64" debian-based uses arm64 rhel-based uses aarch64 qemu binaries of both distribs uses aarch64 dpdk uses arm64 vpp uses aarch64 python machine modules uses aarch64 => prefer aarch64 to use the same nomenclature as vpp * add ARCH argument to: init_dpdk.sh, install_dpdk.sh, run_l2fwd.sh, install_tldk.sh, run_tldk.sh. default to x86_64 converts "aarch64" if needed for dpdk naming convention * fixed terminal end detection to allow "~]# " add dut node arch as param to all robot set bin calls * add --target-list flag to qemu_build.sh defaults to x86_64-softmmu * add arch flag to all the topology files * topologies/available/ (and example file) * resources/tools/virl/topologies/ * set _qemu_bin path using node['arch'] in qemu_set_node() Change-Id: If46d88d064d213d3e4c6fc584bb8e0d4b6428cb8 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-01-02FIX: Force kill QEMU in case of failed initializationPeter Mikus1-7/+6
Change-Id: Ib9c243b1bd379cf33a2b7747b7f97a8533000d60 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2017-12-12More reliable connection with nested qemu image.Thomas F Herbert1-2/+16
Under some circumstances on a busy server, the qga channel between the host and hte virtual guest has some garbage characters that cause the communications to fail. This has been seen on Centos 7.4 on a slow or busy server. This change sends a flush to qemu guest via the qga socket at 5 second intervals until there is a non empty response from guest before sending a guest ping. Change-Id: I6f21c205b289169aee9d6a4072ad4e6bafafa76f Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-05-05Use 'Qemu Kill All' in perf test teardownJan Gelety1-1/+1
- replace 'Qemu Kill' KW by 'Qemu Kill All' - use self.qemu_kill_all() in case of qemu_start(self) failure Change-Id: I19d4c64d5daef4f00548344d45f0d4943ca4f7e8 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-05-02csit-validate-pylint-master/3731 for build 3731jan.hradil1-0/+5
pylint repairs deleted duplicated method from HcPersistence.py Change-Id: I426e6c15957c995ea10bd11ae2deac75b1cab922 Signed-off-by: jan.hradil <jan.hradil@pantheon.tech>
2017-04-25Vhost testsMatej Klotton1-8/+21
Change-Id: I03722afe13722941e084bc01161f7c2af30e3cb1 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2017-04-09CSIT-441 vhost - Parametrized qemu installpmikus1-5/+17
Update the current QEMU installation script with option to override QEMU installation and to apply additional patches. Additional patches are applied from qemu_patches directory and subdir for specific QEMU version by run-parts. This means that all patches for particular version are applied. All keywords for build QEMU are updated. Change-Id: I0c874a96ac828dff657ee33eb87d88a8854128ad Signed-off-by: pmikus <pmikus@cisco.com>
2017-04-07CSIT-553 Make QEMU bin configurablepmikus1-4/+12
Add option to set path for QEMU binary and make it configurable in perf testaces as global variable. Change-Id: I95f4b1ab790b576f1eca02ccdb86f7a6ced80630 Signed-off-by: pmikus <pmikus@cisco.com>
2017-03-27CSIT-547: Add x520 L2BD perf test with 2 VMs per DUTJan Gelety1-20/+24
- 10ge2p1x520-eth-l2bdbasemaclrn-eth-4vhost-2vm-ndrpdrdisc Change-Id: If65a7cf21d1dbff88f39f319877d9ac1fc5d959e Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-03-08CSIT-530: Add common setup and teardown to perf testsTibor Frank1-0/+1
Change-Id: I2e76de710b4b758eac1d24d447a9c5938f937385 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2017-02-23QemuUtil lib change to work with ubuntu and centosMatej Klotton1-9/+17
- replace nc to socat for comunicating with qemu QGA - change disk type to use virtio driver - add check to bind only network interface for testpmd Change-Id: I19ab16cbd8fec1ec78263ccfb1309a144e5af845 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2017-02-16CSIT-514: Kill Qemu when it does not respondTibor Frank1-2/+2
Change-Id: Id13c7fd51e693a273637c80cb35a159434be4826 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2016-12-21Fix: Qemu wait_until_vm_bootpmikus1-1/+1
There is an issue that booting Nested VM is successful but QGA guest-ping or flush returns partial response. This fix suppose to do checking until an error or timeout occurs. In case of QGA returns correct response it is success. In case of partial response it will log an error and continue in checking. Change-Id: Idb2c5e5ea54bfc1e118ff62dd15696a1797dfdd9 Signed-off-by: pmikus <pmikus@cisco.com>
2016-12-14Fix: Qemu wait_until_vm_bootPeter Mikus1-9/+18
There is an issue that booting Nested VM is successful but QGA guest-ping returns partial response. This fix suppose to do checking until an error or timeout occurs. In case of QGA returns correct response it is success. In case of partial response it will log an error and continue in checking. Change-Id: I8a2469287abaa9398a9206988e579912840f20c4 Signed-off-by: pmikus <pmikus@cisco.com>
2016-12-08CSIT-494 Add multi-queue support for Qemupmikus1-5/+7
Add multi-queue support when starting qemu. Full implementation will be following in near future. Change-Id: I743bbde67254b26a4e4e98072bad57dde728845a Signed-off-by: pmikus <pmikus@cisco.com>
2016-12-02Fix: Reading huge pages information during Qemu startpmikus1-13/+82
Reading information from sysfs or proc files is randomly failing returning empty string without any error. This fix suppose to add the retries to read the hugepages information multiple times and raise exception if reading failed. Change-Id: I7c88504765c39b11c81f7a8e77e5b0e32b7225fe Signed-off-by: pmikus <pmikus@cisco.com>
2016-11-16CSIT-470 Add option to configure CFS scheduler priority for QEMUpmikus1-0/+16
Add option to configure CFS scheduler priority for QEMU Change-Id: I76da7f536e70a23a57cf5215ab60002f95532b19 Signed-off-by: pmikus <pmikus@cisco.com>
2016-10-24CSIT-452: Switch Qemu binary to Ubuntu defaultpmikus1-1/+1
- Switch Qemu binary to default path and remove building qemu in performance jobs Change-Id: I5e8bb510beb672d034699192a7c454c56f2d2581 Signed-off-by: pmikus <pmikus@cisco.com>
2016-10-04Fix pylint warnings in python librariesselias1-18/+24
- no functional changes - fixes 80+ PEP-8 violations Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7 Signed-off-by: selias <samelias@cisco.com>
2016-08-17CSIT-312 VPP vhost-user - VPP vhost-user driver, virtio in VMpmikus1-42/+32
- Add libraries and keywords to control Qemu VM and VMapp Change-Id: Iaaedfe240afe394f507ccaf0cf7a77c8b863acd3 Signed-off-by: pmikus <pmikus@cisco.com>
2016-08-04CSIT-337 Improve Qemu affinity settingpmikus1-11/+21
Improve Qemu affinity setting by getting the list of Qemu thread IDs via QMP and pin each thread PID to specific host core by taskset. Change-Id: I1b0ee8d8425cf1f97b16d6761fff0be2fadc44a8 Signed-off-by: pmikus <pmikus@cisco.com>
2016-08-03CSIT-217 Hugepage configuration on physical LF testbedspmikus1-1/+50
If Qemu requires more Hugepages than availbale in system it fails to start. This patch is aimed to add option to configure more hugepages needed. Default behavior is to fail to start if amount of hugepages is lower then required. Change-Id: I64bd8a5ec5bfa559676035c23001b12d00b026a5 Signed-off-by: pmikus <pmikus@cisco.com>
2016-07-27CSIT-212: FIX: Weekly job gets stucked in 2nd FUNCT test attemptMatej Klotton1-1/+1
- remove mem-prealloc parameter from qemu options Change-Id: I5a75f53da970c4aa772f29ed49bbf25c07bf2d87 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-07-15CSIT-206 Adjust qemu runtime optionspmikus1-7/+22
- Modify runtime optimization of qemu process in qemu library - Add ballon=none - Add option to set affinity - Add mem-prealloc - Add vhost extend options Change-Id: I721557d3e38599d783dfe0773f0593a250f8fae7 Signed-off-by: pmikus <pmikus@cisco.com>
2016-05-23Add temporary fix for CSIT-90 by flushing QGA's input bufferCarsten Koester1-0/+16
This is not a final fix. The final fix SHOULD send a "guest-sync" request as per" http://wiki.qemu.org/Features/QAPI/GuestAgent#QEMU_Guest_Agent_Protocol However, this temporary fix will eliminate the nested VM startup failures triggered by the nested VM's guest-agent receiving a partial guest-ping request. Change-Id: Ice409b7c966a527b03cb71c042b476e1771676d0 Signed-off-by: Carsten Koester <ckoester@cisco.com>
2016-05-09QEMU VM guest-ping fixMatus Fabian1-1/+4
JIRA: CSIT-62 Change-Id: I0affda16af8f983895c50fbc306f45f30fbb69cd Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-04-22Reformat python libraries.Matej Klotton1-3/+5
PEP8 reformat fix typos docstrings reformat Change-Id: Ic48ba4e06490630808b8e2ab1ab0b046ec7eeed7 Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-04-15Update Qemu libraryMatus Fabian1-7/+49
Incorporated changes from nested VM on VIRL. Change-Id: I76ceeb2dde635c2cf0d3a53d29bf24fed72a5437 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-03-24Setup and run QEMU VMMatus Fabian1-2/+358
Change-Id: I22640caa9f13be09d2a837c6332d7b86cef77efc Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-03-11Add KW to build QEMU 2.2.1 on nodeMatus Fabian1-0/+40
Change-Id: I58271aff1ef558752f00593bbad5c3317d08288d Signed-off-by: Matus Fabian <matfabia@cisco.com>