fix(host): detect qemu caps

ingnore pmemclean output on qemu version 2.12.1

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
wanyaoqi
2022-12-30 11:50:09 +08:00
parent 21716cefb5
commit e42c91e5ea
+1 -1
View File
@@ -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]))