Dan Kenigsberg has uploaded a new change for review. Change subject: [WIP] migration network custom property ......................................................................
[WIP] migration network custom property It may make sense not to use the default ovirtmgmt network to transfer migration data. This (untested!) patch is a hack to allow adminstrators define a migration-data network, asign it with an IP address on each cluster host, and then specify the network name in a VM's custom property. When a VM with the 'mignet' custom property is migrated, source vdsm queries destination vdsm for the IP address of the migration network, and uses that address as the destination for qemu-level migration data. Change-Id: I6e0d50d6e9aa13758babc5d5bdd4d78ff51f9d95 Signed-off-by: Dan Kenigsberg <[email protected]> --- M vdsm/libvirtvm.py 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/10696/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index d98e48d..f29a83b 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -473,7 +473,20 @@ else: transport = 'tcp' duri = 'qemu+%s://%s/system' % (transport, self.remoteHost) - muri = 'tcp://%s' % self.remoteHost + + migrationNetwork = self._vm.conf.get('custom', {}).get('mignet') + if migrationNetwork: + response = self.destServer.getVdsCapabilities() + if response['status']['code']: + self.status = response + raise RuntimeError('migration destination error: ' + + response['status']['message']) + nets = netinfo.NetInfo(response['info']).networks + remoteMachineIP = nets[migrationNetwork]['addr'] + else: + remoteMachineIP = self.remoteHost + + muri = 'tcp://%s' % remoteMachineIP self._vm.log.debug('starting migration to %s', duri) t = MigrationDowntimeThread(self._vm, int(self._downtime), -- To view, visit http://gerrit.ovirt.org/10696 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e0d50d6e9aa13758babc5d5bdd4d78ff51f9d95 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
