Merge pull request #15672 from wanyaoqi/automated-cherry-pick-of-#15671-upstream-release-3.10

Automated cherry pick of #15671: fix(host): detect qemu caps
This commit is contained in:
Zexi Li
2022-12-30 15:02:44 +08:00
committed by GitHub
+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]))