mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
Merge pull request #10074 from koct9i/log-vm-start-error
runtime: log vm start error before cleanup
This commit is contained in:
commit
eb04caaf8f
@ -1458,6 +1458,8 @@ func (s *Sandbox) startVM(ctx context.Context, prestartHookFunc func(context.Con
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
// Log error, otherwise nobody might see it - StopVM could kill this process.
|
||||
s.Logger().WithError(err).Error("Cannot start VM")
|
||||
s.hypervisor.StopVM(ctx, false)
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user