Hello Wei,

I'm sorry for neglecting this email-thread for so long, I was active only on GH. Let me answer some of your questions in line.

Dne 19.5.2016 v 07:29 Wei WA Li napsal(a):
I have found a way to upload images, and upload our Ubuntu images.
Upload to the host machine? Great, for testing that's the best start. You can use any similar `Ubuntu` release and add the s390 variant.


[root@zs95kv2 images]# /avocado/avocado/scripts/avocado list --vt-type
qemu --vt-list-guests
once you add the `machine` types I mentioned in PR, you should be using `--vt-machine-type s390` to check images of your architecture.

....
Linux.Ubuntu.14.04.3-server.i386.i440fx (missing
ubuntu-14.04.3-server-32.qcow2)
*Linux.Ubuntu.14.04.3-server.x86_64.i440fx*
Linux.Debian.6.0.7.x86_64.i440fx (missing debian-6-0-7-64.qcow2)
....

But how to enable it on our s390x platform?
Basically you need to add the s390 variant in `avocado-vt/shared/cfg/guest-os/Linux/Ubuntu/14.04.3-server.*.cfg`. For start check the differences getween the available i386 and x86_64 and try to adjust it to s390. Most of the entries are related to `unattended_install` test, but for start I'd avoid trying to set everything right. Important is to make `boot` test work, then you can start exploring what is needed for `unattended_install` (usually vmlinuz location and some kernel options).

Don't forget to re-run `avocado vt-bootstrap` after each change in `guest-os` to propagate the changes to your system. (I'd recommend `avocado vt-bootstrap --vt-guest-os RHEL.7.devel --vt-no-downloads` to speedup the process. It does not matter which guest-os you run afterwards, but choosing a distro which does not have asset file associated speedups the bootstrap significantly.


Best regards,
-
Li, Wei (李 伟)
zKVM Solution Test
IBM China Systems & Technology Lab, Beijing
E-Mail: [email protected]
Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM
Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun Software Park,No.8
DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China


Inactive hide details for Wei WA Li---2016/05/19 12:59:16---Maybe I have
some misunderstanding? I read some source and I think Wei WA
Li---2016/05/19 12:59:16---Maybe I have some misunderstanding? I read
some source and I think I should add some guest informati

From: Wei WA Li/China/IBM
To: [email protected]
Date: 2016/05/19 12:59
Subject: Re: How to enable a new platform and Linux on avocado-vt?

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



Maybe I have some misunderstanding?
I read some source and I think I should add some guest information for
JeOS.23?
Yes, JeOS is currently only built for x86_64 and you can simply ignore it. To run on other architectures you need to always use `--vt-guest-os` or you can change the default in `/etc/avocado/...` config file.

But I think JeOS.23 is not supported by our platform, so should I uplado
an supported ubuntu to this server?
Where it should be located, I can't find any information about how to
upload new images. (except
http://avocado-vt.readthedocs.io/en/latest/WritingTests/DefiningNewGuests.html?highlight=guest)
And how to add our environment info to ubuntu cfg to make it be supported?
Honestly I never remember this. So what I usually do is I run `avocado run unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads --vt-guest-os ...`. It fails and gives you the file it was looking for. Then I use `wget ... -O ...` to put the image into the correct location with the right name.




[root@zs95kv2 Linux]# pwd
/avocado/avocado-vt/shared/cfg/guest-os/Linux
[root@zs95kv2 Linux]# ll
total 72
drwxr-xr-x. 4 root root 4096 May 11 04:45 CentOS
-rw-r--r--. 1 root root 416 May 11 04:45 CentOS.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 Debian
-rw-r--r--. 1 root root 275 May 11 04:45 Debian.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 Fedora
-rw-r--r--. 1 root root 1787 May 11 04:45 Fedora.cfg
drwxr-xr-x. 2 root root 4096 May 19 00:41 JeOS
-rw-r--r--. 1 root root 21 May 11 04:45 JeOS.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 LinuxCustom
-rw-r--r--. 1 root root 64 May 11 04:45 LinuxCustom.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 OpenSUSE
-rw-r--r--. 1 root root 549 May 11 04:45 OpenSUSE.cfg
drwxr-xr-x. 27 root root 4096 May 11 04:45 RHEL
-rw-r--r--. 1 root root 973 May 11 04:45 RHEL.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 SLES
-rw-r--r--. 1 root root 772 May 11 04:45 SLES.cfg
drwxr-xr-x. 2 root root 4096 May 19 00:44 Ubuntu
-rw-r--r--. 1 root root 361 May 11 04:45 Ubuntu.cfg
[root@zs95kv2 Linux]#
I'd suggest `$ tree`:

├── Linux
│   ├── CentOS
│   │   ├── 6.6
│   │   │   ├── i386.cfg
│   │   │   └── x86_64.cfg
│   │   ├── 6.6.cfg
│   │   ├── 7.0
│   │   │   └── x86_64.cfg
│   │   └── 7.0.cfg
│   ├── CentOS.cfg
│   ├── Debian
│   │   └── 6.0.7.x86_64.cfg
│   ├── Debian.cfg
│   ├── Fedora
│   │   ├── test.i386.cfg
│   │   ├── test.x86_64.cfg
│   │   ├── 10.i386.cfg
│   │   ├── 10.x86_64.cfg
...

All of these files are merged together to produce one huge chunk to be used. There are global defaults for Centos in CentOS.cfg, then version-specifics in `7.0.cfg` and per-arch specifics in `$machine_type.cfg`.

You might check the product in `~/avocado/data/avocado-vt/backends/qemu/cfg/guest-os.cfg`, which is the file used (when `qemu` provider is used) for guest-os definition. Keep in mind it's re-created on `vt-bootstrap` execution, so all changes should be made in `shared/cfg/guest-os`.



Best regards,
-
Li, Wei (李 伟)
zKVM Solution Test
IBM China Systems & Technology Lab, Beijing
E-Mail: [email protected]
Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM
Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun Software Park,No.8
DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China



Inactive hide details for Wei WA Li---2016/05/19 10:15:59---Add some
info. [root@zs95kv2 avocado]# cat /etc/*-releaseWei WA Li---2016/05/19
10:15:59---Add some info. [root@zs95kv2 avocado]# cat /etc/*-release

From: Wei WA Li/China/IBM
To: [email protected]
Date: 2016/05/19 10:15
Subject: Re: How to enable a new platform and Linux on avocado-vt?
------------------------------------------------------------------------


Add some info.


[root@zs95kv2 avocado]# cat /etc/*-release
KVM for IBM z Systems release 1.1.1 (Z)
KVM for IBM z Systems release 1.1.1 (Z)
NAME="KVM for IBM z Systems"
VERSION="1.1.1 (Z)"
ID="kvmibm"
ID_LIKE="rhel fedora"
VERSION_ID="1.1.1"
PRETTY_NAME="KVM for IBM z Systems 1.1.1 (Z)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:ibm:kvmibm:1.1.1"
BUILD_ID="20160309"
KVM for IBM z Systems release 1.1.1 (Z)

[root@zs95kv2 avocado]# uname -a
Linux zs95kv2 3.10.0-229.7.2.el7_1.kvmibm1_1_1.20.s390x #1 SMP Thu Mar
31 19:19:09 EDT 2016 s390x s390x s390x GNU/Linux
[root@zs95kv2 avocado]#
OK so the arch name should most probably be `s390x` to match the uname.



[root@zs95kv2 avocado]# qemu-kvm -M \?
Supported machines are:
none empty machine
s390-ccw-virtio-2.4 VirtIO-ccw based S390 machine v2.4
s390-ccw-kvmibm-1.1.0 KVM for IBM z Systems 1.1.0
s390-ccw-virtio KVM for IBM z Systems 1.1.1 (alias of s390-ccw-kvmibm-1.1.1)
s390-ccw-kvmibm-1.1.1 KVM for IBM z Systems 1.1.1 (default)
s390 VirtIO based S390 machine (alias of s390-virtio)
s390-virtio VirtIO based S390 machine

This is the `machine_type`. I'd suggest something like `s390-virtio` for now, which is quite similar to `arm64-mmio` version which is being used. It's not necessary to map the `machine_type` to the actual machine-type in qemu, though.

OK, hopefully it makes some things clearer,
best regards,
Lukáš


Best regards,
-
Li, Wei (李 伟)
zKVM Solution Test
IBM China Systems & Technology Lab, Beijing
E-Mail: [email protected]
Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM
Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun Software Park,No.8
DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China



Inactive hide details for Wei WA Li---2016/05/19 10:00:03---Hi all,
Could you help me to take a look for this issue? I am stillWei WA
Li---2016/05/19 10:00:03---Hi all, Could you help me to take a look for
this issue? I am still trying to do it, but I have no i

From: Wei WA Li/China/IBM
To: [email protected]
Date: 2016/05/19 10:00
Subject: How to enable a new platform and Linux on avocado-vt?
------------------------------------------------------------------------



Hi all,

Could you help me to take a look for this issue? I am still trying to do
it, but I have no idea about it. Thank you very much.
https://github.com/avocado-framework/avocado-vt/issues/512


I just installed avocado-vt on our s390x platform, the result is as below.

[root@zs95kv2 avocado]# ./scripts/avocado run
--vt-machine-type=s390-ccw-kvmibm-1.1.1
type_specific.io-github-autotest-qemu.migrate.default.tcp --show-g
Config file
/usr/share/avocado/data/avocado-vt/backends/qemu/cfg/guest-os.cfg auto
generated from guest OS samples
Config file
/usr/share/avocado/data/avocado-vt/backends/qemu/cfg/subtests.cfg auto
generated from subtest samples
Test discovery plugin <avocado_vt.loader.VirtTestLoader object at
0x917d17f0> failed: option --vt-guest-os 'JeOS.23' is not on the known
guest os for aone' and machine type 's390-ccw-kvmibm-1.1.1'. (see
--vt-list-guests)

Unable to discover url(s)
'type_specific.io-github-autotest-qemu.migrate.default.tcp' with loader
plugins(s) 'file', 'vt', 'external', try running 'avoist -V
type_specific.io-github-autotest-qemu.migrate.default.tcp' to see the
details.
[root@zs95kv2 avocado]#


s390x is our platfrom on Z mianframe, and I am trying to test it
virtualiztion functions by avocado. The relationship is as below.

s390 like X86
zLinux like Fedora
zKVM like KVM

So current avocado does not support our platfrom, I want to modify it
and contribute it.


Shoud I need to add some cfg here firstly?

[root@zs95kv2 Linux]# ll
total 72
drwxr-xr-x. 4 root root 4096 May 11 04:45 CentOS
-rw-r--r--. 1 root root 416 May 11 04:45 CentOS.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 Debian
-rw-r--r--. 1 root root 275 May 11 04:45 Debian.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 Fedora
-rw-r--r--. 1 root root 1787 May 11 04:45 Fedora.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 JeOS
-rw-r--r--. 1 root root 21 May 11 04:45 JeOS.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 LinuxCustom
-rw-r--r--. 1 root root 64 May 11 04:45 LinuxCustom.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 OpenSUSE
-rw-r--r--. 1 root root 549 May 11 04:45 OpenSUSE.cfg
drwxr-xr-x. 27 root root 4096 May 11 04:45 RHEL
-rw-r--r--. 1 root root 973 May 11 04:45 RHEL.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 SLES
-rw-r--r--. 1 root root 772 May 11 04:45 SLES.cfg
drwxr-xr-x. 2 root root 4096 May 11 04:45 Ubuntu
-rw-r--r--. 1 root root 361 May 11 04:45 Ubuntu.cfg
[root@zs95kv2 Linux]# pwd
/avocado/avocado-vt/shared/cfg/guest-os/Linux
[root@zs95kv2 Linux]#

Best regards,
-
Li, Wei (李 伟)
zKVM Solution Test
IBM China Systems & Technology Lab, Beijing
E-Mail: [email protected]
Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM
Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun Software Park,No.8
DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China




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


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to