virtman-default-to-xen-pv.patch - Update to virt-manager 1.0.0 * virt-manager: Snapshot support * New tool virt-xml: Edit libvirt XML in one shot from the command line. Check out some examples: http://www.redhat.com/archives/libvir-list/2014-January/msg01226.html * Improved defaults: qcow2, USB2, host CPU model, guest agent channel, … * Introspect command line options like –disk=? or –network=help * The virt-image tool will be removed before the next release, speak up if you have a good reason not to remove it. * virt-manager: Support arm vexpress VM creation * virt-manager: Add guest memory usage graphs (Thorsten Behrens) * virt-manager: UI for editing devices (Cédric Bosdonnat) * Spice USB redirection support (Guannan Ren) * UI and command line support (Stefan Berger) * UI and command line support (Giuseppe Scrivano) * UI and command line support (Chen Hanxiao) * command line support (Chen Hanxiao) * virt-manager: support for glusterfs storage pools (Giuseppe Scrivano) * cli: New options –memory, –features, –clock, –metadata, –pm * Greatly improve app responsiveness when connecting to remote hosts * Lots of UI cleanup and improvements virt-manager-1.0.0.tar.bz2 - Dropped the following patches by taking a newer upstream tarball virt-manager-0.10.0.tar.bz2 Add-memory-stats-widget-also-to-manager-tree-view.patch Attempt-empty-path-on-virDomainBlockStats.patch Base-mem-statistics-on-virDomainMemoryStats-if-avail.patch virtinst-add-cache-modes.patch virtinst-allow-ide-hdb.patch virtinst-clone-disks.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=143
72 lines
2.9 KiB
Diff
72 lines
2.9 KiB
Diff
Index: virt-manager-0.10.1/virtManager/addhardware.py
|
|
===================================================================
|
|
--- virt-manager-0.10.1.orig/virtManager/addhardware.py
|
|
+++ virt-manager-0.10.1/virtManager/addhardware.py
|
|
@@ -1287,6 +1287,18 @@ class vmmAddHardware(vmmGObjectUI):
|
|
if controller is not None:
|
|
logging.debug("Adding controller:\n%s",
|
|
controller.get_xml_config())
|
|
+
|
|
+ # If vm is active, Try to hotplug the device and modify persistent
|
|
+ # config in one go
|
|
+ if self.vm.is_active():
|
|
+ try:
|
|
+ self.vm.attach_device_flags(self._dev, 3)
|
|
+ return (False, None)
|
|
+ except Exception, e:
|
|
+ logging.debug("Could not hotplug device and modify persistent "
|
|
+ "config at the same time: %s" % str(e))
|
|
+ logging.debug("Trying the operations seperately ...")
|
|
+
|
|
# Hotplug device
|
|
attach_err = False
|
|
try:
|
|
Index: virt-manager-0.10.1/virtManager/details.py
|
|
===================================================================
|
|
--- virt-manager-0.10.1.orig/virtManager/details.py
|
|
+++ virt-manager-0.10.1/virtManager/details.py
|
|
@@ -2270,6 +2270,17 @@ class vmmDetails(vmmGObjectUI):
|
|
text1=(_("Are you sure you want to remove this device?"))):
|
|
return
|
|
|
|
+ # If vm is running, try to hot remove the device and modify
|
|
+ # persistent config in one go
|
|
+ if self.vm.is_active():
|
|
+ try:
|
|
+ self.vm.detach_device_flags(dev_type, dev_id_info, 3)
|
|
+ return
|
|
+ except Exception, e:
|
|
+ logging.debug("Could not hot remove device and modify "
|
|
+ "persistent config at the same time: %s" % str(e))
|
|
+ logging.debug("Trying the operations seperately ...")
|
|
+
|
|
# Define the change
|
|
try:
|
|
self.vm.remove_device(dev_id_info)
|
|
Index: virt-manager-0.10.1/virtManager/domain.py
|
|
===================================================================
|
|
--- virt-manager-0.10.1.orig/virtManager/domain.py
|
|
+++ virt-manager-0.10.1/virtManager/domain.py
|
|
@@ -897,6 +897,10 @@ class vmmDomain(vmmLibvirtObject):
|
|
devxml = devobj.get_xml_config()
|
|
self._backend.attachDevice(devxml)
|
|
|
|
+ def attach_device_flags(self, devobj, flags):
|
|
+ xml = devobj.get_xml_config()
|
|
+ self._backend.attachDeviceFlags(xml, flags)
|
|
+
|
|
def detach_device(self, devobj):
|
|
"""
|
|
Hotunplug device from running guest
|
|
@@ -915,6 +919,10 @@ class vmmDomain(vmmLibvirtObject):
|
|
xml = devobj.get_xml_config()
|
|
self._backend.updateDeviceFlags(xml, flags)
|
|
|
|
+ def detach_device_flags(self, devtype, dev_id_info, flags):
|
|
+ xml = self._get_device_xml(devtype, dev_id_info)
|
|
+ self._backend.detachDeviceFlags(xml, flags)
|
|
+
|
|
def hotplug_vcpus(self, vcpus):
|
|
vcpus = int(vcpus)
|
|
if vcpus != self.vcpu_count():
|