diff options
| author | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-04-22 17:01:39 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-22 17:01:39 +0000 |
| commit | f2ed04d5a0034328bb02a1cb81784f8956652052 (patch) | |
| tree | 0ad6aa2a99228dacbcd4a557828382d9fbb6005f | |
| parent | 8af2a2d720b97ef17565d57a9b8b028d449a9c84 (diff) | |
| parent | 55aa1247e9017a3982397e6d795c8388a35b5386 (diff) | |
Use runtime XML instead of VM creation time XML for createXML() call in order to ensure volumes are attached after RebootInstances as a workaround, and fix bug #747922.
| -rw-r--r-- | nova/virt/libvirt_conn.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index e76de47db..e6671878d 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -513,8 +513,15 @@ class LibvirtConnection(driver.ComputeDriver): reboot happens, as the guest OS cannot ignore this action. """ + virt_dom = self._conn.lookupByName(instance['name']) + # NOTE(itoumsn): Use XML delived from the running instance + # instead of using to_xml(instance). This is almost the ultimate + # stupid workaround. + xml = virt_dom.XMLDesc(0) + # NOTE(itoumsn): self.shutdown() and wait instead of self.destroy() is + # better because we cannot ensure flushing dirty buffers + # in the guest OS. But, in case of KVM, shutdown() does not work... self.destroy(instance, False) - xml = self.to_xml(instance) self.firewall_driver.setup_basic_filtering(instance) self.firewall_driver.prepare_instance_filter(instance) self._create_new_domain(xml) |
