From 0374e42931a2c47928e038a4d07c751cbdac002f Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Mon, 16 Jan 2012 13:50:15 +0530 Subject: [PATCH] bug 13068: clearing sec grp has a dependency on nic's existing, move the call a bit --- server/src/com/cloud/vm/UserVmManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 1333d65e633..81be34ed377 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -3357,11 +3357,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager if (networkIdList != null && !networkIdList.isEmpty()) { throw new InvalidParameterValueException("Can't move vm with network Ids; this is a basic zone VM"); } + //cleanup the old security groups + _securityGroupMgr.removeInstanceFromGroups(cmd.getVmId()); //cleanup the network for the oldOwner _networkMgr.cleanupNics(vmOldProfile); _networkMgr.expungeNics(vmOldProfile); - //cleanup the old security groups - _securityGroupMgr.removeInstanceFromGroups(cmd.getVmId()); //security groups will be recreated for the new account, when the VM is started List networkList = new ArrayList();