[Avocado-devel] How to create a s390-virtio image.

Wei WA Li liwbj at cn.ibm.com
Thu Jun 30 13:36:23 UTC 2016


Hi Lukáš,


Thank you for your information, I will try later.

I saw your commands are execution about qemu, I want to test libvirt as
below.

avocado run --vt-type libvirt --vt-guest-os=Linux.Ubuntu.14.04.3-server.x86_64.i440fx type_specific.io-github-autotest-libvirt.virsh.reset.negative_test.readonly


1) I found all of images from avocado list --vt-type libvirt are i440fx. Is
this only one choice we can use now?
   But above command can be executed successfully, but I am not sure how
avocado libvirt use this paramter of i440fx and whether it is necessary for
libvirt test.


2) How can I added a new image to list? I have added Ubuntu.16.04 info to
16.04-server.s390x.cfg and it had added to guest-os.cfg.
   But Ubuntu.16.04 can not show on avocado list. I want to add a image as
Linux.Ubuntu.16.04-server.x86_64.s390-virtio





Best regards,
-
Li, Wei (李 伟)
zKVM Solution Test
IBM China Systems & Technology Lab, Beijing
E-Mail: liwbj at cn.ibm.com
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




From:	Lukáš Doktor <ldoktor at redhat.com>
To:	Wei WA Li/China/IBM at IBMCN, Avocado-devel at redhat.com
Date:	2016/06/30 20:18
Subject:	Re: How to create a s390-virtio image.



Hello Wei,

this is an issue quite high on our todo list. The `avocado list` does
not support `--vt-arch`, nor `--vt-machine-type` and simply assumes the
default (x86_64). Anyway the `run` command does support
`--vt-machine-type s390-virtio --vt-arch 390x`.

My workflow to install the F23 guest on RHEL7 host is (non-optimized):

```bash
# Install qemu
git clone https://github.com/qemu/qemu.git --recursive
cd qemu
yum install zlib-devel glib2-devel -y
CXFLAGS="-lrt" CFLAGS="-lrt" QEMU_CFLAGS="-lrt" ./configure
--target-list="s390x-softmmu" --enable-kvm
make -j 3
make install

# Install avocado
git clone https://github.com/avocado-framework/avocado.git
git clone https://github.com/avocado-framework/avocado-vt.git

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

cd avocado
yum install python-devel libvirt-python libvirt -y
make requirements
cd ../avocado-vt
make requirements
cd -
make install
cd -
make install
yum install tcpdump -y
avocado vt-bootstrap --vt-guest-os Fedora.23

# Playing with it
# Try running boot (should fail as there is no image)
avocado run --vt-guest-os Fedora.23 --vt-arch s390x --vt-machine-type
s390-virtio --vt-qemu-bin /usr/local/bin/qemu-system-s390x boot
# Install it
yum install genisoimage
mkdir  /usr/share/avocado/data/avocado-vt/isos/linux
wget
https://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/s390x/iso/Fedora-Server-DVD-s390x-23.iso

-O
/usr/share/avocado/data/avocado-vt/isos/linux/Fedora-Server-DVD-s390x-23.iso

modprobe kvm
avocado run --vt-guest-os Fedora.23 --vt-arch s390x --vt-machine-type
s390-virtio --vt-qemu-bin /usr/local/bin/qemu-system-s390x
unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads
--show-job-log
# And now we can run it (or any other test)
avocado run --vt-guest-os Fedora.23 --vt-arch s390x --vt-machine-type
s390-virtio --vt-qemu-bin /usr/local/bin/qemu-system-s390x boot
```

I'm sorry for confusion, we plan to add the `arch/machine` to the `list`
commands too.

Kind regards,
Lukáš

Dne 30.6.2016 v 10:39 Wei WA Li napsal(a):
> Hi all,
>
> I am testing libvirt test case on s390x now, I found all of guest are
> i440fx machine_type.
> How can I create a s390-virtio image? Which cfg file I need to modify?
> Thanks in advance.
>
>
> [root at zs95kv2 guests]# avocado list --vt-type libvirt --vt-list-guests
> ......
> Linux.Ubuntu.12.04-server.i386.i440fx (missing
ubuntu-12.04-server-32.qcow2)
> Linux.Ubuntu.12.04-server.x86_64.i440fx (missing
> ubuntu-12.04-server-64.qcow2)
> Linux.Ubuntu.14.04-server.i386.i440fx (missing
ubuntu-14.04-server-32.qcow2)
> Linux.Ubuntu.14.04-server.x86_64.i440fx (missing
> ubuntu-14.04-server-64.qcow2)
> Linux.Ubuntu.14.04.1-server.i386.i440fx (missing
> ubuntu-14.04.1-server-32.qcow2)
> Linux.Ubuntu.14.04.1-server.x86_64.i440fx (missing
> ubuntu-14.04.1-server-64.qcow2)
> 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
>
>
> [root at zs95kv2 guests]# avocado list --vt-type libvirt --vt-list-guests
> --vt-machine-type s390-virtio
> Searched /usr/share/avocado/data/avocado-vt/images for guest images
>
> Available guests in config:
>
> [root at zs95kv2 guests]#
>
>
>
> Best regards,
> -
> Li, Wei (李 伟)
> zKVM Solution Test
> IBM China Systems & Technology Lab, Beijing
> E-Mail: liwbj at cn.ibm.com
> 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
>

[附件 "signature.asc" 被 Wei WA Li/China/IBM 删除]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20160630/2fc03175/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20160630/2fc03175/attachment.gif>


More information about the Avocado-devel mailing list