New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env_process: add nested virtualization support to run tests in nested VMs #1947
Conversation
4ac7b59
to
79a5158
Compare
As the avocado-vt that is installed inside the guest needs the nested support, I tested it with my test branch, Below mentioned is the test results: Host:
L1 Guest:
|
3952d2a
to
486f2a1
Compare
@sathnaga @luckyh @vivianQizhu would you guys help for reviewing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User has to be warned on the test timeout on L1 guest as it depends on L2 and further levels test timeouts,
I guess it is difficult to handle it as we would have already started the test, make sure we document it.
Apart from that patch looks good.
6cb0867
to
1b116ce
Compare
virttest/env_process.py
Outdated
@@ -1123,16 +1146,33 @@ def preprocess(test, params, env): | |||
testlist = [new_params.get("avocado_guest_vt_test", | |||
"boot")] | |||
avocadotestargs = new_params.get("avocado_guest_add_args", "") | |||
# add nested-hv feature attribute to VM's libvirt xml | |||
if new_params.get("vm_type") == "libvirt": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can choose to use --virt-install extra-params aswell, if create_vm_libvirt param is set, so that we can avoid creating a vm at all to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sathnaga, I have taken care of the suggestion.
… VMs This patch enables existing tests to be run on nested VMs to multilevels, is supports N * N * N VMs where multiple guests can be brought up and nested with multilevel and multiple VMs on every level. The params can be set to the granularity of any particular VM on any level. The point here is to dynamically calculate and distribute memory to higher level VMs based on the available memory in current level VM/host. It is not neccesary but it is required for VMs to run test seamlessly on positive scenarios, still negative scenarios can be tested by overriding the param to perform this distribution. We handle the test across all the VMs at all the Levels in linear way as parallelism from here will not have control on the test flow but configuring different testcases on different VMs at any level is possible. Parallel test scenarios can be added from testcase indeed. Signed-off-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
This patch adds the support to run nested VMs in threads and pass on the params from one level to next level which means currently the tests in each level would run with the default params of the test but with this support user can pass the customised params specific to levels or specific to VMs in the levels while starting the tests. Also boot the VM with `cap-nested-hv=on` in qemu commandline to allow nested virtualization. Signed-off-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
This pull request introduces 1 alert when merging 1d01b0d into 3f08daa - view on LGTM.com new alerts:
|
The warning is unrelated to the PR. |
This patch enables existing tests to be run on nested VMs to
multilevels, is supports N * N * N VMs where multiple guests
can be brought up and nested with multilevel and multiple VMs
on every level. The params can be set to the granularity of any
particular VM on any level.
The point here is to dynamically calculate and distribute memory to
higher level VMs based on the available memory in current level
VM/host. It is not neccesary but it is required for VMs to run
test seamlessly on positive scenarios, still negative scenarios
can be tested by overriding the param to perform this distribution.
We handle the test across all the VMs at all the Levels in linear
way as parallelism from here will not have control on the test
flow but configuring different testcases on different VMs at any
level is possible. Parallel test scenarios can be added from testcase
indeed.
Signed-off-by: Balamuruhan S bala24@linux.vnet.ibm.com