f45b919033
Added virt-install.rb Dropped virt-install.ycp - Drop virtman-autoconnect.patch - Pass --prefix to setup.py to fix build in 12.2 and older - Allow vm-install to be launched from the menu as an independent process. - bnc#847641 - L3: block device disappears with disabling cache virtman-support-unsafe-migration.patch - Dropped old tarball and upstream fixes OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=134
175 lines
8.5 KiB
Diff
175 lines
8.5 KiB
Diff
bnc#847641
|
|
|
|
Index: virt-manager-0.10.0/ui/vmm-migrate.ui
|
|
===================================================================
|
|
--- virt-manager-0.10.0.orig/ui/vmm-migrate.ui
|
|
+++ virt-manager-0.10.0/ui/vmm-migrate.ui
|
|
@@ -296,6 +296,53 @@
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
+ <object class="GtkAlignment" id="alignment7">
|
|
+ <property name="visible">True</property>
|
|
+ <property name="can_focus">False</property>
|
|
+ <property name="left_padding">6</property>
|
|
+ <child>
|
|
+ <object class="GtkHBox" id="migrate-unsafe-box">
|
|
+ <property name="visible">True</property>
|
|
+ <property name="can_focus">False</property>
|
|
+ <property name="spacing">6</property>
|
|
+ <child>
|
|
+ <object class="GtkLabel" id="label17">
|
|
+ <property name="visible">True</property>
|
|
+ <property name="can_focus">False</property>
|
|
+ <property name="label" translatable="yes">_Allow unsafe migration:</property>
|
|
+ <property name="use_underline">True</property>
|
|
+ <property name="mnemonic_widget">migrate-unsafe</property>
|
|
+ </object>
|
|
+ <packing>
|
|
+ <property name="expand">False</property>
|
|
+ <property name="fill">True</property>
|
|
+ <property name="position">0</property>
|
|
+ </packing>
|
|
+ </child>
|
|
+ <child>
|
|
+ <object class="GtkCheckButton" id="migrate-unsafe">
|
|
+ <property name="visible">True</property>
|
|
+ <property name="can_focus">True</property>
|
|
+ <property name="receives_default">False</property>
|
|
+ <property name="use_action_appearance">False</property>
|
|
+ <property name="draw_indicator">True</property>
|
|
+ </object>
|
|
+ <packing>
|
|
+ <property name="expand">False</property>
|
|
+ <property name="fill">True</property>
|
|
+ <property name="position">1</property>
|
|
+ </packing>
|
|
+ </child>
|
|
+ </object>
|
|
+ </child>
|
|
+ </object>
|
|
+ <packing>
|
|
+ <property name="expand">True</property>
|
|
+ <property name="fill">True</property>
|
|
+ <property name="position">1</property>
|
|
+ </packing>
|
|
+ </child>
|
|
+ <child>
|
|
<object class="GtkHBox" id="migrate-maxdowntime-box">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
@@ -408,7 +455,7 @@
|
|
<packing>
|
|
<property name="expand">True</property>
|
|
<property name="fill">True</property>
|
|
- <property name="position">1</property>
|
|
+ <property name="position">2</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
@@ -659,7 +706,7 @@
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">True</property>
|
|
- <property name="position">2</property>
|
|
+ <property name="position">3</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
Index: virt-manager-0.10.0/virtManager/migrate.py
|
|
===================================================================
|
|
--- virt-manager-0.10.0.orig/virtManager/migrate.py
|
|
+++ virt-manager-0.10.0/virtManager/migrate.py
|
|
@@ -147,6 +147,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
|
|
self.widget("migrate-rate").set_value(0)
|
|
self.widget("migrate-secure").set_active(False)
|
|
+ self.widget("migrate-unsafe").set_active(False)
|
|
|
|
downtime_box = self.widget("migrate-maxdowntime-box")
|
|
support_downtime = self.vm.support_downtime()
|
|
@@ -174,6 +175,16 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
secure_box.set_sensitive(support_secure)
|
|
secure_box.set_tooltip_text(secure_tooltip)
|
|
|
|
+ unsafe_box = self.widget("migrate-unsafe-box")
|
|
+ support_unsafe = hasattr(libvirt, "VIR_MIGRATE_UNSAFE")
|
|
+ unsafe_tooltip = ""
|
|
+ if not support_unsafe:
|
|
+ unsafe_tooltip = _("Libvirt version does not support unsafe "
|
|
+ "migration.")
|
|
+
|
|
+ unsafe_box.set_sensitive(support_unsafe)
|
|
+ unsafe_box.set_tooltip_text(unsafe_tooltip)
|
|
+
|
|
self.rebuild_dest_rows()
|
|
|
|
def set_state(self, vm):
|
|
@@ -234,6 +245,9 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
def get_config_secure(self):
|
|
return self.widget("migrate-secure").get_active()
|
|
|
|
+ def get_config_unsafe(self):
|
|
+ return self.widget("migrate-unsafe").get_active()
|
|
+
|
|
def get_config_max_downtime_enabled(self):
|
|
return self.widget("migrate-max-downtime").get_sensitive()
|
|
|
|
@@ -456,6 +470,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
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)
|
|
rate = self.get_config_rate()
|
|
if rate:
|
|
@@ -476,7 +491,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
|
|
progWin = vmmAsyncJob(self._async_migrate,
|
|
[self.vm, destconn, uri, rate, live, secure,
|
|
- max_downtime],
|
|
+ unsafe, max_downtime],
|
|
_("Migrating VM '%s'" % self.vm.get_name()),
|
|
(_("Migrating VM '%s' from %s to %s. "
|
|
"This may take a while.") %
|
|
@@ -528,7 +543,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
|
|
def _async_migrate(self, asyncjob,
|
|
origvm, origdconn, migrate_uri, rate, live,
|
|
- secure, max_downtime):
|
|
+ secure, unsafe, max_downtime):
|
|
meter = asyncjob.get_meter()
|
|
|
|
srcconn = util.dup_conn(origvm.conn)
|
|
@@ -548,6 +563,6 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|
timer = self.timeout_add(100, self._async_set_max_downtime,
|
|
vm, max_downtime, current_thread)
|
|
|
|
- vm.migrate(dstconn, migrate_uri, rate, live, secure, meter=meter)
|
|
+ vm.migrate(dstconn, migrate_uri, rate, live, secure, unsafe, meter=meter)
|
|
if timer:
|
|
self.idle_add(GLib.source_remove, timer)
|
|
Index: virt-manager-0.10.0/virtManager/domain.py
|
|
===================================================================
|
|
--- virt-manager-0.10.0.orig/virtManager/domain.py
|
|
+++ virt-manager-0.10.0/virtManager/domain.py
|
|
@@ -1269,7 +1269,7 @@ class vmmDomain(vmmLibvirtObject):
|
|
self._backend.migrateSetMaxDowntime(max_downtime, flag)
|
|
|
|
def migrate(self, destconn, interface=None, rate=0,
|
|
- live=False, secure=False, meter=None):
|
|
+ live=False, secure=False, unsafe=False, meter=None):
|
|
self._install_abort = True
|
|
|
|
newname = None
|
|
@@ -1282,6 +1282,9 @@ class vmmDomain(vmmLibvirtObject):
|
|
flags |= libvirt.VIR_MIGRATE_PEER2PEER
|
|
flags |= libvirt.VIR_MIGRATE_TUNNELLED
|
|
|
|
+ if unsafe:
|
|
+ flags |= libvirt.VIR_MIGRATE_UNSAFE
|
|
+
|
|
logging.debug("Migrating: conn=%s flags=%s dname=%s uri=%s rate=%s",
|
|
destconn.vmm, flags, newname, interface, rate)
|
|
|