...

Source file src/github.com/Microsoft/hcsshim/internal/vm/remotevm/windows.go

Documentation: github.com/Microsoft/hcsshim/internal/vm/remotevm

     1  //go:build windows
     2  
     3  package remotevm
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/Microsoft/hcsshim/internal/cpugroup"
     9  	"github.com/Microsoft/hcsshim/internal/vmservice"
    10  )
    11  
    12  func (uvmb *utilityVMBuilder) SetCPUGroup(ctx context.Context, id string) error {
    13  	if uvmb.config.WindowsOptions == nil {
    14  		uvmb.config.WindowsOptions = &vmservice.WindowsOptions{}
    15  	}
    16  	// Map from guid to the underlying hypervisor ID.
    17  	conf, err := cpugroup.GetCPUGroupConfig(ctx, id)
    18  	if err != nil {
    19  		return err
    20  	}
    21  	uvmb.config.WindowsOptions.CpuGroupID = conf.HypervisorGroupId
    22  	return nil
    23  }
    24  

View as plain text