From d3bd70dacabfd70bca5dc5408daf104d81b668bb Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 1 Feb 2014 18:17:17 -0500 Subject: [PATCH] migrate: Remove misleading 'offline' option (bz 881092) We acted like it would migrate a shutoff VM, but it just toggled the LIVE flag. We should support true 'offline' migration, but the UI will be different. --- ui/migrate.ui | 62 ++++-------------------------------------- virtManager/domain.py | 2 +- virtManager/migrate.py | 9 +----- 3 files changed, 7 insertions(+), 66 deletions(-) diff --git a/ui/migrate.ui b/ui/migrate.ui index cbbbc5ca8..e03d5f6d2 100644 --- a/ui/migrate.ui +++ b/ui/migrate.ui @@ -1,7 +1,7 @@ - + - + 70000 1 @@ -93,7 +93,7 @@ True False - 4 + 3 2 6 6 @@ -165,59 +165,6 @@ GTK_FILL - - - True - False - 1 - <span color='#484848'>Migrate _offline:</span> - True - True - migrate-offline - - - 3 - 4 - GTK_FILL - - - - - True - False - - - True - True - False - 1 - True - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - 1 - 2 - 3 - 4 - - True @@ -321,10 +268,11 @@ + False True True False - False + 0.5 True diff --git a/virtManager/domain.py b/virtManager/domain.py index 6cea17a18..fa0e60ac1 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -1302,7 +1302,7 @@ class vmmDomain(vmmLibvirtObject): newname = None flags = 0 - if self.status() == libvirt.VIR_DOMAIN_RUNNING and live: + if live: flags |= libvirt.VIR_MIGRATE_LIVE if secure: diff --git a/virtManager/migrate.py b/virtManager/migrate.py index 26bdd1e88..f392737d6 100644 --- a/virtManager/migrate.py +++ b/virtManager/migrate.py @@ -136,10 +136,6 @@ class vmmMigrateDialog(vmmGObjectUI): self.widget("migrate-set-maxdowntime").set_active(False) self.widget("migrate-max-downtime").set_value(30) - running = self.vm.is_active() - self.widget("migrate-offline").set_active(not running) - self.widget("migrate-offline").set_sensitive(running) - self.widget("migrate-rate").set_value(0) self.widget("migrate-secure").set_active(False) self.widget("migrate-unsafe").set_active(False) @@ -221,9 +217,6 @@ class vmmMigrateDialog(vmmGObjectUI): return None return row[1] - def get_config_offline(self): - return self.widget("migrate-offline").get_active() - def get_config_max_downtime(self): if not self.get_config_max_downtime_enabled(): return 0 @@ -464,12 +457,12 @@ class vmmMigrateDialog(vmmGObjectUI): if not self.validate(): return + live = True destconn = self.get_config_destconn() srcuri = self.vm.conn.get_uri() srchost = self.vm.conn.get_hostname() dsthost = destconn.get_qualified_hostname() max_downtime = self.get_config_max_downtime() - live = not self.get_config_offline() secure = self.get_config_secure() unsafe = self.get_config_unsafe() uri = self.build_migrate_uri(destconn, srcuri)