Dne 15.3.2016 v 11:10 Zhangbo (Oscar) napsal(a):
Hi all:
    I tried to run libvirt-backended avocado-vt on my server, but failed. (this 
server is older than my last one, which was succeed in running avocado-vt 
tests.)
    Because I'm using fedora 19 as the guesOS, but my libosinfo just support 
fedora17.

----------------------
Detailed problem info:
1
linux-WRGNgW:/mnt/zwl/zhangbo/libosinfo-0.2.0 # avocado run 
io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native
 io-github-autotest-libvirt.virsh.create.none remove_guest.without_disk 
--vt-type libvirt --vt-guest-os JeOS.19
JOB ID     : 0521db48a53eaae83e9947e2d4d5eef072bae425
JOB LOG    : /root/avocado/job-results/job-2016-03-15T17.55-0521db4/job.log
TESTS      : 3
  (1/3) 
io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native:
 SKIP  //SKIPPED
  (2/3) type_specific.io-github-autotest-libvirt.virsh.create.none: ERROR
  (3/3) io-github-autotest-libvirt.remove_guest.without_disk: ERROR
RESULTS    : PASS 0 | ERROR 2 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0
JOB HTML   : 
/root/avocado/job-results/job-2016-03-15T17.55-0521db4/html/results.html
TIME       : 5.59 s

2
2016-03-15 17:56:03,240 test             L0511 ERROR| SKIP 
io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native
 -> TestSkipError: Unsupported OS variant: fedora19.
Supported variants:  Short ID
centos6.0
  centos6.1
  debian1.0
........
  fedora14
  fedora15
  fedora16
  fedora17  //no fedora 19.
  fedora2
  fedora3
  fedora4
  fedora5
......
Well basically the supported OS variant is here only to optimize libvirt/qemu setting (caches, drives, defaul cpus, default mem) and it's not really mandatory. One can use "fedora-unknown" or whatever supported version ("fedora16") and the fedora 19 should work properly.

Simple answer
-------------

To avoid this problem you need to tell avocado to use fedora17 libvirt profile. You can do this from the command line using "--vt-extra-params os_variant=fedora17":

$ avocado run io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native io-github-autotest-libvirt.virsh.create.none remove_guest.without_disk --vt-type libvirt --vt-guest-os JeOS.19 --vt-extra-params os_variant=fedora17


Proper answer
-------------

The os_variant is mapped by configuration files. The JeOS.19 one is in $avocado-vt/shared/cfg/guest-os/Linux/Fedora/19

so feel free to replace the "os_variant = fedora19" with "os_variant = fedora17" and run without any modifications on the command line. You can do the same for all other images.


3
It's because osinfo-query on my server is 0.1.2, too old to support fedora19
: osinfo-query os --fields short-id

4
I could not update my libosinfo, because glib2 is too old here, it's of version 2.22, 
which has no symbol named " g_list_free_full ", that's needed by higher-version 
libosinfo.

-----------------------------




So, I tried to get qcow2 imgs of fedora17, but I still failed. The steps are as 
follows:
1
Goto: 
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/LiveOS/
To download the image of fedora17
This image will most certainly not work. Easier way to get freshly installed image is to use "avocado run unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads --vt-guest-os XXX" where you specify the desired guest-os and avocado will run kickstart installation for you using qemu.


2 convert it to qcow2
qemu-img convert -f raw ./squashfs.img -O qcow2 
/usr/share/avocado/data/avocado-vt/images/jeos-17-64.qcow2

3 backup it and zip it:
a. cp /usr/share/avocado/data/avocado-vt/images/jeos-17-64.qcow2 
/usr/share/avocado/data/avocado-vt/images/jeos-17-64.qcow2.backup
b. 7za a /usr/share/avocado/data/avocado-vt/images/jeos-17-64.qcow2.7z 
/usr/share/avocado/data/avocado-vt/images/jeos-17-64.qcow2

4 run avocado-vt test, but failed..
linux-WRGNgW:/mnt/zwl/zhangbo/libosinfo-0.2.0 # avocado run 
io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native
 io-github-autotest-libvirt.virsh.create.none remove_guest.without_disk 
--vt-type libvirt --vt-guest-os JeOS.17
All guest os' are defined in the config files (as mentioned earlier). You can add any distribution by copying similar profile and changing the names. But it's probably easier to use the profile and put the image of the resulting name in place. There is no verification.

Test discovery plugin <avocado_vt.loader.VirtTestLoader object at 0x1d7f490> 
failed: option --vt-guest-os 'JeOS.17' is not on the known guest os for arch 'None' 
and machine type 'i440fx'. (see --vt-list-guests)
Test discovery plugin <avocado_vt.loader.VirtTestLoader object at 0x1d7f490> 
failed: option --vt-guest-os 'JeOS.17' is not on the known guest os for arch 'None' 
and machine type 'i440fx'. (see --vt-list-guests)
Test discovery plugin <avocado_vt.loader.VirtTestLoader object at 0x1d7f490> 
failed: option --vt-guest-os 'JeOS.17' is not on the known guest os for arch 'None' 
and machine type 'i440fx'. (see --vt-list-guests)

Unable to discover url(s) 
'io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native',
 'io-github-autotest-libvirt.virsh.create.none', 'remove_guest.without_disk' 
with loader plugins(s) 'file', 'vt', 'external', try running 'avocado list -V 
io-github-autotest-qemu.unattended_install.import.import.default_install.aio_native
 io-github-autotest-libvirt.virsh.create.none remove_guest.without_disk' to see 
the details.

5 list guests, fedora17 is not in the list.
#avocado list --vt-list-guests
Windows.Win7.i386.sp1.i440fx ESC[93m(missing win7-32-sp1.qcow2)ESC[0m
Windows.Win7.x86_64.sp0.i440fx
Windows.Win7.x86_64.sp1.i440fx ESC[93m(missing win7-64-sp1.qcow2)ESC[0m
........
Linux.Fedora.16.i386.i440fx ESC[93m(missing f16-32.qcow2)ESC[0m
Linux.Fedora.16.x86_64.i440fx ESC[93m(missing f16-64.qcow2)ESC[0m
Linux.Fedora.17.i386.i440fx ESC[93m(missing f17-32.qcow2)ESC[0m
Linux.Fedora.17.x86_64.i440fx ESC[93m(missing f17-64.qcow2)ESC[0m
Linux.Fedora.18.i386.i440fx ESC[93m(missing f18-32.qcow2)ESC[0m
Linux.Fedora.18.x86_64.i440fx ESC[93m(missing f18-64.qcow2)ESC[0m
Linux.Fedora.19.i386.i440fx ESC[93m(missing f19-32.qcow2)ESC[0m
Linux.Fedora.19.x86_64.i440fx ESC[93m(missing f19-64.qcow2)ESC[0m
.......
Linux.CentOS.6.6.i386.i440fx ESC[93m(missing centos66-32.qcow2)ESC[0m
Linux.CentOS.6.6.x86_64.i440fx ESC[93m(missing centos66-64.qcow2)ESC[0m
Linux.JeOS.19.x86_64.i440fx
Linux.JeOS.20.x86_64.i440fx ESC[93m(missing jeos-20-64.qcow2)ESC[0m
Linux.JeOS.21.x86_64.i440fx
Linux.RHEL.7.1.x86_64.i440fx ESC[93m(missing rhel71-64.qcow2)ESC[0m
Linux.RHEL.5.4.i386.i440fx ESC[93m(missing rhel54-32.qcow2)ESC[0m
Linux.RHEL.5.4.x86_64.i440fx ESC[93m(missing rhel54-64.qcow2)ESC[0m
Linux.RHEL.6.4.i386.i440fx ESC[93m(missing rhel64-32.qcow2)ESC[0m
......

I saw Jeos19 and Jeos21 available, but Jeos17 is not.
Yes, not all versions were produced. Btw with JeOS you have only limited set of tests available so it's better to use full "fedora.XX" version (or centos). As mentioned earlier, there is no verification so simply putting the image of the right name into the right location makes the image available for testing.



---------------------





So, How can I get fedora17(Jeos17) qcow2 image to be recognized by avocado-vt?

Thanks in advance.

Oscar.




_______________________________________________
Avocado-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/avocado-devel


_______________________________________________
Avocado-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/avocado-devel

Reply via email to