Merge pull request #10074 from koct9i/log-vm-start-error

runtime: log vm start error before cleanup
This commit is contained in:
Aurélien Bombo 2024-10-28 14:39:00 -05:00 committed by GitHub
commit eb04caaf8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}
}()