From 87d7d508a55329334c99b84bfc2fc31180841ac9 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Tue, 14 Jan 2025 20:49:53 +0800 Subject: [PATCH] fix(host): wrap qemu machine info error (#21971) --- 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 a884c86fb75..8004f1697fb 100644 --- a/pkg/hostman/hostinfo/hostinfo.go +++ b/pkg/hostman/hostinfo/hostinfo.go @@ -1009,7 +1009,7 @@ func (h *SHostInfo) detectQemuCapabilities(version string) error { var machineInfoList = make([]monitor.MachineInfo, 0) err = res.Unmarshal(&machineInfoList, "return") if err != nil { - return errors.Errorf("failed unmarshal machineinfo return %s: %s", segs[3], err) + return errors.Wrapf(err, "failed unmarshal machineinfo return %s", res.PrettyString()) } h.qemuMachineInfoList = machineInfoList qemuCaps := &QemuCaps{