mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-23 10:00:39 +00:00
swtpm: use start time as prefix for logging
to be able to distinguish different invocations. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
b2e9c4d322
commit
72a5a17610
@ -3264,6 +3264,9 @@ sub start_swtpm {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Used to distinguish different invocations in the log.
|
||||||
|
my $log_prefix = "[id=" . int(time()) . "] ";
|
||||||
|
|
||||||
my $emulator_cmd = [
|
my $emulator_cmd = [
|
||||||
"swtpm",
|
"swtpm",
|
||||||
"socket",
|
"socket",
|
||||||
@ -3276,7 +3279,7 @@ sub start_swtpm {
|
|||||||
"--terminate", # terminate on QEMU disconnect
|
"--terminate", # terminate on QEMU disconnect
|
||||||
"--daemon",
|
"--daemon",
|
||||||
"--log",
|
"--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';
|
push @$emulator_cmd, "--tpm2" if $tpm->{version} eq 'v2.0';
|
||||||
run_command($emulator_cmd, outfunc => sub { print $1; });
|
run_command($emulator_cmd, outfunc => sub { print $1; });
|
||||||
|
Loading…
Reference in New Issue
Block a user