mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
clh: Provide cpu topology to API
[ Port from runtime commit 39897867bc89667daaafdd141367ec4a5fdc9247 ] API now requires cpu topology. Fixes: #461 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com> Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
3159438701
commit
895959d007
@ -296,6 +296,12 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
|
|||||||
Mode: cctOFF,
|
Mode: cctOFF,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clh.vmconfig.Cpus.Topology = chclient.CpuTopology{
|
||||||
|
ThreadsPerCore: 1,
|
||||||
|
CoresPerDie: int32(clh.config.DefaultMaxVCPUs),
|
||||||
|
DiesPerPackage: 1,
|
||||||
|
Packages: 1,
|
||||||
|
}
|
||||||
// Overwrite the default value of HTTP API socket path for cloud hypervisor
|
// Overwrite the default value of HTTP API socket path for cloud hypervisor
|
||||||
apiSocketPath, err := clh.apiSocketPath(id)
|
apiSocketPath, err := clh.apiSocketPath(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user