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

Lukáš Doktor ldoktor at redhat.com
Thu Jun 30 12:18:09 UTC 2016


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
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20160630/48d57e64/attachment.sig>


More information about the Avocado-devel mailing list