mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5210: Fix the sockets reported by the hyperv agent.
This commit is contained in:
parent
fde14bcc32
commit
216554d574
|
|
@ -1683,9 +1683,11 @@ namespace HypervResource
|
|||
// Detect CPUs, speed, memory
|
||||
uint cores;
|
||||
uint mhz;
|
||||
wmiCallsV2.GetProcessorResources(out cores, out mhz);
|
||||
uint sockets;
|
||||
wmiCallsV2.GetProcessorResources(out sockets, out cores, out mhz);
|
||||
strtRouteCmd.cpus = cores;
|
||||
strtRouteCmd.speed = mhz;
|
||||
strtRouteCmd.cpuSockets = sockets;
|
||||
ulong memoryKBs;
|
||||
ulong freeMemoryKBs;
|
||||
wmiCallsV2.GetMemoryResources(out memoryKBs, out freeMemoryKBs);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace HypervResource
|
|||
KvpExchangeComponentSettingData GetKvpSettings(VirtualSystemSettingData vmSettings);
|
||||
void GetMemoryResources(out ulong physicalRamKBs, out ulong freeMemoryKBs);
|
||||
MemorySettingData GetMemSettings(VirtualSystemSettingData vmSettings);
|
||||
void GetProcessorResources(out uint cores, out uint mhz);
|
||||
void GetProcessorResources(out uint sockets, out uint cores, out uint mhz);
|
||||
void GetProcessorUsageInfo(out double cpuUtilization);
|
||||
ProcessorSettingData GetProcSettings(VirtualSystemSettingData vmSettings);
|
||||
ResourceAllocationSettingData.ResourceAllocationSettingDataCollection GetResourceAllocationSettings(VirtualSystemSettingData vmSettings);
|
||||
|
|
|
|||
|
|
@ -1723,16 +1723,18 @@ namespace HypervResource
|
|||
}
|
||||
}
|
||||
|
||||
public void GetProcessorResources(out uint cores, out uint mhz)
|
||||
public void GetProcessorResources(out uint sockets, out uint cores, out uint mhz)
|
||||
{
|
||||
// Processor processors
|
||||
cores = 0;
|
||||
mhz = 0;
|
||||
sockets = 0;
|
||||
Processor.ProcessorCollection procCol = Processor.GetInstances();
|
||||
foreach (Processor procInfo in procCol)
|
||||
{
|
||||
cores += procInfo.NumberOfCores;
|
||||
mhz = procInfo.MaxClockSpeed;
|
||||
sockets++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -183,8 +183,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S
|
|||
|
||||
s_logger.debug("Generated StartupRoutingCommand for _agentIp \"" + _agentIp + "\"");
|
||||
|
||||
// TODO: does version need to be hard coded.
|
||||
defaultStartRoutCmd.setVersion("4.2.0");
|
||||
defaultStartRoutCmd.setVersion(this.getClass().getPackage().getImplementationVersion());
|
||||
|
||||
// Specifics of the host's resource capacity and network configuration
|
||||
// comes from the host itself. CloudStack sanity checks network
|
||||
|
|
|
|||
Loading…
Reference in New Issue