diff options
| author | Christian Berendt <berendt@b1-systems.de> | 2012-11-07 13:08:45 +0100 |
|---|---|---|
| committer | Christian Berendt <berendt@b1-systems.de> | 2012-11-12 17:55:50 +0100 |
| commit | 6c05f79cb39acd8a01d375600abd953c960b0d31 (patch) | |
| tree | 8b2bcad286d59a78acb9351422a9abebe787ee46 /nova | |
| parent | 24e86f40f7230544666ef99650353da76a1b9297 (diff) | |
make libvirt with Xen more workable
- Xen creates it's own tap devices when using libvirt, unplugging in
Nova is not necessary
- 'script' should be None for Xen using libvirt with Quantum Linux
Bridge Agent
- live migration is not working because the libvirt method
virConnectCompareCPU is not implemented for Xen
Change-Id: Ibb937f75763cb83691a056ca41e244e171499fbb
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/virt/libvirt/driver.py | 5 | ||||
| -rw-r--r-- | nova/virt/libvirt/vif.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 743efd595..87a3c2fec 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -2351,6 +2351,11 @@ class LibvirtDriver(driver.ComputeDriver): None. if given cpu info is not compatible to this server, raise exception. """ + + # NOTE(berendt): virConnectCompareCPU not working for Xen + if CONF.libvirt_type == 'xen': + return 1 + info = jsonutils.loads(cpu_info) LOG.info(_('Instance launched has CPU info:\n%s') % cpu_info) cpu = vconfig.LibvirtConfigCPU() diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py index 56c26dfd1..91088c3d2 100644 --- a/nova/virt/libvirt/vif.py +++ b/nova/virt/libvirt/vif.py @@ -293,7 +293,8 @@ class QuantumLinuxBridgeVIFDriver(vif.VIFDriver): conf.model = 'virtio' conf.net_type = "ethernet" conf.target_dev = dev - conf.script = "" + if CONF.libvirt_type != 'xen': + conf.script = "" conf.mac_addr = mapping['mac'] return conf @@ -303,7 +304,8 @@ class QuantumLinuxBridgeVIFDriver(vif.VIFDriver): network, mapping = vif dev = self.get_dev_name(mapping['vif_uuid']) try: - utils.execute('ip', 'link', 'delete', dev, run_as_root=True) + if CONF.libvirt_type != 'xen': + utils.execute('ip', 'link', 'delete', dev, run_as_root=True) except exception.ProcessExecutionError: LOG.warning(_("Failed while unplugging vif"), instance=instance) raise |
