CLOUDSTACK-2945: ignore collect disk statistics if vm is not running on KVM or XenServer

This commit is contained in:
Wei Zhou 2013-06-12 11:57:17 +02:00
parent a30f9fa64a
commit 51a3a5a9b5

View File

@ -3421,6 +3421,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
@Override
public void collectVmDiskStatistics (UserVmVO userVm) {
// support KVM and XenServer only
if (!userVm.getHypervisorType().equals(HypervisorType.XenServer)
&& !userVm.getHypervisorType().equals(HypervisorType.KVM))
return;
// Collect vm disk statistics from host before stopping Vm
long hostId = userVm.getHostId();
List<String> vmNames = new ArrayList<String>();