diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-02-24 15:04:07 -0600 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-02-24 15:04:07 -0600 |
| commit | 8635f7a306e4cfa41ad09a18602efa7793f6da95 (patch) | |
| tree | b4c72df0f4d85aa062607c903be6cb6e44e8354f | |
| parent | e369f2842446876505ce528c5bb56a3d41215f8f (diff) | |
moved network injection and vif creation to above vm start in vmops spawn
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 76b88a8bd..3aa5a23e5 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -104,6 +104,10 @@ class VMOps(object): instance, kernel, ramdisk, pv_kernel) VMHelper.create_vbd(self._session, vm_ref, vdi_ref, 0, True) + # inject_network_info and create vifs + networks = self.inject_network_info(instance) + self.create_vifs(instance, networks) + LOG.debug(_('Starting VM %s...'), vm_ref) self._session.call_xenapi('VM.start', vm_ref, False, False) instance_name = instance.name @@ -134,9 +138,7 @@ class VMOps(object): timer.f = _wait_for_boot - # call to reset network to inject network info and configure - networks = self.inject_network_info(instance) - self.create_vifs(instance, networks) + # call to reset network to configure network from xenstore self.reset_network(instance) return timer.start(interval=0.5, now=True) |
