Skip to content

Commit

Permalink
Don't run tpm on dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Sep 28, 2023
1 parent b2a3bc7 commit fbefad4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/fab/vlab/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit fbefad4

Please sign in to comment.