Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported machine type pc. #512

Closed
liwbj opened this issue May 16, 2016 · 13 comments
Closed

Unsupported machine type pc. #512

liwbj opened this issue May 16, 2016 · 13 comments

Comments

@liwbj
Copy link
Contributor

liwbj commented May 16, 2016

Hi all,

I'm trying to follow avocado-vt guild to run a basic test script and found an error as below.

[root@zs95kv2 avocado]# ./scripts/avocado run type_specific.io-github-autotest-qemu.migrate.default.tcp
JOB ID : 8fb42a7777b8f3f1a20c52af6fde360f5a11d1d8
JOB LOG : /root/avocado/job-results/job-2016-05-16T02.28-8fb42a7/job.log
TESTS : 1
(1/1) type_specific.io-github-autotest-qemu.migrate.default.tcp: SKIP
RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0
JOB HTML : /root/avocado/job-results/job-2016-05-16T02.28-8fb42a7/html/results.html
TIME : 5.72 s
[root@zs95kv2 avocado]#

2016-05-13 18:08:15,028 stacktrace L0039 ERROR| Reproduced traceback from: /avocado/avocado-vt/avocado_vt/test.py:393
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| Traceback (most recent call last):
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/avocado_vt/test.py", line 169, in runTest
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| self._runTest()
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/avocado_vt/test.py", line 301, in _runTest
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| params = env_process.preprocess(self, params, env)
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/error_context.py", line 135, in new_fn
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| return fn(_args, *_kwargs)
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/env_process.py", line 838, in preprocess
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| process(test, params, env, preprocess_image, preprocess_vm)
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/env_process.py", line 547, in process
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| _call_vm_func()
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/env_process.py", line 516, in _call_vm_func
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| vm_func(test, vm_params, env, vm_name)
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/env_process.py", line 184, in preprocess_vm
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| migration_exec_cmd=params.get("migration_exec_cmd_dst"))
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/error_context.py", line 135, in new_fn
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| return fn(_args, *_kwargs)
2016-05-13 18:08:15,030 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/qemu_vm.py", line 2505, in create
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| self.devices = self.make_create_command()
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/qemu_vm.py", line 1303, in make_create_command
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| devs = devices.machine_by_params(params)
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| File "/avocado/avocado-vt/virttest/qemu_devices/qcontainer.py", line 992, in machine_by_params
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| (machine_type))
2016-05-13 18:08:15,031 stacktrace L0042 ERROR| TestSkipError: Unsupported machine type pc.
2016-05-13 18:08:15,031 stacktrace L0043 ERROR|
2016-05-13 18:08:15,031 test L0567 ERROR| SKIP 1-type_specific.io-github-autotest-qemu.migrate.default.tcp -> TestSkipError: Unsupported machine type pc.

I found machine type is pc on the error log, but I got vt.common.machine_type info as a blank.... I'm not sure whether they should be same.
And do you have any idea to solve this problem? or do I need to set some cfg for this parameter? Thank you very much

2016-05-16 02:28:19,000 job L0405 INFO | gdb.paths.gdb /usr/bin/gdb
2016-05-16 02:28:19,000 job L0405 INFO | gdb.paths.gdbserver /usr/bin/gdbserver
2016-05-16 02:28:19,000 job L0405 INFO | vt.setup.backup_image_before_test True
2016-05-16 02:28:19,000 job L0405 INFO | vt.setup.restore_image_after_test True
2016-05-16 02:28:19,000 job L0405 INFO | vt.setup.keep_guest_running False
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.data_dir
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.type_specific_only False
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.mem 1024
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.arch
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.machine_type
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.nettype
2016-05-16 02:28:19,000 job L0405 INFO | vt.common.netdst virbr0
2016-05-16 02:28:19,000 job L0405 INFO | vt.qemu.qemu_bin
2016-05-16 02:28:19,000 job L0405 INFO | vt.qemu.qemu_dst_bin

@xutian
Copy link

xutian commented May 16, 2016

can you show me output of command qemu-kvm -M \?

@liwbj
Copy link
Contributor Author

liwbj commented May 16, 2016

[root@zs95kv2 downloads]# 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
[root@zs95kv2 downloads]#

@xutian
Copy link

xutian commented May 16, 2016

base on above ouput, I think you should tell avocado-vt your machine type you want to test via '--vt-machine-type'. so command line like:

./scripts/avocado run --vt-machine-type=s390-ccw-kvmibm-1.1.1 type_specific.io-github-autotest-qemu.migrate.default.tcp --show-job-log

@liwbj
Copy link
Contributor Author

liwbj commented May 16, 2016

Got a new error.

[root@zs95kv2 avocado]# ./scripts/avocado run --vt-machine-type=s390-ccw-kvmibm-1.1.1 type_specific.io-github-autotest-qemu.migrate.default.tcp
Test discovery plugin <avocado_vt.loader.VirtTestLoader object at 0x976e37b8> failed: option --vt-guest-os 'JeOS.23' is not on the known guest os for arch 'None' 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 'avocado list -V type_specific.io-github-autotest-qemu.migrate.default.tcp' to see the details.
[root@zs95kv2 avocado]#

@xutian
Copy link

xutian commented May 16, 2016

We are no JeOS guest configuration for s390 and I double checked guest-os.cfg found there no s390 releated configuration for other OS. so that's mean S390 guest not supported now.

Thanks,
Xu

@xutian
Copy link

xutian commented May 16, 2016

@clebergnu do we have plan to add configuration and images for JeOS for s390?

Thanks,
Xu

@liwbj
Copy link
Contributor Author

liwbj commented May 16, 2016

This is kind of Linux like environment and which is not released officially now.
For testing and supporting by avocado-vt, which sources codes or cfgs file I need to modify?

@xutian
Copy link

xutian commented May 16, 2016

First, you need to add guest OS configuration under avocado-vt/shared/cfg/guest-os/

@liwbj
Copy link
Contributor Author

liwbj commented May 16, 2016

Are there any reference or material for how to add OS configuration?

@liwbj
Copy link
Contributor Author

liwbj commented May 18, 2016

Is there anyone can give me some comments for this problem? I did some investigation, but not workable. Which part of source I need to modify?

@clebergnu
Copy link
Contributor

@xutian @liwbj we have added these:

https://trello.com/c/zcjDRynf/711-jeos-image-for-other-architectures
https://trello.com/c/beqaOPs6/712-run-the-same-test-set-on-multiple-architectures

To our planning tool. Both are related to your request.

If you want to add another Guest OS, you can follow something along the lines of this commit: 67d0b3c

@ldoktor
Copy link
Contributor

ldoktor commented May 31, 2016

Hello @liwbj,

first thank you for you effort on porting avocado-vt on s390. Currently we are not planning to support it, but that was the same story about arm, ~2 years ago and now it's out there, mostly working and used every day.

Regarding new architectures, it's not an easy task, you can inspire by arm, which had been added in autotest/virt-test#2030 most important commit is: 2547560

Basically you need to add new machine type in shared/cfg/machines.cfg and add at least one compatible guest os in shared/cfg/guest-os/.... Then you need to define this type of machine in virttest/qemu_devices/qcontainer, which defines the buses available for devices. In case s390 is not compatible (enough) with pci-based representation, you could use the QNoAddrCustomBus arm-mmio is using. Additionally you might need to adjust shared/cfg/guest-hw.cfg to use compatible disk drives, if necessary. Remember you need to re-run avocado vt-bootstrap after each cfg modification (I'm using avocado vt-bootstrap --vt-guest-os RHEL.7.devel to avoid the 7za check and JeOS decompression).

With the above avocado-vt should be able to construct a cmdline, which might or might not work. Important is it should log the cmdline. Then you can start adjusting virttest/qemu_vm.py and eventually other files to make avocado-vt to create the correct, working qemu command.

I'd like to encourage you to send even beta versions as PR. You can mention they are not intended for inclusion, but you can (not necessary means you will) get some feedback or suggestions.

Regarding the development process (I'm not sure how much you played with avocado-vt so feel free to ignore those) I'd suggest putting all the hacks needed to run on s390 into the virttest/qemu_devices/qcontainer machine definition and during development using --vt-extra-params to override params like usbs, machine_type, ... (the difference between --vt-extra-params and --vt-machine-type is that --vt-extra-params directly overrides the test params, while the --vt-machine-type sets cartesian config filters. So for example you could run --vt-machine-type pseries and override the machine_type to pc or host.

PS: Regarding guest-os, take a look at shared/cfg/guest-os/Linux/RHEL/7.devel/*. By diffing the x86_64, ppc64 and aarch64 configs you can learn about the necessary changes. I'd suggest using any of them and simply put an existing image into the right location and focus on the unattended_install test later as it requires additional details like where the vmlinuz is located, ks, ...
PPS: Once again, you need to re-run vt-bootstrap after each shared/cfg modification. I know what I'm talking about...

@liwbj
Copy link
Contributor Author

liwbj commented May 31, 2016

Thank you. I did some try now, and trying to modify virttest/qemu_vm.py

@liwbj liwbj closed this as completed May 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants