From 938b01aedc328b9c93c4536636b9745802a022ca Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Thu, 26 Aug 2021 22:50:42 -0700 Subject: [PATCH] virtcontainers: clh: Workaround incorrect default values Two default values defined in the 'cloud-hypervisor.yaml' have typo, and this patch manually overwrites them with the correct value as a workaround before the corresponding fix is landed to Cloud Hypervisor upstream. Signed-off-by: Bo Chen (cherry picked from commit 932ee41b3f18fe9036a5faa64c154fe6a39dc739) --- src/runtime/virtcontainers/clh.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index 630054f85..e7afc097d 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -243,6 +243,7 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ clh.vmconfig.Memory = chclient.NewMemoryConfig(int64((utils.MemUnit(clh.config.MemorySize) * utils.MiB).ToBytes())) // shared memory should be enabled if using vhost-user(kata uses virtiofsd) clh.vmconfig.Memory.Shared = func(b bool) *bool { return &b }(true) + clh.vmconfig.Memory.HotplugMethod = func(s string) *string { return &s }("Acpi") hostMemKb, err := getHostMemorySizeKb(procMemInfo) if err != nil { return nil @@ -1122,6 +1123,7 @@ func (clh *cloudHypervisor) addNet(e Endpoint) error { net := chclient.NewNetConfig() net.Mac = &mac net.Tap = &tapPath + net.VhostMode = func(s string) *string { return &s }("Client") if clh.vmconfig.Net != nil { *clh.vmconfig.Net = append(*clh.vmconfig.Net, *net) } else {