to be able to distinguish different invocations.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
});
}
+ # Used to distinguish different invocations in the log.
+ my $log_prefix = "[id=" . int(time()) . "] ";
+
my $emulator_cmd = [
"swtpm",
"socket",
"--terminate", # terminate on QEMU disconnect
"--daemon",
"--log",
- "file=/run/qemu-server/$vmid-swtpm.log,level=1",
+ "file=/run/qemu-server/$vmid-swtpm.log,level=1,prefix=$log_prefix",
];
push @$emulator_cmd, "--tpm2" if $tpm->{version} eq 'v2.0';
run_command($emulator_cmd, outfunc => sub { print $1; });