mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-30 23:11:25 +00:00
vm start: only print tpm-related message if there is an instance
Otherwise, this can produce an undef warning and be misleading. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
25de70ae59
commit
23bee97d05
@ -5453,8 +5453,10 @@ sub vm_start_nolock {
|
||||
|
||||
my $exitcode = run_command($cmd, %run_params);
|
||||
if ($exitcode) {
|
||||
warn "stopping swtpm instance (pid $tpmpid) due to QEMU startup error\n";
|
||||
kill 'TERM', $tpmpid if $tpmpid;
|
||||
if ($tpmpid) {
|
||||
warn "stopping swtpm instance (pid $tpmpid) due to QEMU startup error\n";
|
||||
kill 'TERM', $tpmpid;
|
||||
}
|
||||
die "QEMU exited with code $exitcode\n";
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user