Updated Branches:
  refs/heads/master d6cb95208 -> 1e3e131e1

Save the zone and pod


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e3e131e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e3e131e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e3e131e

Branch: refs/heads/master
Commit: 1e3e131e14e2909817226546c1d55f458a962fde
Parents: d6cb952
Author: ahuang <[email protected]>
Authored: Wed Jul 17 17:14:01 2013 -0700
Committer: ahuang <[email protected]>
Committed: Wed Jul 17 17:14:30 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e3e131e/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java 
b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index ef81400..dae99a9 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -359,13 +359,14 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
             s_logger.debug("Allocating entries for VM: " + vm);
         }
 
-        VirtualMachineProfileImpl vmProfile = new 
VirtualMachineProfileImpl(vm, template, serviceOffering, null, params);
-
         vm.setDataCenterId(plan.getDataCenterId());
         if (plan.getPodId() != null) {
             vm.setPodId(plan.getPodId());
         }
         assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We 
currently don't support cluster and pool preset yet";
+        vm = _vmDao.persist(vm);
+
+        VirtualMachineProfileImpl vmProfile = new 
VirtualMachineProfileImpl(vm, template, serviceOffering, null, params);
 
         Transaction txn = Transaction.currentTxn();
         txn.start();

Reply via email to