mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7277: [Hyper-V] For vmsync first VMs are listed and their power state is
determined. To exclude hosted system we filter the result on Caption='Virtual Machine' but this string is locale dependent so it may not not work properly for locales other than english. To overcome this now we started using ProcessId >= 0 filter
This commit is contained in:
parent
d1796c5f58
commit
1c688f40e1
@ -2434,7 +2434,10 @@ namespace HypervResource
|
||||
logger.Error(details, sysEx);
|
||||
}
|
||||
|
||||
return JArray.FromObject(hostVmStateReport);
|
||||
var answer = JArray.FromObject(hostVmStateReport);
|
||||
logger.Info(String.Format("{0}: {1}",CloudStackTypes.HostVmStateReportCommand, answer.ToString()));
|
||||
|
||||
return answer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2315,7 +2315,7 @@ namespace HypervResource
|
||||
|
||||
public ComputerSystem.ComputerSystemCollection GetComputerSystemCollection()
|
||||
{
|
||||
var wmiQuery = String.Format("Caption=\"Virtual Machine\"");
|
||||
var wmiQuery = String.Format("ProcessId >= 0");
|
||||
return ComputerSystem.GetInstances(wmiQuery);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user