virt-manager/virtman-default-guest-from-host-os.patch
Charles Arnold 0ab97a4010 - If connection is Xen, default to PV instead of HVM.
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
2014-02-15 15:46:55 +00:00

75 lines
2.5 KiB
Diff

Index: virt-manager-0.10.1/virtManager/create.py
===================================================================
--- virt-manager-0.10.1.orig/virtManager/create.py
+++ virt-manager-0.10.1/virtManager/create.py
@@ -21,6 +21,8 @@
import logging
import threading
import time
+import sys
+import os
# pylint: disable=E0611
from gi.repository import GObject
@@ -1130,6 +1132,51 @@ class vmmCreate(vmmGObjectUI):
return
self.start_detection(forward=forward)
+ def _lookup_host_os(self):
+ if sys.platform == 'linux2':
+ if os.path.exists('/etc/issue'):
+ f = open('/etc/issue')
+ lines = f.readlines()
+ f.close()
+ for line in lines:
+ if "openSUSE 13" in line:
+ return 'linux', 'opensuse13'
+ if "openSUSE 12" in line:
+ return 'linux', 'opensuse12'
+ if "SUSE Linux Enterprise Server 11" in line:
+ return 'linux', 'sles11'
+ if "SUSE Linux Enterprise Desktop 11" in line:
+ return 'linux', 'sled11'
+ if "Fedora" in line:
+ return 'linux', 'fedora17'
+ if "Red Hat Enterprise Linux Server" in line:
+ return 'linux', 'rhel6'
+ return None, None
+
+ def detect_host_os(self):
+ box = self.widget('install-os-type')
+ if box.get_active() <= 0:
+ os_type, os_variant = self._lookup_host_os()
+ if os_type is None:
+ return
+ model = box.get_model()
+ index = 0
+ for row in model:
+ if row[0] == 'linux':
+ box.set_active(index)
+ break
+ index += 1
+ if os_variant is None:
+ return
+ box = self.widget('install-os-version')
+ model = box.get_model()
+ index = 0
+ for row in model:
+ if row[0] == os_variant:
+ box.set_active(index)
+ break
+ index += 1
+
def toggle_detect_os(self, src):
dodetect = src.get_active()
@@ -1141,6 +1188,8 @@ class vmmCreate(vmmGObjectUI):
if dodetect:
self.mediaDetected = False
self.detect_media_os()
+ else:
+ self.detect_host_os()
def _selected_os_row(self):
return uiutil.get_list_selection(self.widget("install-os-type"))