Project

General

Profile

action #101015

Updated by rfan1 about 3 years ago

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" C037781555F1834F    --apisecret "xxx" 74D526A7E0B5D811    --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 
 - Create the swtpm device automatically once "QEMUTPM" is defined 
 - Delete exposed credentials and inform the user 
 - Follow steps in https://en.opensuse.org/Software_TPM_Emulator_For_QEMU 

 ## Workaround 
 n/a 

 Can someone help take a look at this issue?

Back