mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-23 00:04:24 +01:00
Merge pull request #1180 from egernst/qemu-cleanup-check
qemu: no state to save if QEMU isn't running
This commit is contained in:
@@ -2316,6 +2316,12 @@ func (q *qemu) toGrpc() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (q *qemu) save() (s persistapi.HypervisorState) {
|
||||
|
||||
// If QEMU isn't even running, there isn't any state to save
|
||||
if q.stopped {
|
||||
return
|
||||
}
|
||||
|
||||
pids := q.getPids()
|
||||
if len(pids) != 0 {
|
||||
s.Pid = pids[0]
|
||||
|
||||
Reference in New Issue
Block a user