On Thu, Mar 14, 2013 at 10:42 PM, Chris Evich <[email protected]> wrote:
> On 03/14/2013 07:42 AM, lei yang wrote: > >> Hi Chris >> >> I have boot well with my custom img (my kernel and rootfs) with qemu test, >> now I want to try libvirt test, I have some question, can you help me? >> > > This should be possible, though I have not tried it using the test runner, > only the autotest client and using a custom libvirt/cfg/tests.cfg > > > 1) Firstly I just tried Jeos for it I get below error, it seems I need >> some >> extra steps to do before testing? >> > > Did you run libvirt/get_started.py? > > > >> #run -t libvirt >> .................... >> .................... >> Command</usr/bin/virsh undefine virt-tests-vm1> failed, rc=1, Command >> returned non-zero exit status >> * Command: >> /usr/bin/virsh undefine virt-tests-vm1 >> Exit status: 1 >> Duration: 0.00803685188293 >> >> stderr: >> error: failed to get domain 'virt-tests-vm1' >> error: Domain not found: no domain with matching name 'virt-tests-vm1' >> > > I would need more context to see why this particular test is failing. The > default set when you run 'run -t libvirt' should start with: > > # ./run -t libvirt > SETUP: PASS (1.64 s) > DATA DIR: /var/lib/virt_test > DEBUG LOG: /usr/local/autotest/client/**tests/virt/logs/run-2013-03-** > 14-09.50.43/debug.log > TESTS: 28 > (1/28) unattended_install.import.**import: PASS > ... > (28/28) remove_guest.without_disk: PASS (10.38 s) > > Which creates a new guest named 'virt-tests-vm1' and attaches it to the > uncompressed JeOS image. The last test removes the guest definition, but > leaves the image in place. > > Which branch are you running from? > > master branch (latest) on my ubuntu host lyang001@lyang001-OptiPlex-9010:~/local-autotest/virt-test$ ./libvirt/get_started.py 23:32:49 INFO | libvirt test config helper 23:32:49 INFO | 23:32:49 INFO | 1 - Checking the mandatory programs and headers 23:32:49 INFO | /usr/bin/7za 23:32:49 INFO | /usr/sbin/tcpdump 23:32:49 INFO | /bin/nc 23:32:49 INFO | /bin/ip 23:32:49 INFO | /usr/bin/arping 23:32:49 INFO | 23:32:49 INFO | 2 - Checking the recommended programs 23:32:49 INFO | /usr/bin/virsh 23:32:49 INFO | /usr/bin/virt-install 23:32:49 INFO | 23:32:49 INFO | 3 - Verifying directories 23:32:49 INFO | 23:32:49 INFO | 4 - Generating config set 23:32:49 INFO | Filtering out cfg b/c matches cfg 23:32:49 INFO | Filtering out /home/lyang001/local-autotest/virt-test/libvirt/tests/__init__.py b/c matches __init__ 23:32:49 INFO | Filtering out cfg b/c matches cfg 23:32:49 INFO | Filtering out /home/lyang001/local-autotest/virt-test/tests/__init__.py b/c matches __init__ 23:32:49 INFO | 23:32:49 INFO | 5 - Verifying (and possibly downloading) guest image 23:32:49 INFO | Verifying expected SHA1 sum from http://lmr.fedorapeople.org/jeos/SHA1SUM 23:32:51 INFO | Expected SHA1 sum: e240bb79f29ccba0b927b9a31789a43080379471 23:32:51 INFO | Found /home/lyang001/local-autotest/virt-test/shared/data/images/jeos-17-64.qcow2.7z 23:32:52 INFO | SHA1 sum check OK 23:32:52 INFO | /home/lyang001/local-autotest/virt-test/shared/data/images/jeos-17-64.qcow2.7z present, with proper checksum lyang001@lyang001-OptiPlex-9010:~/local-autotest/virt-test$ ./run -t libvirt SETUP: PASS (1.50 s) DATA DIR: /home/lyang001/virt_test DEBUG LOG: /home/lyang001/local-autotest/virt-test/logs/run-2013-03-14-23.33.03/debug.log TESTS: 28 (1/28) unattended_install.import.import: ERROR (3.82 s) (2/28) virsh_domname.vm_state.vm_running.with_valid_option.domid: ERROR (0.15 s) (3/28) virsh_domname.vm_state.vm_running.with_valid_option.uuid: ERROR (0.12 s) (4/28) virsh_domname.vm_state.vm_running.with_invalid_option.none: ERROR (0.11 s) (5/28) virsh_domname.vm_state.vm_running.with_invalid_option.hex_domid: ERROR (0.10 s) (6/28) virsh_domname.vm_state.vm_running.with_invalid_option.invalid_domid: ERROR (0.11 s) (7/28) virsh_domname.vm_state.vm_running.with_invalid_option.invalid_uuid: ERROR (0.16 s) (8/28) virsh_domname.vm_state.vm_running.with_invalid_option.addition_invalid_param: ERROR (0.16 s) (9/28) virsh_domname.vm_state.vm_running.with_invalid_option.vm_name: ERROR (0.16 s) (10/28) virsh_domname.vm_state.vm_paused.with_valid_option.domid: ERROR (0.11 s) (11/28) virsh_domname.vm_state.vm_paused.with_valid_option.uuid: ERROR (0.11 s) (12/28) virsh_domname.vm_state.vm_paused.with_invalid_option.none: ERROR (0.13 s) (13/28) virsh_domname.vm_state.vm_paused.with_invalid_option.hex_domid: ERROR (0.14 s) (14/28) virsh_domname.vm_state.vm_paused.with_invalid_option.invalid_domid: ERROR (0.14 s) (15/28) virsh_domname.vm_state.vm_paused.with_invalid_option.invalid_uuid: ERROR (0.16 s) ................................................ ................................................ lyang001@lyang001-OptiPlex-9010:~/local-autotest/virt-test$ ./run -t libvirt --tests "unattended_install.import.import" SETUP: PASS (1.50 s) DATA DIR: /home/lyang001/virt_test DEBUG LOG: /home/lyang001/local-autotest/virt-test/logs/run-2013-03-14-23.33.56/debug.log TESTS: 1 (1/1) unattended_install.import.import: ERROR (1.28 s) TOTAL TIME: 1.28 s TESTS PASSED: 0 TESTS FAILED: 1 SUCCESS RATE: 0.00 % I filed https://github.com/autotest/virt-test/issues/239, home we have a workaround, I think someone should worked it before, this should be frequntly used I think > Does this work: > # ./run -t libvirt --tests "unattended_install.import.**import" ? > > > 2) if I use my custom kernel.img and rootfs.img, is there another other >> config for this? eg: xml for the guest. and then virsh start the guest >> manually? or simple way than this I don't know >> > > We have support for many other OS types and versions, however they're all > intended to be installed under test control (which builds a virt-install > command). This helps to ensure that libvirt's guest hardware definition > matches what the image is setup for. > > You can get around this to a degree with the unattended_install.import > variants, but the boot loader, kernel, and initrd would all need to be > embedded within the image We don't yet have support for specifying a > custom kernel, initrd, and/or rootfs image to virt-install outside the > context of an installer (i.e. the scope of the 'kernel' & 'initrd' param's.) > > That said, support for newer virt-install's --boot option would be a nice > feature to have. You're welcome to open a feature/enhancement issue and > add it to this tracking issue: https://github.com/autotest/** > virt-test/issues/64 <https://github.com/autotest/virt-test/issues/64> or > add it yourself. I believe it would just need some new parsing logic added > to libvirt_vm's make_create_command() method and a new parameter to alter > the scope of the 'kernel' & 'initrd' parameters. > > -- > Chris Evich, RHCA, RHCE, RHCDS, RHCSS > Quality Assurance Engineer > e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 >
_______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
