stefanberger/swtpm

swtpm: SWTPM_NVRAM_Lock_Dir: Could not open lockfile: No such file or directory, swtpm: Error: Could not initialize libtpms.

Guenni01 opened this issue · 2 comments

Describe the bug

Installation went well, and tests go through.

SKIP: test_tpm2_vtpm_proxy
SKIP: test_vtpm_proxy
PASS: test_ctrlchannel3
PASS: test_ctrlchannel4
PASS: test_ctrlchannel2
PASS: test_commandline
PASS: test_ctrlchannel
PASS: test_getcap
PASS: test_hashing
PASS: test_hashing2
PASS: test_encrypted_state
PASS: test_init
PASS: test_locality
PASS: test_migration_key
PASS: test_resume_volatile
PASS: test_setbuffersize
PASS: test_save_load_encrypted_state
PASS: test_save_load_state
PASS: test_tpm_probe
SKIP: test_tpm12
PASS: test_volatilestate
PASS: test_print_capabilities
PASS: test_swtpm_bios
PASS: test_print_states
PASS: test_swtpm_setup_file_backend
SKIP: test_swtpm_setup_misc
PASS: test_tpm2_ctrlchannel2
PASS: test_wrongorder
PASS: test_swtpm_setup_overwrite
PASS: test_tpm2_init
PASS: test_tpm2_encrypted_state
PASS: test_tpm2_getcap
PASS: test_tpm2_file_permissions
PASS: test_tpm2_locality
PASS: test_tpm2_hashing
PASS: test_tpm2_hashing3
PASS: test_tpm2_derived_keys
SKIP: test_tpm2_partial_reads
PASS: test_tpm2_hashing2
PASS: test_tpm2_print_capabilities
PASS: test_tpm2_print_states
PASS: test_tpm2_migration_key
PASS: test_tpm2_savestate
PASS: test_tpm2_resume_volatile
SKIP: test_tpm2_save_load_state_2
SKIP: test_tpm2_save_load_state_2_linear
SKIP: test_tpm2_save_load_state_2_block
SKIP: test_tpm2_save_load_state_3
PASS: test_tpm2_save_load_state
PASS: test_tpm2_setbuffersize
PASS: test_tpm2_volatilestate
PASS: test_tpm2_wrongorder
PASS: test_tpm2_probe
PASS: test_tpm2_save_load_encrypted_state
SKIP: test_tpm2_ibmtss2
PASS: test_tpm2_swtpm_setup_overwrite
SKIP: test_samples_create_tpmca
PASS: test_swtpm_cert
PASS: test_tpm2_swtpm_bios
PASS: test_swtpm_setup_create_cert
PASS: test_tpm2_swtpm_cert
PASS: test_tpm2_swtpm_cert_ecc
PASS: test_parameters
PASS: test_tpm2_save_load_state_da_timeout
PASS: test_tpm2_swtpm_localca_pkcs11.test
PASS: test_tpm2_parameters
PASS: test_tpm2_swtpm_localca
PASS: test_tpm2_swtpm_setup_create_cert

Testsuite summary for swtpm 0.8.0

TOTAL: 68

PASS: 57

SKIP: 11

XFAIL: 0

FAIL: 0

XPASS: 0

ERROR: 0

============================================================================

when i try to start the swtpm socket like in your useful scripts:

swtpm socket
--tpmstate dir=/tmp/myvtpm2
--tpm2
--ctrl type=tcp,port=2322
--server type=tcp,port=2321,disconnect
--flags not-need-init,startup-clear

i get the above mentioned errors:

swtpm: SWTPM_NVRAM_Lock_Dir: Could not open lockfile: No such file or directory
swtpm: Error: Could not initialize libtpms.

Desktop (please complete the following information):
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian

Versions of relevant components

  • swtpm:0.8.0
  • libtpms:0.10.0
  • openssl:1.1.1n

thanks in advanvce and sorry if my provided informations are incomplete or something like that.

Try mkdir /tmp/myvtpm2 before running swtpm.

thank you very much Sir!