The KVM-Autotest system is a client test for the autotest framework. Its main purpose is to serve as an automated regression testing tool for KVM developers, and for doing regular automated testing of KVM (provided you use it with the server testing infrastructure).
How to setup KVM Autotest
---------------------------------
Please find below steps to setup KVM Autotest.
1. Get autotest git
git clone git://github.com/autotest/autotest.git
2. Packages required.
yum install qemu-kvm qemu-kvm-tools syslinux
3. cd autotest/client/tests/kvm
4. ./get_started.py
Recommend to select "N" for all. It does basic setup to get started.
5. mkdir /tmp/kvm_autotest_root/isos/linux
6. mount your required iso here.
mount -t nfs < your iso> /tmp/kvm_autotest_root/isos/linux
7. get md5sum, md5sum_1M of your iso.
md5sum
dd if=
or
./autotest/client/tools/cd_hash.py
8. cd autotest/client/tests/kvm
Here 3 files needs to be changed
1. tests.cfg
2. edit guest-os.cfg
3. base.cfg
tests.cfg:
qemu_binary = /usr/bin/qemu-kvm
qemu_img_binary = /usr/bin/qemu-img
only raw
only virtio_net
only virtio_blk
only smp2
only no_pci_assignable
only smallpages
only RHEL.6.64
only unattended_install.cdrom, boot, shutdown
base.cfg
You can make change base.cfg as per your requirement.
for ex: nics, network_mode = tap/user, script = qemu-ifup/qemu-ifup-ipv6, ..... etc.
I recommend to try with Redhat guest once, before ubuntu.
edit iso name, md5sum, md5sum_1m in .
guest-os.cfg
ex:
- 6.64:
no setup
nic_hotplug:
modprobe_module =
block_hotplug:
modprobe_module =
image_name = rhel6-64
unattended_install:
unattended_file = unattended/RHEL-6-series.ks
#floppy = images/rhel60-64/ks.vfd
cdrom_unattended = images/rhel61-64/ks.iso
kernel = images/rhel61-64/vmlinuz
initrd = images/rhel61-64/initrd.img
unattended_install.cdrom:
cdrom_cd1 = isos/linux/RHEL-6.0-x86_64-DVD.iso../.
md5sum_cd1 = f7141396c6a19399d63e8c195354317d
md5sum_1m_cd1 = b060eeef63e2c8700db54ae02056e80c
9. run ../../common_lib/cartesian_config.py control --verbose
if your setup is fine, dictionaries will get generated.
10. run your basic guest install test:
../../bin/autotest control --verbose
For more details:
http://www.linux-kvm.org/page/KVM-Autotest
Avocado and Avocado-VT are the current community projects that have come from a long heritage, including virt-test and KVM-Autotest.
ReplyDeleteAvocado is a generic testing framework, while Avocado-VT adds support for Virtualization testing (a continuation of virt-test).
To get started with Avocado-VT please visit:
http://avocado-vt.readthedocs.io
https://github.com/avocado-framework/avocado-vt
To learn more about Avocado please visit:
http://avocado-framework.readthedocs.io
https://github.com/avocado-framework/avocado