virtcontainers: clh: Revert the workaround incorrect default values

Given the fix to the bugs of the openapi spec file is included in the
Cloud Hypervisor v18.0 [1], this patch reverts the workaround we carried
in the CLH driver.

This reverts commit 932ee41b3f.

[1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3029

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2021-09-09 14:49:07 -07:00
parent 0e0e59dc5f
commit f785ff0bf2

View File

@ -240,7 +240,6 @@ 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
@ -1116,7 +1115,6 @@ 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 {