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

Commit

Permalink
clh: Provide cpu topology to API
Browse files Browse the repository at this point in the history
API now requires cpu topology.

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Aug 11, 2020
1 parent 40f4931 commit 3989786
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
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
apiSocketPath, err := clh.apiSocketPath(id)
if err != nil {
Expand Down

0 comments on commit 3989786

Please sign in to comment.