Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 3989786

Browse files
committed
clh: Provide cpu topology to API
API now requires cpu topology. Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
1 parent 40f4931 commit 3989786

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

virtcontainers/clh.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
296296
Mode: cctOFF,
297297
}
298298

299+
clh.vmconfig.Cpus.Topology = chclient.CpuTopology{
300+
ThreadsPerCore: 1,
301+
CoresPerDie: int32(clh.config.DefaultMaxVCPUs),
302+
DiesPerPackage: 1,
303+
Packages: 1,
304+
}
299305
// Overwrite the default value of HTTP API socket path for cloud hypervisor
300306
apiSocketPath, err := clh.apiSocketPath(id)
301307
if err != nil {

0 commit comments

Comments
 (0)