Azure / confidential-computing-cvm-guest-attestation

Confidential VM Platform Guest attestation sample apps
MIT License
61 stars 39 forks source link

unable to run AttestationClient from Docker Container #47

Closed syambabu8k closed 1 year ago

syambabu8k commented 1 year ago

I am getting the following error message when I try to run the docker command from AMD CVM machine (Standard_DC2as_v5). I was able to run AttestationClient from local machine without any problem.

docker run -v /sys/kernel/security:/sys/kernel/security -v /dev/tpmrm0:/dev/tpmrm0 mcr.microsoft.com/acc/samples/cvm-attestation:1.1 ERROR:tcti:src/tss2-tcti/tcti-device.c:440:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpmrm0: Operation not permitted ERROR:tcti:src/tss2-tcti/tcti-device.c:440:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpmrm0: Operation not permitted ERROR:tcti:src/tss2-tcti/tcti-device.c:440:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpmrm0: Operation not permitted parse error: Invalid numeric literal at EOF at line 1, column 3 parse error: Invalid numeric literal at EOF at line 1, column 3

syambabu8k commented 1 year ago

issue resolved if I run the container in privileged mode docker run --privileged -v /sys/kernel/security:/sys/kernel/security -v /dev/tpmrm0:/dev/tpmrm0 mcr.microsoft.com/acc/samples/cvm-attestation:1.1