From e42c91e5ea0f0ef3601adeef42ac569f6fa3749a Mon Sep 17 00:00:00 2001 From: wanyaoqi Date: Fri, 30 Dec 2022 11:50:09 +0800 Subject: [PATCH] fix(host): detect qemu caps ingnore pmemclean output on qemu version 2.12.1 Signed-off-by: wanyaoqi --- pkg/hostman/hostinfo/hostinfo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/hostman/hostinfo/hostinfo.go b/pkg/hostman/hostinfo/hostinfo.go index 05a4b8c56a..9180f6b47d 100644 --- a/pkg/hostman/hostinfo/hostinfo.go +++ b/pkg/hostman/hostinfo/hostinfo.go @@ -917,7 +917,7 @@ func (h *SHostInfo) detectQemuCapabilities(version string) error { log.Errorf("failed start qemu caps cmdline: %s", qmpCmds) } segs := bytes.Split(out, []byte{'\n'}) - if len(segs) != 6 { + if len(segs) < 6 { return errors.Errorf("unexpect qmp res %s", out) } res, err := jsonutils.Parse(bytes.TrimSpace(segs[2]))