From fbefad4b2cab9d27aa9bf410a8dcdae1d5aa32fb Mon Sep 17 00:00:00 2001 From: Sergei Lukianov Date: Thu, 28 Sep 2023 10:20:48 -0700 Subject: [PATCH] Don't run tpm on dry run --- pkg/fab/vlab/vm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/fab/vlab/vm.go b/pkg/fab/vlab/vm.go index e6f4c814..ba8f3cff 100644 --- a/pkg/fab/vlab/vm.go +++ b/pkg/fab/vlab/vm.go @@ -277,6 +277,10 @@ func (vm *VM) RunInstall(ctx context.Context) func() error { func (vm *VM) RunTPM(ctx context.Context) func() error { return func() error { + if vm.Cfg.DryRun { + return nil + } + err := execCmd(ctx, vm.Basedir, true, "swtpm", []string{}, "socket", "--tpm2", "--tpmstate", "dir=tpm", "--ctrl", "type=unixio,path=tpm.sock.ctrl", "--server", "type=unixio,path=tpm.sock", "--pid", "file=tpm.pid", "--log", "level=1", "--flags", "startup-clear")