mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 10:37:10 +00: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:
commit
542e93d987
@ -2316,6 +2316,12 @@ func (q *qemu) toGrpc() ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (q *qemu) save() (s persistapi.HypervisorState) {
|
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()
|
pids := q.getPids()
|
||||||
if len(pids) != 0 {
|
if len(pids) != 0 {
|
||||||
s.Pid = pids[0]
|
s.Pid = pids[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user