KVM (Kernel-based Virtual Machine) is a virtualization technology for Linux that allows running multiple virtual machines (VMs) on a single physical host. It leverages the Linux kernel to provide virtualization capabilities, enabling efficient and secure isolation between VMs. KVM test cases involve testing various aspects of virtualization, including VM creation, management, and functionality.
More details please refer to following.
For more details about installation and configuration, please refer to lkvs_on_avocado.
lkvs KVM is a seperate test provider for avocado/avocado-vt.
- Install avocado and avocado-vt
pip install --user avocado-framework
pip install --user git+https://github.com/avocado-framework/avocado-vt
- Download lkvs in test machine
git clone https://github.com/intel/lkvs.git
- Create a new test provider file for lkvs test repo, put the file in the installed test provider folder. like:
cat /root/avocado/data/avocado-vt/virttest/test-providers.d/myprovider.ini
[provider]
uri: file:///home/foo/lkvs
[qemu]
subdir: KVM/qemu/
- Setup test into the real avocado-vt configuration file
avocado vt-bootstrap
avocado list |grep myprovider
For example: avocado-vt type_specific.myprovider.boot_td
- Run test
avocado run boot_td
- Fork this repo on github
- Create a new topic branch for your work
- Create a new test provider file in your virt test repo, like:
cp io-github-autotest-qemu.ini myprovider.ini
[provider]
uri: file:///home/foo/lkvs
[qemu]
subdir: KVM/qemu/
You can optionally delete temporarily the
io-github-autotest-qemu.ini
file, just so you don't have test
conflicts. Then you can develop your new test code, run it
using virt test, and commit your changes.
- Make sure you have inspektor installed
- Run:
inspekt checkall --disable-style E501,E265,W601,E402,E722,E741 --no-license-check
- Fix any problems
- Push your changes and submit a pull request
- That's it.