单独使用client的步骤
1) http://iamspk.blogspot.com/2011/05/kvm-autotest.html
apt-get install qemu qemu-kvm libvirt-bin
KVM Autotest Autotest is a framework for fully automated testing. It is designed primarily to +test the Linux kernel, though it is useful for many other functions such as +qualifying new hardware. It's an open-source project under the GPL and is used +and developed by a number of organizations,including Google, IBM, Red Hat, and +many others.
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= bs=1M count=1| md5sum
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
11. 查看测试结果
https://github.com/autotest/autotest/wiki/KVMAutotest-GetStartedClient checking result
1. client/results/default/job_report
2. ../../tools/scan_results.py
3. client/results/default/testname/debug
For more details:
http://www.linux-kvm.org/page/KVM-Autotest
2) http://www.linux-kvm.org/page/KVM-Autotest
在client端用自己的kernel来启动
3) 怎么样用autotest跑自己的kernel
在guest-os.cfg中加,或者改
- 6.1.i386:
使用server
1)安装autotest server 在ubuntu 11.04
https://github.com/autotest/autotest/wiki/AutotestServerInstall
apt-get install gfortran
apt-get install python-dev fort77
apt-get install f2c
apt-get build-dep python-numpy
apt-get install python-numpy
a2enmod rewrite
2)在fedora上安装
https://github.com/autotest/autotest/wiki/KVMAutotest-GetStartedServer
添加测试用例
/usr/local/autotest/utils/test_importer.py -A
把schedule作为一个service
cp /usr/local/autotest/utils/autotest-rh.init /etc/init.d/autotestd chkconfig --add /etc/init.d/autotestd service autotestd start
在fedora上用autotest-rh.init, 在ubuntu上用autotest.init。