diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index 86c380b2ab..c7eec4120b 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -2227,6 +2227,11 @@ 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]