mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 02:56:18 +00:00
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 commit932ee41b3f
. [1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3029 Signed-off-by: Bo Chen <chen.bo@intel.com> (cherry picked from commitf785ff0bf2
)
This commit is contained in:
parent
c2c650500b
commit
a1874ccd62
@ -243,7 +243,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()))
|
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)
|
// 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.Shared = func(b bool) *bool { return &b }(true)
|
||||||
clh.vmconfig.Memory.HotplugMethod = func(s string) *string { return &s }("Acpi")
|
|
||||||
hostMemKb, err := getHostMemorySizeKb(procMemInfo)
|
hostMemKb, err := getHostMemorySizeKb(procMemInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
@ -1123,7 +1122,6 @@ func (clh *cloudHypervisor) addNet(e Endpoint) error {
|
|||||||
net := chclient.NewNetConfig()
|
net := chclient.NewNetConfig()
|
||||||
net.Mac = &mac
|
net.Mac = &mac
|
||||||
net.Tap = &tapPath
|
net.Tap = &tapPath
|
||||||
net.VhostMode = func(s string) *string { return &s }("Client")
|
|
||||||
if clh.vmconfig.Net != nil {
|
if clh.vmconfig.Net != nil {
|
||||||
*clh.vmconfig.Net = append(*clh.vmconfig.Net, *net)
|
*clh.vmconfig.Net = append(*clh.vmconfig.Net, *net)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user