Accepting request 311376 from Virtualization

Update to virt-manager version 1.2.1

OBS-URL: https://build.opensuse.org/request/show/311376
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=121
This commit is contained in:
Dominique Leuenberger 2015-06-10 07:16:35 +00:00 committed by Git OBS Bridge
commit 789be914cd
35 changed files with 217 additions and 770 deletions

View File

@ -1,26 +0,0 @@
Subject: virt-manager: fix --show-host-summary error windows flooding
From: Giuseppe Scrivano gscrivan@redhat.com Mon May 11 15:05:57 2015 +0200
Date: Mon May 11 20:20:10 2015 +0200:
Git: 2c1e482b2df58e76624cb30625ce4bed0c663275
Break an endless loop vmmHost.overview_name_changed ->
vmmHost.conn_state_changed -> vmmHost._overview_name_changed.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1220322
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Index: virt-manager-1.2.0/virtManager/connection.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/connection.py
+++ virt-manager-1.2.0/virtManager/connection.py
@@ -1346,7 +1346,8 @@ class vmmConnection(vmmGObject):
self.config.set_conn_autoconnect(self.get_uri(), val)
def set_config_pretty_name(self, value):
- self.config.set_perconn(self.get_uri(), "/pretty-name", value)
+ if value != self._get_config_pretty_name():
+ self.config.set_perconn(self.get_uri(), "/pretty-name", value)
def _get_config_pretty_name(self):
return self.config.get_perconn(self.get_uri(), "/pretty-name")
def _on_config_pretty_name_changed(self, *args, **kwargs):

View File

@ -1,22 +0,0 @@
Subject: interface: read the start mode from the inactive conf XML
From: Giuseppe Scrivano gscrivan@redhat.com Thu May 14 16:27:55 2015 +0200
Date: Fri May 15 09:14:09 2015 +0200:
Git: 4b5c836a16da18e58e013a0fa6c3ca4caba00b94
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1154480
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
diff --git a/virtManager/interface.py b/virtManager/interface.py
index bd1e2ba..dc6f4da 100644
--- a/virtManager/interface.py
+++ b/virtManager/interface.py
@@ -101,7 +101,7 @@ class vmmInterface(vmmLibvirtObject):
return "Interface"
def get_startmode(self):
- return self.get_xmlobj().start_mode or "none"
+ return self.get_xmlobj(inactive=True).start_mode or "none"
def set_startmode(self, newmode):
xmlobj = self._make_xmlobj_to_define()

View File

@ -1,41 +0,0 @@
Subject: domain: Fix changing USB device model
From: Cole Robinson crobinso@redhat.com Tue May 19 13:21:36 2015 -0400
Date: Tue May 19 18:29:45 2015 -0400:
Git: 776c1d97c667628b03ad79d4e89457675f475dfb
Broken before v1.2.0
Index: virt-manager-1.2.0/virtManager/domain.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/domain.py
+++ virt-manager-1.2.0/virtManager/domain.py
@@ -953,23 +953,22 @@ class vmmDomain(vmmLibvirtObject):
def _change_model():
if editdev.type == "usb":
- guest = self._make_xmlobj_to_define()
- ctrls = guest.get_devices("controller")
+ ctrls = xmlobj.get_devices("controller")
ctrls = [x for x in ctrls if (x.type ==
VirtualController.TYPE_USB)]
for dev in ctrls:
- guest.remove_device(dev)
+ xmlobj.remove_device(dev)
if model == "ich9-ehci1":
for dev in VirtualController.get_usb2_controllers(
- guest.conn):
- guest.add_device(dev)
+ xmlobj.conn):
+ xmlobj.add_device(dev)
else:
- dev = VirtualController(guest.conn)
+ dev = VirtualController(xmlobj.conn)
dev.type = "usb"
if model != "default":
dev.model = model
- guest.add_device(dev)
+ xmlobj.add_device(dev)
elif editdev.type == "scsi":
if model == "default":

View File

@ -1,26 +0,0 @@
Subject: domain: Fix memory stats for shutoff VM (bz 1215453)
From: Cole Robinson crobinso@redhat.com Mon May 4 15:50:01 2015 -0400
Date: Mon May 4 15:50:01 2015 -0400:
Git: 848123e6c8850bafad28767a165bbbf8dc746a09
memory doesn't have a separate input/output stats, so we shouldn't use
the in_out_vector_helper. This resulted in shutoff VMs appearing to still
use memory in the manager window.
diff --git a/virtManager/domain.py b/virtManager/domain.py
index cdb8cd5..e96b80f 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1699,8 +1699,10 @@ class vmmDomain(vmmLibvirtObject):
cpudata = cpudata[0:limit]
return cpudata
def memory_usage_vector_limit(self, limit):
- return self.in_out_vector_limit(self.stats_memory_vector(),
- limit)
+ data = self.stats_memory_vector()
+ if len(data) > limit:
+ data = data[0:limit]
+ return data
def network_traffic_vector_limit(self, limit, ceil=None):
return self.in_out_vector_limit(self.network_traffic_vector(ceil),
limit)

View File

@ -1,30 +0,0 @@
Subject: connection: Fix sending net-removed signal
From: Cole Robinson crobinso@redhat.com Thu May 7 12:30:28 2015 -0400
Date: Thu May 7 12:30:28 2015 -0400:
Git: 88e18c86d36406b3dab032b2bb21b46767871b4b
Index: virt-manager-1.2.0/virtManager/connection.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/connection.py
+++ virt-manager-1.2.0/virtManager/connection.py
@@ -961,13 +961,17 @@ class vmmConnection(vmmGObject):
for obj in gone_objects:
class_name = obj.class_name()
+ try:
+ name = obj.get_name()
+ except:
+ name = str(obj)
if not self._objects.remove(obj):
logging.debug("Requested removal of %s=%s, but it's "
- "not in our object list.", class_name, obj.get_name())
+ "not in our object list.", class_name, name)
continue
- logging.debug("%s=%s removed", class_name, obj.get_name())
+ logging.debug("%s=%s removed", class_name, name)
if class_name == "domain":
self.emit("vm-removed", obj.get_connkey())
elif class_name == "network":

View File

@ -1,51 +0,0 @@
Subject: storage: do not throw exception if the volume or the pool don't exist
From: Giuseppe Scrivano gscrivan@redhat.com Thu May 7 13:42:00 2015 +0200
Date: Thu May 7 17:42:58 2015 +0200:
Git: ac2be79658ec5673d00ca9603db63b9b0de4fbd3
commit 5357b91402fb7a8a73921216926908c08f6ad99d changed the semantic of
conn.get_(vm|pool|interface|nodedev|net), to return None instead of
raising KeyError. Leave the exception handling code in case the
semantic is going to be reverted.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1219427
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Index: virt-manager-1.2.0/virtManager/delete.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/delete.py
+++ virt-manager-1.2.0/virtManager/delete.py
@@ -236,7 +236,11 @@ def populate_storage_list(storage_list,
if disk.source_pool:
try:
pool = conn.get_pool(disk.source_pool)
+ if pool is None:
+ return disk.path
vol = pool.get_volume(disk.path)
+ if vol is None:
+ return disk.path
return vol.get_target_path()
except KeyError:
return disk.path
Index: virt-manager-1.2.0/virtManager/details.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/details.py
+++ virt-manager-1.2.0/virtManager/details.py
@@ -2698,12 +2698,14 @@ class vmmDetails(vmmGObjectUI):
if not path:
size = "-"
else:
+ vol = None
if source_pool:
try:
pool = self.conn.get_pool(source_pool)
- vol = pool.get_volume(path)
+ if pool is not None:
+ vol = pool.get_volume(path)
except KeyError:
- vol = None
+ pass
else:
vol = self.conn.get_vol_by_path(path)

View File

@ -1,23 +0,0 @@
Subject: virtinst: enable qemu_ga for sles-11-sp4 and newer
From: Lin Ma lma@suse.com Wed May 20 09:26:44 2015 +0800
Date: Wed May 20 14:01:50 2015 -0400:
Git: bbc4f83bd3233617122ce89504f8cda8ddf88512
Qemu guest agent becomes available since sles 11 sp4 distro,
So enable qemu_ga while installing sles11sp4 and newer sles.
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 57039b0..76c2260 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -514,7 +514,7 @@ class _OsVariant(object):
return False
def supports_qemu_ga(self):
- return self._is_related_to(["fedora18", "rhel6.0"])
+ return self._is_related_to(["fedora18", "rhel6.0", "sles11sp4"])
def default_videomodel(self, guest):
if guest.os.is_pseries():

View File

@ -1,20 +0,0 @@
Subject: pollhelpers: Fix VM polling on old libvirt
From: Michał Kępień michal.kepien@nask.pl Thu May 7 11:10:20 2015 -0400
Date: Thu May 7 11:10:20 2015 -0400:
Git: c4d26d16a65e0ce6b88323e13669c7c388397d7f
https://bugzilla.redhat.com/show_bug.cgi?id=1219443
diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py
index 3eeada4..dafd079 100644
--- a/virtinst/pollhelpers.py
+++ b/virtinst/pollhelpers.py
@@ -268,7 +268,7 @@ def _old_fetch_vms(backend, origmap, build_func):
except:
logging.exception("Couldn't fetch domain '%s'", name)
- return (origmap, new, current)
+ return (origmap.values(), new.values(), current.values())
def fetch_vms(backend, origmap, build_func):

View File

@ -1,34 +0,0 @@
Subject: sshtunnels: fix exception when the address is not an IP
From: Giuseppe Scrivano gscrivan@redhat.com Wed May 6 12:52:40 2015 +0200
Date: Wed May 6 21:27:50 2015 +0200:
Git: ebcb7c064ca5a3afd2ec3a0c8f59328a7f71b009
bug introduced with commit a2d453f3e20d103a4767394300c5183fde9a6bb4
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1218958
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
index 53f43be..03e1738 100644
--- a/virtManager/sshtunnels.py
+++ b/virtManager/sshtunnels.py
@@ -48,10 +48,16 @@ class ConnectionInfo(object):
self._connhost = "127.0.0.1"
def _is_listen_localhost(self, host=None):
- return ipaddr.IPNetwork(host or self.gaddr).is_loopback
+ try:
+ return ipaddr.IPNetwork(host or self.gaddr).is_loopback
+ except:
+ return False
def _is_listen_any(self):
- return ipaddr.IPNetwork(self.gaddr).is_unspecified
+ try:
+ return ipaddr.IPNetwork(self.gaddr).is_unspecified
+ except:
+ return False
def need_tunnel(self):
if not self._is_listen_localhost():

View File

@ -1,51 +0,0 @@
Subject: create: verify HYPER-V support after customization
From: Giuseppe Scrivano gscrivan@redhat.com Wed May 20 18:27:13 2015 +0200
Date: Wed May 20 22:48:33 2015 +0200:
Git: f8af2e6b1083ec38ffa143ce4d04751f6d543362
commit 938060ae5340f6e28dc9669ba1ab79a1aa3d615e moved default devices
setup to happen before UEFI is set invalidating what the commit
5acfccf6032abb9e8be89130d05b661e8b3f42c7 does.
Add another check to happen before installing the guest to disable
HYPER-V when not supported.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1185253
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Index: virt-manager-1.2.0/virtManager/create.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/create.py
+++ virt-manager-1.2.0/virtManager/create.py
@@ -1790,6 +1790,7 @@ class vmmCreate(vmmGObjectUI):
if not self.is_visible():
return
logging.debug("User finished customize dialog, starting install")
+ guest.check_defaults()
self.start_install(guest)
def config_canceled(ignore):
Index: virt-manager-1.2.0/virtinst/guest.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/guest.py
+++ virt-manager-1.2.0/virtinst/guest.py
@@ -814,6 +814,18 @@ class Guest(XMLBuilder):
return False
return True
+ def check_defaults(self):
+ # This is used only by virt-manager to reset any defaults that may have
+ # changed through manual intervention via the customize wizard.
+ if not self._hv_supported():
+ self.features.hyperv_relaxed = None
+ self.features.hyperv_vapic = None
+ self.features.hyperv_spinlocks = None
+ self.features.hyperv_spinlocks_retries = None
+ for i in self.clock.timers:
+ if i.name == "hypervclock":
+ self.clock.remove_timer(i)
+
def _set_feature_defaults(self):
if self.os.is_container():
self.features.acpi = None

View File

@ -1,25 +0,0 @@
Subject: add-hardware: fix shortcut key for USB redir dev type
From: Giuseppe Scrivano gscrivan@redhat.com Mon May 11 10:02:54 2015 +0200
Date: Mon May 11 10:17:11 2015 +0200:
Git: fbdf574c53fc0138d4f346b0dbfebff28117605a
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1172108
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
diff --git a/ui/addhardware.ui b/ui/addhardware.ui
index 54dc695..32beb4f 100644
--- a/ui/addhardware.ui
+++ b/ui/addhardware.ui
@@ -1373,9 +1373,10 @@
<object class="GtkLabel" id="label3213">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">1</property>
<property name="label" translatable="yes">_Type:</property>
<property name="use_underline">True</property>
- <property name="xalign">1</property>
+ <property name="mnemonic_widget">usbredir-list</property>
</object>
<packing>
<property name="left_attach">0</property>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b2d9fb2a6efe454e0a7b73af6803cc45ff097eddc1d1bb8efb5bb36fe2efbbf0
size 1350664

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5677d96606ee3878891670d45bff6cb833def9436edbde7de8ff0529c967b80
size 1357234

View File

@ -1,3 +1,54 @@
-------------------------------------------------------------------
Mon Jun 8 06:07:48 MDT 2015 - carnold@suse.com
- Update to virt-manager 1.2.0
virt-manager-1.2.1.tar.bz2
* Bugfix release
* Fix connecting to older libvirt versions (Michał Kępień)
* Fix connecting to VM console with non-IP hostname (Giuseppe Scrivano)
* Fix addhardware/create wizard errors when a nodedev disappears
* Fix adding a second cdrom via customize dialog
- Dropped tarball and patches
virt-manager-1.2.0.tar.bz2
848123e6-fix-memory-stats-for-shutoff-VM.patch
ebcb7c06-fix-exception-when-the-address-is-not-an-IP.patch
c4d26d16-fix-VM-polling-on-old-libvirt.patch
ac2be796-do-not-throw-exception-if-volume-or-pool-dont-exist.patch
88e18c86-fix-sending-net-removed-signal.patch
fbdf574c-fix-shortcut-key-for-USB-redir-dev-type.patch
2c1e482b-fix--show-host-summary-error-windows-flooding.patch
4b5c836a-read-start-mode-from-inactive-conf-XML.patch
776c1d97-fix-changing-USB-device-model.patch
bbc4f83b-enable-qemu_ga-for-sles-11-sp4-and-newer.patch
f8af2e6b-verify-HYPER-V-support-after-customization.patch
9ea3fcd1-add-classes-for-SUSE-distros.patch
23f262ec-fetch-URL-media-from-content-file-for-suse-distros.patch
5618fa4c-add-support-for-detecting-os-variants-of-suse-distros.patch
9b99eff7-add-opensuse-13.x-tests.patch
f5a13510-clone-dont-use-separator-when-disk-under-root.patch
-------------------------------------------------------------------
Fri Jun 5 14:44:31 MDT 2015 - carnold@suse.com
- Upstream support for suse distros
9ea3fcd1-add-classes-for-SUSE-distros.patch
23f262ec-fetch-URL-media-from-content-file-for-suse-distros.patch
5618fa4c-add-support-for-detecting-os-variants-of-suse-distros.patch
9b99eff7-add-opensuse-13.x-tests.patch
- Drop virtinst-detect-suse-distros.patch
- Add detection for Open Enterprise Server
virtinst-detect-oes-distros.patch
- Upstream bug fix
f5a13510-clone-dont-use-separator-when-disk-under-root.patch
-------------------------------------------------------------------
Tue Jun 2 14:08:51 MDT 2015 - carnold@suse.com
- bsc#933242 - virt-manager: summary=Error launching manager: list
index out of range
virtman-show-suse-install-repos.patch
- Add depedency on typelib(Libosinfo)
-------------------------------------------------------------------
Wed May 20 13:14:27 MDT 2015 - carnold@suse.com

View File

@ -23,11 +23,11 @@
%define libvirt_xen_packages ""
%define preferred_distros "sles12,opensuse13.2"
%define kvm_packages ""
%define _version 1.2.0
%define _version 1.2.1
%define _release 1
Name: virt-manager
Version: 1.2.0
Version: 1.2.1
Release: 0
Summary: Virtual Machine Manager
License: GPL-2.0+
@ -37,17 +37,6 @@ Source0: %{name}-%{version}.tar.bz2
Source1: virt-install.rb
Source2: virt-install.desktop
# Upstream Patches
Patch1: 848123e6-fix-memory-stats-for-shutoff-VM.patch
Patch2: ebcb7c06-fix-exception-when-the-address-is-not-an-IP.patch
Patch3: c4d26d16-fix-VM-polling-on-old-libvirt.patch
Patch4: ac2be796-do-not-throw-exception-if-volume-or-pool-dont-exist.patch
Patch5: 88e18c86-fix-sending-net-removed-signal.patch
Patch6: fbdf574c-fix-shortcut-key-for-USB-redir-dev-type.patch
Patch7: 2c1e482b-fix--show-host-summary-error-windows-flooding.patch
Patch8: 4b5c836a-read-start-mode-from-inactive-conf-XML.patch
Patch9: 776c1d97-fix-changing-USB-device-model.patch
Patch10: bbc4f83b-enable-qemu_ga-for-sles-11-sp4-and-newer.patch
Patch11: f8af2e6b-verify-HYPER-V-support-after-customization.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -70,7 +59,7 @@ Patch106: virtman-add-s390x-arch-support.patch
Patch107: virtman-add-connect-default.patch
Patch120: virtinst-storage-ocfs2.patch
Patch121: virtinst-default-xen-to-qcow2-format.patch
Patch123: virtinst-detect-suse-distros.patch
Patch123: virtinst-detect-oes-distros.patch
Patch124: virtinst-modify-gui-defaults.patch
Patch125: virtinst-vol-default-nocow.patch
Patch126: virtinst-detect-windows-media.patch
@ -99,6 +88,7 @@ Requires: libosinfo >= 0.2.10
Requires: python-gconf
Requires: virt-manager-common = %{verrel}
Requires: vm-install >= 0.5.6
Requires: typelib(Libosinfo)
# Libvirt-glib
Requires: typelib(LibvirtGLib)
@ -166,17 +156,6 @@ machine).
%prep
%setup -q
# Upstream Patches
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1

View File

@ -1,10 +1,10 @@
References: bnc#885308
Enhancement to add a virtio RNG device to non windows VMs.
Index: virt-manager-1.1.0/virtinst/guest.py
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/guest.py
+++ virt-manager-1.1.0/virtinst/guest.py
@@ -53,6 +53,7 @@ from .pm import PM
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -54,6 +54,7 @@ from .pm import PM
from .seclabel import Seclabel
from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
from .devicedisk import VirtualDisk
@ -12,7 +12,7 @@ Index: virt-manager-1.1.0/virtinst/guest.py
class Guest(XMLBuilder):
@@ -681,6 +682,15 @@ class Guest(XMLBuilder):
@@ -675,6 +676,15 @@ class Guest(XMLBuilder):
return
self.add_device(VirtualGraphics(self.conn))
@ -28,11 +28,11 @@ Index: virt-manager-1.1.0/virtinst/guest.py
def add_default_devices(self):
self.add_default_graphics()
self.add_default_video_device()
@@ -688,6 +698,7 @@ class Guest(XMLBuilder):
@@ -682,6 +692,7 @@ class Guest(XMLBuilder):
self.add_default_console_device()
self.add_default_usb_controller()
self.add_default_channels()
+ self.add_default_rng()
def _set_transient_device_defaults(self, install):
def do_remove_media(d):
def _add_install_cdrom(self):
if self._install_cdrom_device:

View File

@ -0,0 +1,17 @@
Enhancement to correctly detect Open Enterprise Server media is
selected as the installation source.
Index: virt-manager-1.2.0/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.0/virtinst/urlfetcher.py
@@ -383,6 +383,10 @@ def _distroFromSUSEContent(fetcher, arch
dclass = SLEDDistro
if distro_version is None:
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
+ elif re.match(".*Open Enterprise Server*", distribution[1]):
+ dclass = SLESDistro
+ if distro_version is None:
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
elif re.match(".*openSUSE.*", distribution[1]):
dclass = OpensuseDistro
if distro_version is None:

View File

@ -1,253 +0,0 @@
Enhancement to correctly detect SUSE media when such media is
selected as the installation source.
Index: virt-manager-1.1.0/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.1.0/virtinst/urlfetcher.py
@@ -318,6 +318,94 @@ def _distroFromTreeinfo(fetcher, arch, v
return ob
+def _distroFromContent(fetcher, arch, vmtype=None):
+ # Parse content file for the 'LABEL' field containing the distribution name
+ # None if no content, GenericDistro if unknown label type.
+ if not fetcher.hasFile("content"):
+ return None
+
+ distribution = None
+ distro_version = None
+ distro_summary = None
+ distro_distro = None
+ distro_arch = None
+ filename = fetcher.acquireFile("content")
+ cbuf = f = None
+ try:
+ f = open(filename, "r")
+ cbuf = f.read()
+ except:
+ if f:
+ f.close()
+ os.unlink(filename)
+ return None
+ f.close()
+ os.unlink(filename)
+
+ lines = cbuf.splitlines()[1:]
+ for line in lines:
+ if line.startswith("LABEL "):
+ distribution = line.split(' ', 1)
+ elif line.startswith("DISTRO "):
+ distro_distro = line.rsplit(',', 1)
+ elif line.startswith("VERSION "):
+ distro_version = line.split(' ', 1)
+ elif line.startswith("SUMMARY "):
+ distro_summary = line.split(' ', 1)
+ elif line.startswith("BASEARCHS "):
+ distro_arch = line.split(' ', 1)
+ elif line.startswith("DEFAULTBASE "):
+ distro_arch = line.split(' ', 1)
+ elif line.startswith("REPOID "):
+ distro_arch = line.rsplit('/', 1)
+ if distribution and distro_version and distro_arch:
+ break
+
+ if not distribution:
+ if distro_summary:
+ distribution = distro_summary
+ elif distro_distro:
+ distribution = distro_distro
+ if distro_arch:
+ arch = distro_arch[1].strip()
+ else:
+ if cbuf.find("x86_64") != -1:
+ arch = "x86_64"
+ elif cbuf.find("i586") != -1:
+ arch = "i586"
+ elif cbuf.find("s390x") != -1:
+ arch = "s390x"
+
+ dclass = GenericDistro
+ if distribution:
+ if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
+ re.match(".*SUSE SLES*", distribution[1]):
+ dclass = SLESDistro
+ if distro_version is None:
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
+ elif re.match(".*SUSE Linux Enterprise Desktop*", distribution[1]):
+ dclass = SLEDDistro
+ if distro_version is None:
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
+ elif re.match(".*openSUSE.*", distribution[1]):
+ dclass = OpensuseDistro
+ if distro_version is None:
+ distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]]
+ # For tumbleweed we only have an 8 character date string so default to 13.2
+ if distro_version[1] and len(distro_version[1]) == 8:
+ distro_version = ['VERSION', '13.2']
+
+ if distro_version is None:
+ return None
+
+ ob = dclass(fetcher, arch, vmtype)
+ if dclass != GenericDistro:
+ ob.content = distro_version
+
+ # Explictly call this, so we populate os_type/variant info
+ ob.isValidStore()
+
+ return ob
def getDistroStore(guest, fetcher):
stores = []
@@ -334,6 +422,10 @@ def getDistroStore(guest, fetcher):
if dist:
return dist
+ dist = _distroFromContent(fetcher, arch, _type)
+ if dist:
+ return dist
+
stores = _allstores[:]
# If user manually specified an os_distro, bump it's URL class
@@ -375,6 +467,23 @@ def getDistroStore(guest, fetcher):
(fetcher.location, extramsg)))
+def detectMediaDistro(guest, location):
+ """
+ Attempt to detect the os type + variant for the passed location
+ """
+ import urlgrabber
+ meter = urlgrabber.progress.BaseMeter()
+ scratchdir = "/var/tmp"
+ fetcher = fetcherForURI(location, scratchdir, meter)
+
+ try:
+ fetcher.prepareLocation()
+ store = getDistroStore(guest, fetcher)
+ return store.get_osdict_info()
+ finally:
+ fetcher.cleanupLocation()
+
+
##################
# Distro classes #
##################
@@ -832,29 +941,64 @@ class SLDistro(RHELDistro):
class SuseDistro(Distro):
name = "SUSE"
- urldistro = "suse"
- os_variant = "linux"
_boot_iso_paths = ["boot/boot.iso"]
def __init__(self, *args, **kwargs):
+ self.content = None
Distro.__init__(self, *args, **kwargs)
if re.match(r'i[4-9]86', self.arch):
self.arch = 'i386'
- # Tested with Opensuse >= 10.2, 11, and sles 10
- self._hvm_kernel_paths = [("boot/%s/loader/linux" % self.arch,
- "boot/%s/loader/initrd" % self.arch)]
-
- # Matches Opensuse > 10.2 and sles 10
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
- "boot/%s/initrd-xen" % self.arch)]
+ oldkern = "linux"
+ oldinit = "initrd"
+ if self.arch == "x86_64":
+ oldkern += "64"
+ oldinit += "64"
+
+ if self.arch == "s390x" or \
+ self.arch == "ppc64" or self.arch == "ppc64le":
+
+ self._hvm_kernel_paths = [ ("boot/%s/linux" % self.arch,
+ "boot/%s/initrd" % self.arch) ]
+ # No Xen on s390x and ppc
+ self._xen_kernel_paths = []
+ else:
+ # Tested with Opensuse >= 10.2, 11, and sles 10
+ self._hvm_kernel_paths = [ ("boot/%s/loader/linux" % self.arch,
+ "boot/%s/loader/initrd" % self.arch) ]
+ # Tested with Opensuse 10.0
+ self._hvm_kernel_paths.append(("boot/loader/%s" % oldkern,
+ "boot/loader/%s" % oldinit))
+
+ # Matches Opensuse > 10.2 and sles 10
+ self._xen_kernel_paths = [ ("boot/%s/vmlinuz-xen" % self.arch,
+ "boot/%s/initrd-xen" % self.arch) ]
def isValidStore(self):
+ # self.content is the VERSION line from the contents file
+ if self.content is None or self.content[1] is None:
+ return False
+ distro_version = self.content[1].strip()
+ version = distro_version.split('.', 1)[0].strip()
+ if int(version) >= 10:
+ if self.os_variant.startswith("sles"):
+ self.os_variant += version
+ else:
+ self.os_variant += distro_version
+ else:
+ self.os_variant += "9"
+
if not self.fetcher.hasFile("directory.yast"):
return False
self.os_variant = self._detect_osdict_from_url()
+
+ # Reset kernel name for sle11 source on s390x
+ if self.arch == "s390x":
+ if self.os_variant == "sles11" or self.os_variant == "sled11":
+ self._hvm_kernel_paths = [ ("boot/%s/vmrdr.ikr" % self.arch,
+ "boot/%s/initrd" % self.arch) ]
return True
def _get_method_arg(self):
@@ -874,6 +1018,27 @@ class SuseDistro(Distro):
return osobj.name
return self.os_variant
+class SLESDistro(SuseDistro):
+
+ urldistro = "sles"
+ os_variant = "sles"
+
+class SLEDDistro(SuseDistro):
+
+ urldistro = "sled"
+ os_variant = "sled"
+
+# Suse image store is harder - we fetch the kernel RPM and a helper
+# RPM and then munge bits together to generate a initrd
+class OpensuseDistro(SuseDistro):
+
+ urldistro = "opensuse"
+ os_variant = "opensuse"
+
+class OESDistro(SuseDistro):
+
+ urldistro = "oes"
+ os_variant = "oes"
class DebianDistro(Distro):
# ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/
Index: virt-manager-1.1.0/virtinst/distroinstaller.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/distroinstaller.py
+++ virt-manager-1.1.0/virtinst/distroinstaller.py
@@ -505,6 +505,10 @@ class DistroInstaller(Installer):
"remote connection.")
else:
distro = OSDB.lookup_os_by_media(self.location)
+ # libosinfo relies on treeinfo to detect media which suse
+ # doesn't have. Fallback to url method for detecting ISO media.
+ if distro is None:
+ distro = urlfetcher.detectMediaDistro(guest, self.location)
except:
logging.debug("Error attempting to detect distro.", exc_info=True)

View File

@ -1,14 +1,14 @@
Enhancement to detect windows media. It is based solely upon
finding an autorun.inf file in the root of the installation source.
It only assumes windows, not the specific version of windows.
Index: virt-manager-1.1.0/virtinst/urlfetcher.py
Index: virt-manager-1.2.0/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.1.0/virtinst/urlfetcher.py
@@ -407,6 +407,24 @@ def _distroFromContent(fetcher, arch, vm
--- virt-manager-1.2.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.0/virtinst/urlfetcher.py
@@ -408,6 +408,24 @@ def _distroFromSUSEContent(fetcher, arch
return ob
+def _distroFromAutorun(fetcher, arch, vmtype=None):
+ # Just look for autorun.inf (also in uppercase)
+ # If present media is likely from a windows iso.
@ -30,7 +30,7 @@ Index: virt-manager-1.1.0/virtinst/urlfetcher.py
def getDistroStore(guest, fetcher):
stores = []
logging.debug("Finding distro store for location=%s", fetcher.location)
@@ -426,6 +444,10 @@ def getDistroStore(guest, fetcher):
@@ -427,6 +445,10 @@ def getDistroStore(guest, fetcher):
if dist:
return dist
@ -41,7 +41,7 @@ Index: virt-manager-1.1.0/virtinst/urlfetcher.py
stores = _allstores[:]
# If user manually specified an os_distro, bump it's URL class
@@ -1204,6 +1226,13 @@ class ALTLinuxDistro(Distro):
@@ -1175,6 +1197,13 @@ class ALTLinuxDistro(Distro):
logging.debug("Regex didn't match, not a %s distro", self.name)
return False

View File

@ -5,11 +5,11 @@ A fix for accessing nfs mounted media. A comment in the code states,
and carry the latter form around internally"
We need the RFC version to work correctly whereas redhat's anaconda
needs their own modified version.
Index: virt-manager-1.1.0/virtinst/util.py
Index: virt-manager-1.2.0/virtinst/util.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/util.py
+++ virt-manager-1.1.0/virtinst/util.py
@@ -557,3 +557,22 @@ def getInstallRepos(enabled_sources_only
--- virt-manager-1.2.0.orig/virtinst/util.py
+++ virt-manager-1.2.0/virtinst/util.py
@@ -559,3 +559,22 @@ def getInstallRepos(enabled_sources_only
zypper_output.insert(0, dom0_inst_source)
return (index_dom0, zypper_output)
@ -32,10 +32,10 @@ Index: virt-manager-1.1.0/virtinst/util.py
+
+ return url
+
Index: virt-manager-1.1.0/virtinst/distroinstaller.py
Index: virt-manager-1.2.0/virtinst/distroinstaller.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/distroinstaller.py
+++ virt-manager-1.1.0/virtinst/distroinstaller.py
--- virt-manager-1.2.0.orig/virtinst/distroinstaller.py
+++ virt-manager-1.2.0/virtinst/distroinstaller.py
@@ -51,6 +51,8 @@ def _sanitize_url(url):
"""
Do nothing for http or ftp, but make sure nfs is in the expected format
@ -45,10 +45,10 @@ Index: virt-manager-1.1.0/virtinst/distroinstaller.py
if url.startswith("nfs://"):
# Convert RFC compliant NFS nfs://server/path/to/distro
# to what mount/anaconda expect nfs:server:/path/to/distro
Index: virt-manager-1.1.0/virtinst/urlfetcher.py
Index: virt-manager-1.2.0/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.1.0/virtinst/urlfetcher.py
--- virt-manager-1.2.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.0/virtinst/urlfetcher.py
@@ -33,6 +33,7 @@ import urlparse
import urlgrabber.grabber as grabber

View File

@ -2,11 +2,11 @@ Reference: bnc#863821
grub.xen is required to boot PV VMs that use the BTRFS filesystem.
This patch forces the use of grub.xen (instead of using pygrub) for
newer suse distros like SLE12 and openSUSE 13.2.
Index: virt-manager-1.1.0/virtinst/guest.py
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/guest.py
+++ virt-manager-1.1.0/virtinst/guest.py
@@ -364,8 +364,18 @@ class Guest(XMLBuilder):
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -358,8 +358,18 @@ class Guest(XMLBuilder):
if (not install and
self.os.is_xenpv() and
not self.os.kernel):
@ -27,20 +27,20 @@ Index: virt-manager-1.1.0/virtinst/guest.py
return self.get_xml_config()
Index: virt-manager-1.1.0/virtinst/installer.py
Index: virt-manager-1.2.1/virtinst/installer.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/installer.py
+++ virt-manager-1.1.0/virtinst/installer.py
@@ -112,7 +112,7 @@ class Installer(object):
dev.validate()
return dev
--- virt-manager-1.2.1.orig/virtinst/installer.py
+++ virt-manager-1.2.1/virtinst/installer.py
@@ -99,7 +99,7 @@ class Installer(object):
break
return bootorder
- def alter_bootconfig(self, guest, isinstall):
+ def alter_bootconfig(self, guest, isinstall, force_update=False):
"""
Generate the portion of the guest xml that determines boot devices
and parameters. (typically the <os></os> block)
@@ -123,7 +123,7 @@ class Installer(object):
@@ -110,7 +110,7 @@ class Installer(object):
'post-install' phase.
@type isinstall: C{bool}
"""

View File

@ -1,10 +1,10 @@
Set cache mode for target installation disk to unsafe for better
performance.
Index: virt-manager-1.1.0/virtinst/guest.py
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/guest.py
+++ virt-manager-1.1.0/virtinst/guest.py
@@ -52,6 +52,7 @@ from .osxml import OSXML
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -53,6 +53,7 @@ from .osxml import OSXML
from .pm import PM
from .seclabel import Seclabel
from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
@ -12,9 +12,9 @@ Index: virt-manager-1.1.0/virtinst/guest.py
class Guest(XMLBuilder):
@@ -363,6 +364,14 @@ class Guest(XMLBuilder):
dev.set_defaults(self)
self._set_disk_defaults(disks=self._install_devices)
@@ -357,6 +358,14 @@ class Guest(XMLBuilder):
self._set_osxml_defaults()
+ # At install time set the target disk to 'unsafe' for
+ # better performance if the target is not a block device
@ -27,7 +27,7 @@ Index: virt-manager-1.1.0/virtinst/guest.py
self.bootloader = None
if (not install and
self.os.is_xenpv() and
@@ -380,7 +389,10 @@ class Guest(XMLBuilder):
@@ -374,7 +383,10 @@ class Guest(XMLBuilder):
self.bootloader = "/usr/bin/pygrub"
self.os.clear()

View File

@ -1,8 +1,8 @@
Use the correct qemu emulator based on the architecture.
Index: virt-manager-1.2.0/virtinst/guest.py
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/guest.py
+++ virt-manager-1.2.0/virtinst/guest.py
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -19,6 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
@ -11,7 +11,7 @@ Index: virt-manager-1.2.0/virtinst/guest.py
import logging
import urlgrabber.progress as progress
@@ -815,14 +816,28 @@ class Guest(XMLBuilder):
@@ -811,14 +812,28 @@ class Guest(XMLBuilder):
self.emulator = None
return

View File

@ -1,9 +1,9 @@
Enhancement to add ocfs2 as a supported FS type
Index: virt-manager-1.2.0/virtinst/storage.py
Index: virt-manager-1.2.1/virtinst/storage.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/storage.py
+++ virt-manager-1.2.0/virtinst/storage.py
@@ -436,7 +436,7 @@ class StoragePool(_StorageObject):
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py
@@ -447,7 +447,7 @@ class StoragePool(_StorageObject):
def list_formats(self):
if self.type == self.TYPE_FS:
return ["auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf",

View File

@ -4,11 +4,11 @@ issue on btrfs.
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Index: virt-manager-1.2.0/virtinst/storage.py
Index: virt-manager-1.2.1/virtinst/storage.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/storage.py
+++ virt-manager-1.2.0/virtinst/storage.py
@@ -705,6 +705,11 @@ class StorageVolume(_StorageObject):
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py
@@ -716,6 +716,11 @@ class StorageVolume(_StorageObject):
lazy_refcounts = XMLProperty("./target/features/lazy_refcounts",
is_bool=True, default_cb=_lazy_refcounts_default_cb)

View File

@ -1,9 +1,9 @@
Reference: bnc#869024
Add s390x support
Index: virt-manager-1.2.0/virtManager/create.py
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/create.py
+++ virt-manager-1.2.0/virtManager/create.py
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -417,7 +417,7 @@ class vmmCreate(vmmGObjectUI):
can_remote_url = self.conn.get_backend().support_remote_url_install()
@ -22,10 +22,10 @@ Index: virt-manager-1.2.0/virtManager/create.py
if self.conn.caps.host.cpu.arch not in prios:
prios = []
else:
Index: virt-manager-1.2.0/virtinst/osxml.py
Index: virt-manager-1.2.1/virtinst/osxml.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/osxml.py
+++ virt-manager-1.2.0/virtinst/osxml.py
--- virt-manager-1.2.1.orig/virtinst/osxml.py
+++ virt-manager-1.2.1/virtinst/osxml.py
@@ -70,6 +70,8 @@ class OSXML(XMLBuilder):
return self.arch == "ppc64" or self.arch == "ppc64le"
def is_pseries(self):
@ -35,11 +35,11 @@ Index: virt-manager-1.2.0/virtinst/osxml.py
_XML_ROOT_NAME = "os"
_XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
Index: virt-manager-1.2.0/virtinst/guest.py
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/guest.py
+++ virt-manager-1.2.0/virtinst/guest.py
@@ -119,7 +119,10 @@ class Guest(XMLBuilder):
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -120,7 +120,10 @@ class Guest(XMLBuilder):
self.skip_default_channel = False
self.skip_default_sound = False
self.skip_default_usbredir = False
@ -51,7 +51,7 @@ Index: virt-manager-1.2.0/virtinst/guest.py
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
self.__os_object = None
@@ -611,11 +614,13 @@ class Guest(XMLBuilder):
@@ -605,11 +608,13 @@ class Guest(XMLBuilder):
self.conn.check_support(
self.conn.SUPPORT_CONN_VIRTIO_CONSOLE)):
dev.target_type = "virtio"
@ -66,7 +66,7 @@ Index: virt-manager-1.2.0/virtinst/guest.py
return
if self.get_devices("video"):
return
@@ -660,7 +665,7 @@ class Guest(XMLBuilder):
@@ -654,7 +659,7 @@ class Guest(XMLBuilder):
return
if self.os.is_container():
return
@ -75,7 +75,7 @@ Index: virt-manager-1.2.0/virtinst/guest.py
return
self.add_device(VirtualGraphics(self.conn))
@@ -960,7 +965,7 @@ class Guest(XMLBuilder):
@@ -956,7 +961,7 @@ class Guest(XMLBuilder):
if self._hv_only_supports_virtio():
return True

View File

@ -1,10 +1,10 @@
Enhancement to switch the label from 'Kickstart' to 'Autoyast' when
a suse distro is selected.
Index: virt-manager-1.2.0/virtManager/create.py
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/create.py
+++ virt-manager-1.2.0/virtManager/create.py
@@ -1242,11 +1242,34 @@ class vmmCreate(vmmGObjectUI):
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -1256,11 +1256,34 @@ class vmmCreate(vmmGObjectUI):
self.populate_os_type_model()
return
@ -30,7 +30,7 @@ Index: virt-manager-1.2.0/virtManager/create.py
+ label.show()
+
def change_os_version(self, box):
show_all = uiutil.get_list_selection(box, 3)
show_all = uiutil.get_list_selection(box, column=3)
if not show_all:
return
@ -39,7 +39,7 @@ Index: virt-manager-1.2.0/virtManager/create.py
# 'show all OS' was clicked
# Get previous type to reselect it later
type_row = self._selected_os_row()
@@ -1611,7 +1634,10 @@ class vmmCreate(vmmGObjectUI):
@@ -1625,7 +1648,10 @@ class vmmCreate(vmmGObjectUI):
if extra:
extraargs += extra
if ks:
@ -51,7 +51,7 @@ Index: virt-manager-1.2.0/virtManager/create.py
if extraargs:
self.guest.installer.extraargs = extraargs
@@ -2054,6 +2080,7 @@ class vmmCreate(vmmGObjectUI):
@@ -2068,6 +2094,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro_type)
vl = self.set_os_val(self.widget("install-os-version"), distro_var)
self.set_distro_labels(dl, vl)
@ -59,10 +59,10 @@ Index: virt-manager-1.2.0/virtManager/create.py
def check_detection(self, idx, forward):
results = None
Index: virt-manager-1.2.0/ui/create.ui
Index: virt-manager-1.2.1/ui/create.ui
===================================================================
--- virt-manager-1.2.0.orig/ui/create.ui
+++ virt-manager-1.2.0/ui/create.ui
--- virt-manager-1.2.1.orig/ui/create.ui
+++ virt-manager-1.2.1/ui/create.ui
@@ -843,7 +843,7 @@ bar</property>
<property name="column_spacing">6</property>
<property name="row_spacing">4</property>

View File

@ -1,9 +1,9 @@
Enhancement to default to the host os version when creating a VM
and media detection of the install source is turned off.
Index: virt-manager-1.1.0/virtManager/create.py
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/create.py
+++ virt-manager-1.1.0/virtManager/create.py
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -21,6 +21,8 @@
import logging
import threading
@ -13,7 +13,7 @@ Index: virt-manager-1.1.0/virtManager/create.py
from gi.repository import GObject
from gi.repository import Gtk
@@ -836,7 +838,7 @@ class vmmCreate(vmmGObjectUI):
@@ -842,7 +844,7 @@ class vmmCreate(vmmGObjectUI):
preferred = self.config.preferred_distros
variants = virtinst.OSDB.list_os(typename=_type, sortpref=preferred)
supportl = virtinst.OSDB.list_os(typename=_type, sortpref=preferred,
@ -22,7 +22,7 @@ Index: virt-manager-1.1.0/virtManager/create.py
for v in variants:
supported = v in supportl or v.name == "generic"
@@ -1158,6 +1160,53 @@ class vmmCreate(vmmGObjectUI):
@@ -1173,6 +1175,53 @@ class vmmCreate(vmmGObjectUI):
return
self.start_detection(forward=forward)
@ -76,7 +76,7 @@ Index: virt-manager-1.1.0/virtManager/create.py
def toggle_detect_os(self, src):
dodetect = src.get_active()
@@ -1170,6 +1219,8 @@ class vmmCreate(vmmGObjectUI):
@@ -1185,6 +1234,8 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-os-version-entry").set_text("")
self.mediaDetected = False
self.detect_media_os()
@ -84,4 +84,4 @@ Index: virt-manager-1.1.0/virtManager/create.py
+ self.detect_host_os()
def _selected_os_row(self):
return uiutil.get_list_selection(
return uiutil.get_list_selected_row(self.widget("install-os-type"))

View File

@ -1,9 +1,9 @@
Enhancement to default to PV instead of HVM on Xen host.
Index: virt-manager-1.1.0/virtManager/create.py
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/create.py
+++ virt-manager-1.1.0/virtManager/create.py
@@ -860,7 +860,12 @@ class vmmCreate(vmmGObjectUI):
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -877,7 +877,12 @@ class vmmCreate(vmmGObjectUI):
if gtype is None:
# If none specified, prefer HVM so install options aren't limited
# with a default PV choice.

View File

@ -1,11 +1,11 @@
Reference: bnc#885094
grub.xen is required to boot Xen PV VMs using BTRFS. It belongs to
the grub2-x86_64-xen RPM and should never be deleted.
Index: virt-manager-1.2.0/virtManager/delete.py
Index: virt-manager-1.2.1/virtManager/delete.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/delete.py
+++ virt-manager-1.2.0/virtManager/delete.py
@@ -254,7 +254,7 @@ def populate_storage_list(storage_list,
--- virt-manager-1.2.1.orig/virtManager/delete.py
+++ virt-manager-1.2.1/virtManager/delete.py
@@ -253,7 +253,7 @@ def populate_storage_list(storage_list,
diskdata.append(("dtb", vm.get_xmlobj().os.dtb, True, False))
for target, path, ro, shared in diskdata:

View File

@ -1,9 +1,9 @@
Enhancement to add the eepro100 NIC for KVM
Index: virt-manager-1.2.0/virtManager/addhardware.py
Index: virt-manager-1.2.1/virtManager/addhardware.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/addhardware.py
+++ virt-manager-1.2.0/virtManager/addhardware.py
@@ -582,6 +582,7 @@ class vmmAddHardware(vmmGObjectUI):
--- virt-manager-1.2.1.orig/virtManager/addhardware.py
+++ virt-manager-1.2.1/virtManager/addhardware.py
@@ -571,6 +571,7 @@ class vmmAddHardware(vmmGObjectUI):
if vm.is_hvm():
mod_list = []
if vm.get_hv_type() in ["kvm", "qemu", "test"]:

View File

@ -2,11 +2,11 @@ References: bnc#892003
For very large memory VMs Xen takes a long time scrubbing memory
which causes the libvirt connection to timeout. Upstream was not
interested in making this a preferences option (4/11/2015)
Index: virt-manager-1.1.0/virtManager/connection.py
Index: virt-manager-1.2.1/virtManager/connection.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/connection.py
+++ virt-manager-1.1.0/virtManager/connection.py
@@ -903,7 +903,7 @@ class vmmConnection(vmmGObject):
--- virt-manager-1.2.1.orig/virtManager/connection.py
+++ virt-manager-1.2.1/virtManager/connection.py
@@ -904,7 +904,7 @@ class vmmConnection(vmmGObject):
self.caps.get_cpu_values("x86_64")
try:

View File

@ -3,11 +3,11 @@ When the 'Power on virtual machine' button is double clicked,
virt-manager issues two start commands to start the VM which
results in a failure. There is code elsewhere to desensitize the
button but this patch does it earlier.
Index: virt-manager-1.2.0/virtManager/details.py
Index: virt-manager-1.2.1/virtManager/details.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/details.py
+++ virt-manager-1.2.0/virtManager/details.py
@@ -1471,6 +1471,9 @@ class vmmDetails(vmmGObjectUI):
--- virt-manager-1.2.1.orig/virtManager/details.py
+++ virt-manager-1.2.1/virtManager/details.py
@@ -1465,6 +1465,9 @@ class vmmDetails(vmmGObjectUI):
self.widget("details-menu-usb-redirection").set_sensitive(can_usb)
def control_vm_run(self, src_ignore):

View File

@ -2,10 +2,10 @@ Enhancement that gets the hosts installation location from
install.inf and also collects the repos provided by zypper.
These locations are then presented as potential installation
locations when createing a VM.
Index: virt-manager-1.1.0/virtManager/create.py
Index: virt-manager-1.2.0/virtManager/create.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/create.py
+++ virt-manager-1.1.0/virtManager/create.py
--- virt-manager-1.2.0.orig/virtManager/create.py
+++ virt-manager-1.2.0/virtManager/create.py
@@ -359,7 +359,13 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-url-options").set_expanded(False)
urlmodel = self.widget("install-url-box").get_model()
@ -21,15 +21,16 @@ Index: virt-manager-1.1.0/virtManager/create.py
self.populate_media_model(ksmodel, self.config.get_kickstart_urls())
self.set_distro_labels("-", "-", force=True)
Index: virt-manager-1.1.0/virtinst/util.py
Index: virt-manager-1.2.0/virtinst/util.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/util.py
+++ virt-manager-1.1.0/virtinst/util.py
@@ -23,11 +23,13 @@ import os
--- virt-manager-1.2.0.orig/virtinst/util.py
+++ virt-manager-1.2.0/virtinst/util.py
@@ -23,11 +23,14 @@ import os
import random
import re
import stat
+import commands
+import subprocess
+from subprocess import Popen, PIPE
import libvirt
@ -39,7 +40,7 @@ Index: virt-manager-1.1.0/virtinst/util.py
def listify(l):
@@ -462,3 +464,96 @@ def register_libvirt_error_handler():
@@ -462,3 +465,97 @@ def register_libvirt_error_handler():
ignore = userdata
ignore = err
libvirt.registerErrorHandler(f=libvirt_callback, ctx=None)
@ -102,35 +103,36 @@ Index: virt-manager-1.1.0/virtinst/util.py
+ if os.geteuid() != 0:
+ return (0, [])
+ dom0_inst_source = getHostInstallSource()
+ locations = commands.getoutput("/usr/bin/zypper lr -u | awk -F'|' '{ print $6 }'")
+ locations = locations[(locations.rfind('URI')):].split()
+ index = 0
+ try:
+ if enabled_sources_only is True:
+ cmd = ['/usr/bin/zypper', 'lr', '-u', '-E']
+ else:
+ cmd = ['/usr/bin/zypper', 'lr', '-u']
+ p = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE)
+ stdout, stderr = p.communicate()
+ zypper_output = stdout
+ except:
+ if dom0_inst_source is None:
+ dom0_inst_source = []
+ return (0, dom0_inst_source)
+
+ zypper_list = zypper_output.split("\n")
+ zypper_header = [x.strip(' ') for x in zypper_list[0].split("|")]
+ uri_index = zypper_header.index("URI")
+
+ index_dom0 = -1
+ number_of_sources = 0
+ zypper_output = []
+ # If we only want to list enabled sources
+ if enabled_sources_only == True:
+ enabled = commands.getoutput("/usr/bin/zypper lr -u | awk -F'|' '{ print $4 }'")
+ enabled = enabled[(enabled.rfind('Enabled')):].split()
+ for e in enabled:
+ if e == "Yes":
+ str = locations[index]
+ if str.startswith('ftp://') or str.startswith('http://') or str.startswith('nfs://') or str.startswith('smb://'):
+ zypper_output.append(str)
+ if dom0_inst_source is not None and str == dom0_inst_source:
+ index_dom0 = number_of_sources
+ number_of_sources += 1
+ index += 1
+ else:
+ locations.sort()
+ for l in locations:
+ str = locations[index]
+ for repo in zypper_list:
+ repo = [x.strip(' ') for x in repo.split("|")]
+ if len(repo) >= uri_index:
+ str = repo[uri_index]
+ if str.startswith('ftp://') or str.startswith('http://') or str.startswith('nfs://') or str.startswith('smb://'):
+ zypper_output.append(str)
+ if dom0_inst_source is not None and str == dom0_inst_source:
+ index_dom0 = number_of_sources
+ number_of_sources += 1
+ index += 1
+
+ if index_dom0 == -1 and dom0_inst_source:
+ index_dom0 = 0
+ zypper_output.insert(0, dom0_inst_source)

View File

@ -1,11 +1,11 @@
Reference: bnc#885380
Xen no longer supports vmdk and never supported qed.
See /usr/share/doc/packages/xen/misc/xl-disk-configuration.txt
Index: virt-manager-1.2.0/virtManager/addhardware.py
Index: virt-manager-1.2.1/virtManager/addhardware.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/addhardware.py
+++ virt-manager-1.2.0/virtManager/addhardware.py
@@ -762,11 +762,14 @@ class vmmAddHardware(vmmGObjectUI):
--- virt-manager-1.2.1.orig/virtManager/addhardware.py
+++ virt-manager-1.2.1/virtManager/addhardware.py
@@ -751,11 +751,14 @@ class vmmAddHardware(vmmGObjectUI):
combo.set_model(model)
uiutil.init_combo_text_column(combo, 0)