mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 20:09:44 +00:00
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 <chen.bo@intel.com>
(cherry picked from commit 932ee41b3f
)
This commit is contained in:
parent
abd708e814
commit
938b01aedc
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user