Project

General

Profile

Actions

action #101015

closed

[tools][sle][x86_64][aarch64][QEMUTPM] can openqa create swtpm device automatically? size:M

Added by rfan1 about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-09-16
Due date:
2021-11-26
% Done:

0%

Estimated time:

Description

Hello openQA experts:

Observation

I tried to boot a vm with swtpm device attached, however, it reported error msg "[2021-10-15T05:01:44.346271+02:00] [warn] !!! : qemu-system-x86_64: -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock: Failed to connect socket /tmp/mytpm1/swtpm-sock: No such file or directory"

Acceptance criteria

  • AC1: qemu tpm device is created automatically

https://openqa.suse.de/tests/7422844#details

Steps to reproduce

1) re-run a job with "QEMUTPM"=1
openqa-clone-job --from http://openqa.suse.de --skip-deps --host http://openqa.suse.de 7369899 --apikey "xxx" --apisecret "xxx" --skip-download _GROUP=0 EXCLUDE_MODULES=openssl_alpn,build_hdd QEMUTPM=1

2) We can hit the issue mentioned above

Problem

As described in https://github.com/os-autoinst/os-autoinst/blob/master/doc/backend_vars.asciidoc
Configure VM to use a TPM emulator device, with appropriate args for the arch. sysadmin is responsible for running swtpm with a socket at /tmp/mytpmX, where X is the value of QEMUTPM or the worker instance number if QEMUTPM is set to 'instance'

However, IMO, the job should be assigned a random worker to run. we need have to configure a swtpm device there before start my job. at the same time, I may need swtpm 1.2 or swtpm 2.0 device based on the test requirement.

Suggestion

Workaround

n/a

Can someone help take a look at this issue?

Actions

Also available in: Atom PDF