Accepting request 209690 from Virtualization

SLE12 alpha1 submission

OBS-URL: https://build.opensuse.org/request/show/209690
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=88
This commit is contained in:
Stephan Kulow 2013-12-09 06:27:00 +00:00 committed by Git OBS Bridge
commit 567798a5f4
37 changed files with 1096 additions and 802 deletions

24
virt-install.desktop Normal file
View File

@ -0,0 +1,24 @@
[Desktop Entry]
X-SuSE-translate=true
X-SuSE-DocTeamID=ycc_xen
Type=Application
Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Virtualization;
X-KDE-ModuleType=Library
X-KDE-RootOnly=true
X-KDE-HasReadOnlyMode=false
X-SuSE-YaST-Call=virt-install
X-SuSE-YaST-Group=Virtualization
X-SuSE-YaST-Argument=
X-SuSE-YaST-RootOnly=true
X-SuSE-YaST-Geometry=
X-SuSE-YaST-SortKey=
Icon=yast-create-new-vm
Exec=/sbin/yast2 virt-install
Name=Create Virtual Machines for Xen and KVM
GenericName=Create Virtual Machines
X-KDE-SubstituteUID=true

71
virt-install.ycp Normal file
View File

@ -0,0 +1,71 @@
/* ------------------------------------------------------------------------------
* Copyright (c) 2013 Novell, Inc. All Rights Reserved.
*
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, contact Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail, you may find
* current contact information at www.novell.com.
* ------------------------------------------------------------------------------
*/
/**
* File: clients/virt-install.ycp
* Package: Installation of a virtual machine
* Summary: Main VM installation YaST frontend for python based virt-install
* Authors: Charles E. Arnold <carnold@novell.com>
*
* $Id$
*/
{ // begin
import "Popup";
import "Arch";
textdomain "virt-install";
//===================================================================
// Start virt-install (GUI) or vm-install if Text mode (commandline)
//-------------------------------------------------------------------
integer status = 0;
map details = $[];
if (UI::TextMode())
{
y2milestone("Running virt-install in text mode is not supported. Running vm-install instead in command line mode.");
status = (integer)UI::RunInTerminal("/usr/bin/vm-install");
}
else
{
y2milestone("Launching virt-manager to run virt-install in GUI mode.");
if ( Arch::is_xen() == false ) {
details = (map)SCR::Execute(.target.bash_output, "/usr/bin/virt-manager --connect=qemu:///system --show-domain-creator");
}
else {
details = (map)SCR::Execute(.target.bash_output, "/usr/bin/virt-manager --connect=xen:/// --show-domain-creator");
}
status = details["exit"]:0;
}
y2milestone("virt-install finished with exit code: <%1>", status);
if (status == 0) {
return `next;
} else {
if (size(details["stderr"]:"") > 0){
Popup::ErrorDetails(_("Failed to start virt-install"), (string)details["stderr"]:"");
} else {
Popup::Error(_("Failed to start virt-install"));
}
}
return `nil;
} // end

View File

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

View File

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

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Mon Nov 25 16:12:07 MDT 2013 - carnold@suse.com
- fate#316388: virt-manager: Support the latest version (0.10.x or newer)
virt-manager-0.10.0.tar.bz2
- Update to virt-manager 0.10.0 includes
* Merged code with python-virtinst. virtinst is no longer public
* Port from GTK2 to GTK3 (Daniel Berrange, Cole Robinson)
* Port from gconf to gsettings
* Port from autotools to python distutils
* Remove virt-manager-tui
* Remove HAL support
* IPv6 and static route virtual network support (Gene Czarcinski)
* virt-install: Add cpu host-passthrough (Ken ICHIKAWA, Hu Tao)
- Patches now included from the deprecated python-virtinst repo
virt-install.desktop
virt-install.ycp
virtinst-allow-ide-hdb.patch
virtinst-allow-pv-iso-install.patch
virtinst-add-cache-modes.patch
virtinst-cdrom.patch
virtinst-clone-disks.patch
virtinst-detect-suse-distros.patch
virtinst-none-arch-fix.patch
virtinst-qed.patch
virtinst-storage-ocfs2.patch
virtinst-support-suse-distros.patch
virtinst-xen-drive-type.patch
- Dropped old tarball and fixes now upstream
virt-manager-0.9.5.tar.bz2
virtman-dropped-connection-segfault.patch
virtman-graph-row-spacing.patch
virtman-memleak-callbacks.patch
virtman-memleak-disable-graph.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Sep 5 14:03:32 MDT 2013 - carnold@suse.com Thu Sep 5 14:03:32 MDT 2013 - carnold@suse.com

View File

@ -16,27 +16,25 @@
# #
%define gsysconfdir /etc %define with_guestfs 0
%define gconftool /usr/bin/gconftool-2 %define askpass_package "openssh-askpass"
%define virtinst_maj 0 %define qemu_user "qemu"
%define virtinst_min 600 %define libvirt_packages "libvirt-daemon-qemu,libvirt-daemon-driver-network"
%define virtinst_rel 4 %define preferred_distros "opensuse,sles"
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel} %define kvm_packages "qemu"
%define _version 0.10.0
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()") %define _release 1
Name: virt-manager Name: virt-manager
Version: %{_version}
Release: 0
Summary: Virtual Machine Manager Summary: Virtual Machine Manager
License: GPL-2.0+ License: GPL-2.0+
Group: System/Monitoring Group: System/Monitoring
Version: 0.9.5 Url: http://virt-manager.org/
Release: 0 Source0: %{name}-%{version}.tar.bz2
Url: http://virt-manager.et.redhat.com Source1: virt-install.ycp
Source0: virt-manager-%{version}.tar.bz2 Source2: virt-install.desktop
Patch0: virtman-dropped-connection-segfault.patch
Patch1: virtman-memleak-disable-graph.patch
Patch2: virtman-memleak-callbacks.patch
Patch3: virtman-graph-row-spacing.patch
Patch50: virtman-desktop.patch Patch50: virtman-desktop.patch
Patch51: virtman-cdrom.patch Patch51: virtman-cdrom.patch
Patch52: virtman-kvm.patch Patch52: virtman-kvm.patch
@ -48,45 +46,59 @@ Patch62: virtman-eepro100.patch
Patch63: virtman-qed.patch Patch63: virtman-qed.patch
Patch64: virtman-update-backend.patch Patch64: virtman-update-backend.patch
Patch65: virtman-slow-mouse.patch Patch65: virtman-slow-mouse.patch
Patch66: virtman-vminstall.patch Patch66: virtman-reverse-serialcon.patch
Patch67: virtman-reverse-serialcon.patch Patch67: virtman-default-guest-from-host-os.patch
Patch68: virtman-default-guest-from-host-os.patch Patch68: virtman-allow-pv-iso-install.patch
Patch69: virtman-allow-pv-iso-install.patch Patch69: virtman-autoyast-support.patch
Patch70: virtman-autoyast-support.patch Patch70: virtman-vminstall.patch
ExclusiveArch: %{ix86} x86_64 s390x Patch150: virtinst-cdrom.patch
Patch151: virtinst-storage-ocfs2.patch
Patch152: virtinst-qed.patch
Patch153: virtinst-add-cache-modes.patch
Patch154: virtinst-none-arch-fix.patch
Patch155: virtinst-allow-pv-iso-install.patch
Patch156: virtinst-support-suse-distros.patch
Patch157: virtinst-detect-suse-distros.patch
Patch158: virtinst-allow-ide-hdb.patch
Patch159: virtinst-xen-drive-type.patch
Patch160: virtinst-clone-disks.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
# %define verrel %{version}-%{release}
BuildRequires: desktop-file-utils Requires: virt-manager-common = %{verrel}
BuildRequires: gconf2-devel Requires: gtk3
BuildRequires: gettext
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: scrollkeeper
BuildRequires: update-desktop-files
Requires: dbus-1-python
Requires: dbus-1-x11
Requires: gnome-keyring
Requires: libvirt-python >= 0.7.0
Requires: libxml2-python >= 2.6.23
Requires: vm-install >= 0.5.6
%ifarch %{ix86}
Requires: vtemodule.so
%else
Requires: vtemodule.so()(64bit)
%endif
Requires: librsvg
Requires: netcat-openbsd
Requires: python-gconf Requires: python-gconf
Requires: python-gobject2 Requires: vm-install >= 0.5.6
Requires: python-gtk
Requires: python-gtk-vnc # Libvirt-glib
Requires: python-urlgrabber Requires: libvirt-glib-1_0-0 >= 0.0.9
Requires: python-virtinst == %{virtinst_maj}.%{virtinst_min}.%{virtinst_rel} Requires: typelib-1_0-LibvirtGLib-1_0
Requires: scrollkeeper
Requires: xorg-x11-fonts # Virtual Terminal Emulator (vte)
Requires: libvte2_90-9
Requires: typelib-1_0-Vte-2_90
# For console widget
Requires: gtk-vnc2
Requires: libspice-client-glib-2_0-8
Requires: libspice-client-gtk-3_0-4
Requires: typelib-1_0-SpiceClientGlib-2_0
Requires: typelib-1_0-SpiceClientGtk-3_0
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-GVnc-1_0
Requires: typelib-1_0-GtkVnc-2_0
Recommends: python-SpiceClientGtk Recommends: python-SpiceClientGtk
%if %{with_guestfs}
Requires: python-libguestfs
%endif
BuildRequires: glib2-devel
BuildRequires: intltool
BuildRequires: perl
BuildRequires: python
%description %description
Virtual Machine Manager provides a graphical tool for administering virtual Virtual Machine Manager provides a graphical tool for administering virtual
machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices, machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices,
@ -95,19 +107,41 @@ for existing VMs on local or remote machines. Uses libvirt as the backend
management API. management API.
%package common
Summary: Common files used by the different Virtual Machine Manager interfaces
Group: System/Monitoring
# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
Requires: python-urlgrabber
Requires: python-ipaddr
%description common
Common files used by the different virt-manager interfaces, as well as
virt-install related tools.
%package -n virt-install
Summary: Utilities for installing virtual machines
Group: System/Monitoring
Requires: virt-manager-common = %{verrel}
Provides: virt-clone
Provides: virt-image
Provides: virt-convert
Provides: python-virtinst
Obsoletes: python-virtinst <= 0.600.4
%description -n virt-install
Package includes several command line utilities, including virt-install
(build and install new VMs) and virt-clone (clone an existing virtual
machine).
Authors:
--------
Daniel Berrange <berrange@redhat.com>
Hugh O. Brock <hbrock@redhat.com>
Jeremy Katz <katzj@redhat.com>
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch50 -p1 %patch50 -p1
%patch51 -p1 %patch51 -p1
%patch52 -p1 %patch52 -p1
@ -123,78 +157,124 @@ Authors:
%patch67 -p1 %patch67 -p1
%patch68 -p1 %patch68 -p1
%patch69 -p1 %patch69 -p1
%patch70 -p1 #%patch70 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
%patch153 -p1
%patch154 -p1
%patch155 -p1
%patch156 -p1
%patch157 -p1
%patch158 -p1
%patch159 -p1
%patch160 -p1
%build %build
# autoreconf -i %if %{qemu_user}
%configure --sysconfdir=%{gsysconfdir} --with-tui=no %define _qemu_user --qemu-user=%{qemu_user}
make %{?_smp_mflags} %endif
%if %{kvm_packages}
%define _kvm_packages --kvm-package-names=%{kvm_packages}
%endif
%if %{preferred_distros}
%define _preferred_distros --preferred-distros=%{preferred_distros}
%endif
%if %{libvirt_packages}
%define _libvirt_packages --libvirt-package-names=%{libvirt_packages}
%endif
%if %{askpass_package}
%define _askpass_package --askpass-package-names=%{askpass_package}
%endif
python setup.py configure \
--pkgversion="%{version}" \
--default-graphics="spice" \
%{?_qemu_user} \
%{?_kvm_packages} \
%{?_libvirt_packages} \
%{?_askpass_package} \
%{?_preferred_distros} \
%{?_default_graphics}
%install %install
make install DESTDIR=$RPM_BUILD_ROOT python setup.py install -O1 --root=$RPM_BUILD_ROOT
# Unsupport languages: mkdir -p $RPM_BUILD_ROOT/%{_datadir}/YaST2/clients/
rm -rf $RPM_BUILD_ROOT/usr/share/locale/or install -m644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/YaST2/clients/virt-install.ycp
%find_gconf_schemas mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/YaST2/
for lang_file in %{name} install -m644 %SOURCE2 $RPM_BUILD_ROOT/%{_datadir}/applications/YaST2/virt-install.desktop
do
%find_lang $lang_file single_lang_file.lang
done
cat %{name}.schemas_list single_lang_file.lang > %{name}.lst
sed -i '\^/usr/share/gnome/help/^d' %{name}.lst
%suse_update_desktop_file %{name} X-SuSE-YaST-Virtualization
sed -i -e 's/Categories=.*/Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Virtualization;/' $RPM_BUILD_ROOT/%{_datadir}/applications/YaST2/%{name}.desktop
%clean %find_lang %{name}
# rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%post %post
%if 0%{?suse_version} < 1140 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%run_suseconfig -m glib2 /usr/bin/update-desktop-database &> /dev/null || :
%run_suseconfig -m gtk2
%else
%desktop_database_post
%icon_theme_cache_post
%endif
%postun %postun
%if 0%{?suse_version} > 1130 if [ $1 -eq 0 ] ; then
%desktop_database_postun /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
%icon_theme_cache_postun /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
%preun -f %{name}.schemas_preun %posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%posttrans -f %{name}.schemas_posttrans %files
%files -f %{name}.lst
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog %doc README COPYING NEWS
%{_bindir}/%{name} %{_bindir}/%{name}
%{_libexecdir}/%{name}-launch
%dir %{_datadir}/%{name}
#%{_datadir}/%{name}/*.glade
%dir %{_datadir}/%{name}/pixmaps
%dir %{_datadir}/%{name}/icons
%dir %{_datadir}/%{name}/icons/hicolor/
%dir %{_datadir}/%{name}/icons/hicolor/*/
%dir %{_datadir}/%{name}/icons/hicolor/*/*/
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/*/
%dir %{_datadir}/icons/hicolor/*/*/
%{_datadir}/%{name}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/%{name}/*.py
%{_datadir}/%{name}/*.ui
%dir %{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/virtManager/*.py
%{_datadir}/applications/YaST2/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
# FIXME: autobuild complains that these are unowned (not true...)
%dir %{_datadir}/dbus-1 %dir /usr/share/virt-manager/ui
%dir %{_datadir}/dbus-1/services %{_datadir}/%{name}/ui/*.ui
%dir %{_datadir}/applications/YaST2 %{_datadir}/%{name}/virt-manager
%{_datadir}/%{name}/virtManager
%dir /usr/share/icons/hicolor
%dir /usr/share/icons/hicolor/*/
%dir /usr/share/icons/hicolor/*/apps
%{_datadir}/%{name}/icons
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
%files common -f %{name}.lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/virtcli
%{_datadir}/%{name}/virtconv
%{_datadir}/%{name}/virtinst
%files -n virt-install
%defattr(-,root,root,-)
%{_mandir}/man1/virt-install.1*
%{_mandir}/man1/virt-clone.1*
%{_mandir}/man1/virt-convert.1*
%{_mandir}/man1/virt-image.1*
%{_mandir}/man5/virt-image.5*
%{_datadir}/%{name}/virt-install
%{_datadir}/%{name}/virt-clone
%{_datadir}/%{name}/virt-image
%{_datadir}/%{name}/virt-convert
%dir %{_datadir}/*
%dir %{_datadir}/*/*
%{_datadir}/YaST2/clients/virt-install.ycp
%{_datadir}/applications/YaST2/virt-install.desktop
%{_bindir}/virt-install
%{_bindir}/virt-clone
%{_bindir}/virt-image
%{_bindir}/virt-convert
%changelog %changelog

View File

@ -0,0 +1,28 @@
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -312,10 +312,13 @@ class VirtualDisk(VirtualDevice):
driver_types = [DRIVER_TAP_RAW, DRIVER_TAP_QCOW,
DRIVER_TAP_QED, DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
+ CACHE_MODE_DIRECTSYNC = "directsync"
CACHE_MODE_NONE = "none"
+ CACHE_MODE_UNSAFE = "unsafe"
CACHE_MODE_WRITETHROUGH = "writethrough"
CACHE_MODE_WRITEBACK = "writeback"
- cache_types = [CACHE_MODE_NONE, CACHE_MODE_WRITETHROUGH,
+ cache_types = [CACHE_MODE_DIRECTSYNC, CACHE_MODE_NONE,
+ CACHE_MODE_UNSAFE, CACHE_MODE_WRITETHROUGH,
CACHE_MODE_WRITEBACK]
DEVICE_DISK = "disk"
@@ -599,7 +602,7 @@ class VirtualDisk(VirtualDevice):
@type bus: C{str}
@param shareable: If disk can be shared among VMs
@type shareable: C{bool}
- @param driverCache: Disk cache mode (none, writethrough, writeback)
+ @param driverCache: Disk cache mode (none, directsync, unsafe, writethrough, writeback)
@type driverCache: member of cache_types
@param format: Storage volume format to use when creating storage
@type format: C{str}

View File

@ -0,0 +1,21 @@
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1742,14 +1742,8 @@ class VirtualDisk(VirtualDevice):
if gen_t in except_targets:
continue
if gen_t not in skip_targets:
- if self.device != self.DEVICE_CDROM:
- if i != ord('c') - ord('a'):
- self.target = gen_t
- return self.target
- else:
- if i >= ord('c') - ord('a'):
- self.target = gen_t
- return self.target
+ self.target = gen_t
+ return self.target
# Check except_targets for any options
for t in except_targets:

View File

@ -0,0 +1,32 @@
Index: virt-manager-0.10.0/virtinst/DistroInstaller.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/DistroInstaller.py
+++ virt-manager-0.10.0/virtinst/DistroInstaller.py
@@ -442,7 +442,7 @@ class DistroInstaller(Installer.Installe
return False
is_url = not self._location_is_path
- mount_dvd = self._location_is_path and not self.cdrom
+ mount_dvd = self._location_is_path and self.cdrom
return bool(is_url or mount_dvd)
@@ -451,11 +451,14 @@ class DistroInstaller(Installer.Installe
dev = None
if self.cdrom:
- if self.location:
- dev = self._prepare_cdrom(guest, meter)
+ if self.is_xenpv() and guest._lookup_osdict_key('pv_cdrom_install'):
+ dev = self._prepare_kernel_and_initrd(guest, meter)
else:
- # Booting from a cdrom directly allocated to the guest
- pass
+ if self.location:
+ dev = self._prepare_cdrom(guest, meter)
+ else:
+ # Booting from a cdrom directly allocated to the guest
+ pass
else:
dev = self._prepare_kernel_and_initrd(guest, meter)

30
virtinst-cdrom.patch Normal file
View File

@ -0,0 +1,30 @@
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1712,7 +1712,7 @@ class VirtualDisk(VirtualDevice):
if maxnode > (26 * 26 * 26):
raise RuntimeError("maxnode value is too high")
- # Regular scanning
+ # Start cdrom at 'c' and skip 'c' for non-cdrom
for i in range(1, maxnode + 1):
gen_t = prefix
@@ -1738,8 +1738,14 @@ class VirtualDisk(VirtualDevice):
if gen_t in except_targets:
continue
if gen_t not in skip_targets:
- self.target = gen_t
- return self.target
+ if self.device != self.DEVICE_CDROM:
+ if i != ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
+ else:
+ if i >= ord('c') - ord('a'):
+ self.target = gen_t
+ return self.target
# Check except_targets for any options
for t in except_targets:

View File

@ -0,0 +1,36 @@
Index: virt-manager-0.10.0/virtinst/CloneManager.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/CloneManager.py
+++ virt-manager-0.10.0/virtinst/CloneManager.py
@@ -530,6 +530,7 @@ class CloneDesign(object):
xmldisk.type = clone_disk.type
xmldisk.path = clone_disk.path
xmldisk.driver_type = orig_disk.driver_type
+ xmldisk.driver_name = orig_disk.driver_name
# Save altered clone xml
self._clone_xml = self._guest.get_xml_config()
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1203,6 +1203,10 @@ class VirtualDisk(VirtualDevice):
if util.is_vdisk(self.path):
drvname = self.DRIVER_TAP
drvtype = self.DRIVER_TAP_VDISK
+ elif drvname is None and drvtype:
+ drvtypes = ['qcow2', 'vmdk']
+ if drvtype in drvtypes:
+ drvname = 'tap'
return drvname or None, drvtype or None
@@ -1543,6 +1547,8 @@ class VirtualDisk(VirtualDevice):
if drvxml and self.driver_name is None:
if self.is_qemu():
self.driver_name = "qemu"
+ else:
+ self.driver_name = self.get_driver_name()
if not self.driver_name is None:
drvxml = (" name='%s'" % self.driver_name) + drvxml

View File

@ -0,0 +1,148 @@
Index: virt-manager-0.10.0/virtinst/OSDistro.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/OSDistro.py
+++ virt-manager-0.10.0/virtinst/OSDistro.py
@@ -70,8 +70,14 @@ def _storeForDistro(fetcher, baseuri, ty
arch, typ, scratchdir)
if dist:
return dist
+
skip_treeinfo = True
+ dist = virtinst.OSDistro.distroFromContent(fetcher, progresscb, baseuri,
+ arch, typ, scratchdir)
+ if dist:
+ return dist
+
# FIXME: This 'distro ==' doesn't cut it. 'distro' is from our os
# dictionary, so would look like 'fedora9' or 'rhel5', so this needs
# to be a bit more intelligent
@@ -236,6 +242,57 @@ def distroFromTreeinfo(fetcher, progress
return ob
+def distroFromContent(fetcher, progresscb, uri, arch, vmtype=None,
+ scratchdir=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
+ filename = fetcher.acquireFile("content", progresscb)
+ 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)
+ if distro_version:
+ break
+ if line.startswith("VERSION "):
+ distro_version = line.split(' ', 1)
+ if distribution:
+ break
+ if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
+ re.match(".*SUSE SLES*", distribution[1]):
+ dclass = SLESDistro
+ elif re.match(".*SUSE Linux Enterprise Desktop*", distribution[1]):
+ dclass = SLEDDistro
+ elif re.match(".*openSUSE.*", distribution[1]):
+ dclass = OpensuseDistro
+ else:
+ dclass = GenericDistro
+
+ ob = dclass(uri, arch, vmtype, scratchdir)
+ if dclass != GenericDistro:
+ ob.content = distro_version
+
+ # Explictly call this, so we populate os_type/variant info
+ ob.isValidStore(fetcher, progresscb)
+
+ return ob
+
# An image store is a base class for retrieving either a bootable
# ISO image, or a kernel+initrd pair for a particular OS distribution
@@ -689,6 +746,7 @@ class SuseDistro(Distro):
_boot_iso_paths = ["boot/boot.iso"]
def __init__(self, uri, arch, vmtype=None, scratchdir=None):
+ self.content = None
Distro.__init__(self, uri, arch, vmtype, scratchdir)
if re.match(r'i[4-9]86', arch):
self.arch = 'i386'
@@ -699,18 +757,32 @@ class SuseDistro(Distro):
oldkern += "64"
oldinit += "64"
- # 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)]
+ if self.arch == "s390x":
+ self._hvm_kernel_paths = [ ("boot/%s/vmrdr.ikr" % self.arch,
+ "boot/%s/initrd" % self.arch) ]
+ # No Xen on s390x
+ 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, fetcher, progresscb):
+ # self.content is the VERSION line from the contents file
+ distro_version = self.content[1]
+ version = distro_version.split('.', 1)[0].strip()
+ if int(version) >= 10:
+ self.os_variant += version
+ else:
+ self.os_variant += "9"
+
# Suse distros always have a 'directory.yast' file in the top
# level of install tree, which we use as the magic check
if fetcher.hasFile("directory.yast"):
@@ -915,6 +987,19 @@ class SuseDistro(Distro):
# pass
os.system("rm -rf " + cpiodir)
+class SLESDistro(SuseDistro):
+
+ os_variant = "sles"
+
+class SLEDDistro(SuseDistro):
+
+ 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):
+
+ os_variant = "opensuse"
class DebianDistro(Distro):
# ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/

View File

@ -0,0 +1,15 @@
Index: virt-manager-0.10.0/virtinst/CapabilitiesParser.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/CapabilitiesParser.py
+++ virt-manager-0.10.0/virtinst/CapabilitiesParser.py
@@ -130,7 +130,9 @@ class CPUValues(object):
child = child.next
def get_arch(self, arch):
- if re.match(r'i[4-9]86', arch):
+ if arch is None:
+ arch = "x86"
+ elif re.match(r'i[4-9]86', arch):
arch = "x86"
elif arch == "x86_64":
arch = "x86"

95
virtinst-qed.patch Normal file
View File

@ -0,0 +1,95 @@
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -306,10 +306,11 @@ class VirtualDisk(VirtualDevice):
DRIVER_TAP_RAW = "aio"
DRIVER_TAP_QCOW = "qcow"
+ DRIVER_TAP_QED = "qed"
DRIVER_TAP_VMDK = "vmdk"
DRIVER_TAP_VDISK = "vdisk"
driver_types = [DRIVER_TAP_RAW, DRIVER_TAP_QCOW,
- DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
+ DRIVER_TAP_QED, DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
CACHE_MODE_NONE = "none"
CACHE_MODE_WRITETHROUGH = "writethrough"
Index: virt-manager-0.10.0/virtinst/ImageParser.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/ImageParser.py
+++ virt-manager-0.10.0/virtinst/ImageParser.py
@@ -208,6 +208,7 @@ class Disk:
FORMAT_ISO = "iso"
FORMAT_QCOW = "qcow"
FORMAT_QCOW2 = "qcow2"
+ FORMAT_QED = "qed"
FORMAT_VMDK = "vmdk"
FORMAT_VDI = "vdi"
@@ -239,6 +240,7 @@ class Disk:
formats = [Disk.FORMAT_RAW,
Disk.FORMAT_QCOW,
Disk.FORMAT_QCOW2,
+ Disk.FORMAT_QED,
Disk.FORMAT_VMDK,
Disk.FORMAT_ISO,
Disk.FORMAT_VDI]
Index: virt-manager-0.10.0/virtconv/diskcfg.py
===================================================================
--- virt-manager-0.10.0.orig/virtconv/diskcfg.py
+++ virt-manager-0.10.0/virtconv/diskcfg.py
@@ -36,6 +36,7 @@ DISK_FORMAT_QCOW = 4
DISK_FORMAT_QCOW2 = 5
DISK_FORMAT_COW = 6
DISK_FORMAT_VDI = 7
+DISK_FORMAT_QED = 8
DISK_TYPE_DISK = 0
DISK_TYPE_CDROM = 1
@@ -52,6 +53,7 @@ disk_suffixes = {
DISK_FORMAT_QCOW2: ".qcow2",
DISK_FORMAT_COW: ".cow",
DISK_FORMAT_VDI: ".vdi",
+ DISK_FORMAT_QED: ".qed",
}
qemu_formats = {
@@ -62,6 +64,7 @@ qemu_formats = {
DISK_FORMAT_QCOW2: "qcow2",
DISK_FORMAT_COW: "cow",
DISK_FORMAT_VDI: "vdi",
+ DISK_FORMAT_QED: "qed",
}
disk_format_names = {
@@ -73,6 +76,7 @@ disk_format_names = {
"qcow2": DISK_FORMAT_QCOW2,
"cow": DISK_FORMAT_COW,
"vdi": DISK_FORMAT_VDI,
+ "qed": DISK_FORMAT_QED,
}
checksum_types = {
@@ -268,7 +272,8 @@ class disk(object):
out_format == DISK_FORMAT_VMDK or
out_format == DISK_FORMAT_QCOW or
out_format == DISK_FORMAT_QCOW2 or
- out_format == DISK_FORMAT_COW):
+ out_format == DISK_FORMAT_COW or
+ out_format == DISK_FORMAT_QED):
raise NotImplementedError(_("Cannot convert to disk format %s") %
output_format)
Index: virt-manager-0.10.0/virtconv/parsers/virtimage.py
===================================================================
--- virt-manager-0.10.0.orig/virtconv/parsers/virtimage.py
+++ virt-manager-0.10.0/virtconv/parsers/virtimage.py
@@ -250,6 +250,7 @@ class virtimage_parser(formats.parser):
ImageParser.Disk.FORMAT_QCOW: diskcfg.DISK_FORMAT_QCOW,
ImageParser.Disk.FORMAT_QCOW2: diskcfg.DISK_FORMAT_QCOW2,
ImageParser.Disk.FORMAT_VDI: diskcfg.DISK_FORMAT_VDI,
+ ImageParser.Disk.FORMAT_QED: diskcfg.DISK_FORMAT_QED,
}
fmt = None

View File

@ -0,0 +1,13 @@
Index: virt-manager-0.10.0/virtinst/Storage.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/Storage.py
+++ virt-manager-0.10.0/virtinst/Storage.py
@@ -539,7 +539,7 @@ class FilesystemPool(StoragePool):
get_volume_class = staticmethod(get_volume_class)
formats = ["auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf",
- "gfs", "gfs2", "vfat", "hfs+", "xfs"]
+ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2"]
# Register applicable property methods from parent class
perms = property(StorageObject.get_perms, StorageObject.set_perms)

View File

@ -0,0 +1,162 @@
Index: virt-manager-0.10.0/virtinst/osdict.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/osdict.py
+++ virt-manager-0.10.0/virtinst/osdict.py
@@ -408,33 +408,93 @@ OS_TYPES = {
},
"opensuse11": {
- "label": "openSuse 11",
+ "label": "openSUSE 11",
"distro": "suse",
"supported": True,
+ "pv_cdrom_install": True,
"devices" : {
DISK : VIRTIO_DISK,
NET : VIRTIO_NET,
},
},
"opensuse12": {
- "label": "openSuse 12",
+ "label": "openSUSE 12",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
+ "devices" : {
+ DISK : VIRTIO_DISK,
+ NET : VIRTIO_NET,
+ },
+ },
+ "opensuse13": {
+ "label": "openSUSE 13",
"distro": "suse",
"supported": True,
+ "pv_cdrom_install": True,
"devices" : {
DISK : VIRTIO_DISK,
NET : VIRTIO_NET,
},
},
+ "oes2l": {
+ "label": "Novell Open Enterprise Server 2",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
+ },
+ "oes11": {
+ "label": "Novell Open Enterprise Server 11",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
+ "devices" : {
+ DISK : VIRTIO_DISK,
+ NET : VIRTIO_NET,
+ },
+ },
+
+ "sles9": {
+ "label": "Suse Linux Enterprise Server 9",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": False,
+ },
"sles10": {
- "label": "Suse Linux Enterprise Server",
+ "label": "Suse Linux Enterprise Server 10",
"distro": "suse",
"supported": True,
+ "pv_cdrom_install": True,
+ "devices" : {
+ DISK : VIRTIO_DISK,
+ },
},
"sles11": {
"label": "Suse Linux Enterprise Server 11",
"distro": "suse",
"supported": True,
+ "pv_cdrom_install": True,
+ "devices" : {
+ DISK : VIRTIO_DISK,
+ NET : VIRTIO_NET,
+ },
+ },
+
+ "sled10": {
+ "label": "Suse Linux Enterprise Desktop 10",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
+ "devices" : {
+ DISK : VIRTIO_DISK,
+ },
+ },
+ "sled11": {
+ "label": "Suse Linux Enterprise Desktop 11",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
"devices" : {
DISK : VIRTIO_DISK,
NET : VIRTIO_NET,
@@ -619,6 +679,12 @@ OS_TYPES = {
VIDEO : VMVGA_VIDEO,
},
},
+ "win8": {
+ "label": "Microsoft Windows 8",
+ "supported": True,
+ "sortby": "mswin8",
+ "distro": "win",
+ },
"generic24": {
"label": "Generic 2.4.x kernel"
@@ -682,6 +748,12 @@ OS_TYPES = {
"sortby": "mswinserv2008",
"distro": "winserv",
},
+ "win2k12": {
+ "label": "Microsoft Windows Server 2012",
+ "supported": True,
+ "sortby": "mswinserv2012",
+ "distro": "winserv",
+ },
"vista": {
"label": "Microsoft Windows Vista",
"supported": True,
@@ -694,6 +766,12 @@ OS_TYPES = {
"sortby": "mswin7",
"distro": "win",
},
+ "win8": {
+ "label": "Microsoft Windows 8",
+ "supported": True,
+ "sortby": "mswin8",
+ "distro": "win",
+ },
},
},
@@ -770,6 +848,13 @@ OS_TYPES = {
"apic": False,
},
+ "rear": {
+ "label": "Relax and Recover",
+ "distro": "suse",
+ "supported": True,
+ "pv_cdrom_install": True,
+ },
+
"netware4": {
"label": "Novell Netware 4",
},
@@ -778,6 +863,7 @@ OS_TYPES = {
},
"netware6": {
"label": "Novell Netware 6",
+ "supported": True,
"pv_cdrom_install": True,
},

View File

@ -0,0 +1,18 @@
Reference: bnc#813082
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1177,6 +1177,11 @@ class VirtualDisk(VirtualDevice):
if drvname == self.DRIVER_QEMU:
drvtype = _qemu_sanitize_drvtype(self.type, self.format,
manual_format=True)
+ else:
+ drvtype = self.format
+ drvtypes = ['qcow2', 'vmdk']
+ if drvtype in drvtypes and drvname is None:
+ drvname = 'tap'
elif self.vol_object:
fmt = util.get_xml_path(self.vol_object.XMLDesc(0),

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/create.py Index: virt-manager-0.10.0/virtManager/create.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/create.py --- virt-manager-0.10.0.orig/virtManager/create.py
+++ virt-manager-0.9.5/src/virtManager/create.py +++ virt-manager-0.10.0/virtManager/create.py
@@ -686,11 +686,18 @@ class vmmCreate(vmmGObjectUI): @@ -666,11 +666,18 @@ class vmmCreate(vmmGObjectUI):
default = len(model) default = len(model)
if gtype == "xen": if gtype == "xen":

View File

@ -1,13 +1,13 @@
Index: virt-manager-0.9.5/src/virtManager/engine.py Index: virt-manager-0.10.0/virtManager/engine.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/engine.py --- virt-manager-0.10.0.orig/virtManager/engine.py
+++ virt-manager-0.9.5/src/virtManager/engine.py +++ virt-manager-0.10.0/virtManager/engine.py
@@ -218,7 +218,7 @@ class vmmEngine(vmmGObject): @@ -466,7 +466,7 @@ class vmmEngine(vmmGObject):
conn = self.add_conn(uri) self.config.add_conn(conn.get_uri())
if autoconnect is not None: if autoconnect is not None:
- conn.set_autoconnect(bool(autoconnect)) - conn.set_autoconnect(bool(autoconnect))
+ self.connect_to_uri(uri) + self.connect_to_uri(uri)
self.show_manager()
if do_start: if do_start:
conn.open()

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/details.py Index: virt-manager-0.10.0/virtManager/details.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/details.py --- virt-manager-0.10.0.orig/virtManager/details.py
+++ virt-manager-0.9.5/src/virtManager/details.py +++ virt-manager-0.10.0/virtManager/details.py
@@ -2195,12 +2195,10 @@ class vmmDetails(vmmGObjectUI): @@ -2215,12 +2215,10 @@ class vmmDetails(vmmGObjectUI):
return self._change_config_helper(df, da, hf, ha) return self._change_config_helper(df, da, hf, ha)
@ -19,7 +19,7 @@ Index: virt-manager-0.9.5/src/virtManager/details.py
auto = self.widget("config-autostart") auto = self.widget("config-autostart")
try: try:
self.vm.set_autostart(auto.get_active()) self.vm.set_autostart(auto.get_active())
@@ -2209,6 +2207,11 @@ class vmmDetails(vmmGObjectUI): @@ -2229,6 +2227,11 @@ class vmmDetails(vmmGObjectUI):
(_("Error changing autostart value: %s") % str(e))) (_("Error changing autostart value: %s") % str(e)))
return False return False
@ -31,8 +31,8 @@ Index: virt-manager-0.9.5/src/virtManager/details.py
if self.editted(EDIT_BOOTORDER): if self.editted(EDIT_BOOTORDER):
bootdevs = self.get_config_boot_devs() bootdevs = self.get_config_boot_devs()
add_define(self.vm.set_boot_device, bootdevs) add_define(self.vm.set_boot_device, bootdevs)
@@ -2580,6 +2583,8 @@ class vmmDetails(vmmGObjectUI): @@ -2597,6 +2600,8 @@ class vmmDetails(vmmGObjectUI):
buttons=gtk.BUTTONS_OK, buttons=Gtk.ButtonsType.OK,
dialog_type=dtype) dialog_type=dtype)
+ self.update_on_xend_start() + self.update_on_xend_start()

View File

@ -1,22 +1,31 @@
Index: virt-manager-0.9.5/src/virtManager/create.py Index: virt-manager-0.10.0/virtManager/create.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/create.py --- virt-manager-0.10.0.orig/virtManager/create.py
+++ virt-manager-0.9.5/src/virtManager/create.py +++ virt-manager-0.10.0/virtManager/create.py
@@ -1253,12 +1253,26 @@ class vmmCreate(vmmGObjectUI): @@ -1237,12 +1237,35 @@ class vmmCreate(vmmGObjectUI):
variant = self.widget("install-os-version") variant = self.widget("install-os-version")
variant.set_active(0) variant.set_active(0)
+ def _update_kickstart_label(self): + def _update_kickstart_label(self):
+ # Update label based on os version selected to either kickstart vs autoyast + # Update label based on os version selected to either kickstart or autoyast
+ combo = self.widget("install-os-version") + combo = self.widget("install-os-version")
+ if combo.get_active() != -1: + if combo.get_active() != -1:
+ os_ver = combo.get_active_text() + tree_iter = combo.get_active_iter()
+ label = self.widget("kickstart-url-label") + if tree_iter != None:
+ if label and os_ver: + model = combo.get_model()
+ if os_ver.startswith('opensuse') or os_ver.startswith('sle') or os_ver.startswith('oes'): + unused, os_name = model[tree_iter][:2]
+ label.set_text("AutoYaST URL:") + else:
+ else: + entry = combo.get_child()
+ label.set_text("Kickstart URL:") + os_name = entry.get_text()
+ if os_name:
+ os_name = os_name.lower()
+ label = self.widget("kickstart-url-label")
+ if label and os_name:
+ if os_name.startswith('opensuse') or os_name.startswith('suse') or os_name.startswith('novell'):
+ label.set_text("AutoYaST URL:")
+ else:
+ label.set_text("Kickstart URL:")
+ label.show()
+ +
def change_os_version(self, box): def change_os_version(self, box):
model = box.get_model() model = box.get_model()
@ -29,7 +38,7 @@ Index: virt-manager-0.9.5/src/virtManager/create.py
# Get previous # Get previous
os_type_list = self.widget("install-os-type") os_type_list = self.widget("install-os-type")
os_type_model = os_type_list.get_model() os_type_model = os_type_list.get_model()
@@ -1648,7 +1662,10 @@ class vmmCreate(vmmGObjectUI): @@ -1633,7 +1656,10 @@ class vmmCreate(vmmGObjectUI):
if extra: if extra:
extraargs += extra extraargs += extra
if ks: if ks:
@ -41,7 +50,7 @@ Index: virt-manager-0.9.5/src/virtManager/create.py
if extraargs: if extraargs:
self.guest.installer.extraargs = extraargs self.guest.installer.extraargs = extraargs
@@ -2121,6 +2138,7 @@ class vmmCreate(vmmGObjectUI): @@ -2091,6 +2117,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro) dl = self.set_os_val(self.widget("install-os-type"), distro)
vl = self.set_os_val(self.widget("install-os-version"), ver) vl = self.set_os_val(self.widget("install-os-version"), ver)
self.set_distro_labels(dl, vl) self.set_distro_labels(dl, vl)
@ -49,11 +58,11 @@ Index: virt-manager-0.9.5/src/virtManager/create.py
def check_detection(self, idx, forward): def check_detection(self, idx, forward):
results = None results = None
Index: virt-manager-0.9.5/src/vmm-create.ui Index: virt-manager-0.10.0/ui/vmm-create.ui
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/vmm-create.ui --- virt-manager-0.10.0.orig/ui/vmm-create.ui
+++ virt-manager-0.9.5/src/vmm-create.ui +++ virt-manager-0.10.0/ui/vmm-create.ui
@@ -807,7 +807,7 @@ @@ -825,7 +825,7 @@
<property name="column_spacing">6</property> <property name="column_spacing">6</property>
<property name="row_spacing">4</property> <property name="row_spacing">4</property>
<child> <child>

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/addhardware.py Index: virt-manager-0.10.0/virtManager/addhardware.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/addhardware.py --- virt-manager-0.10.0.orig/virtManager/addhardware.py
+++ virt-manager-0.9.5/src/virtManager/addhardware.py +++ virt-manager-0.10.0/virtManager/addhardware.py
@@ -551,6 +551,8 @@ class vmmAddHardware(vmmGObjectUI): @@ -546,6 +546,8 @@ class vmmAddHardware(vmmGObjectUI):
add_dev("virtio-scsi", virtinst.VirtualDisk.DEVICE_LUN, add_dev("virtio-scsi", virtinst.VirtualDisk.DEVICE_LUN,
_("Virtio SCSI lun")) _("Virtio SCSI lun"))
if self.conn.is_xen() or self.conn.is_test_conn(): if self.conn.is_xen() or self.conn.is_test_conn():

View File

@ -1,7 +1,7 @@
Index: virt-manager-0.9.5/src/virtManager/create.py Index: virt-manager-0.10.0/virtManager/create.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/create.py --- virt-manager-0.10.0.orig/virtManager/create.py
+++ virt-manager-0.9.5/src/virtManager/create.py +++ virt-manager-0.10.0/virtManager/create.py
@@ -20,6 +20,8 @@ @@ -20,6 +20,8 @@
import threading import threading
@ -9,9 +9,9 @@ Index: virt-manager-0.9.5/src/virtManager/create.py
+import sys +import sys
+import os +import os
import gtk # pylint: disable=E0611
from gi.repository import GObject
@@ -1159,6 +1161,51 @@ class vmmCreate(vmmGObjectUI): @@ -1143,6 +1145,51 @@ class vmmCreate(vmmGObjectUI):
return return
self.start_detection(forward=forward) self.start_detection(forward=forward)
@ -63,7 +63,7 @@ Index: virt-manager-0.9.5/src/virtManager/create.py
def toggle_detect_os(self, src): def toggle_detect_os(self, src):
dodetect = src.get_active() dodetect = src.get_active()
@@ -1174,6 +1221,7 @@ class vmmCreate(vmmGObjectUI): @@ -1158,6 +1205,7 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-os-version-label").hide() self.widget("install-os-version-label").hide()
self.widget("install-os-type").show() self.widget("install-os-type").show()
self.widget("install-os-version").show() self.widget("install-os-version").show()

View File

@ -1,39 +1,13 @@
Index: virt-manager-0.9.5/src/Makefile.am Index: virt-manager-0.10.0/data/virt-manager.desktop.in
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/Makefile.am --- virt-manager-0.10.0.orig/data/virt-manager.desktop.in
+++ virt-manager-0.9.5/src/Makefile.am +++ virt-manager-0.10.0/data/virt-manager.desktop.in
@@ -14,7 +14,7 @@ libexec_SCRIPTS = $(PACKAGE)-launch
gladedir = $(pkgdatadir)
glade_DATA = $(wildcard $(srcdir)/*.ui)
-desktopdir = $(datadir)/applications
+desktopdir = $(datadir)/applications/YaST2/
desktop_DATA_IN = $(PACKAGE).desktop.in.in
desktop_DATA = $(PACKAGE).desktop
Index: virt-manager-0.9.5/src/Makefile.in
===================================================================
--- virt-manager-0.9.5.orig/src/Makefile.in
+++ virt-manager-0.9.5/src/Makefile.in
@@ -288,7 +288,7 @@ libexec_DATA_IN = $(PACKAGE)-launch.in
libexec_SCRIPTS = $(PACKAGE)-launch
gladedir = $(pkgdatadir)
glade_DATA = $(wildcard $(srcdir)/*.ui)
-desktopdir = $(datadir)/applications
+desktopdir = $(datadir)/applications/YaST2/
desktop_DATA_IN = $(PACKAGE).desktop.in.in
desktop_DATA = $(PACKAGE).desktop
dbusdir = $(datadir)/dbus-1/services
Index: virt-manager-0.9.5/src/virt-manager.desktop.in.in
===================================================================
--- virt-manager-0.9.5.orig/src/virt-manager.desktop.in.in
+++ virt-manager-0.9.5/src/virt-manager.desktop.in.in
@@ -1,8 +1,19 @@ @@ -1,8 +1,19 @@
[Desktop Entry] [Desktop Entry]
_Name=Virtual Machine Manager _Name=Virtual Machine Manager
-_Comment=Manage virtual machines -_Comment=Manage virtual machines
-Icon=::PACKAGE:: -Icon=virt-manager
-Exec=::PACKAGE:: -Exec=virt-manager
+_Comment=Manage Virtual Machines for Xen and KVM +_Comment=Manage Virtual Machines for Xen and KVM
+Version=1.0 +Version=1.0
+Icon=yast-vm-management +Icon=yast-vm-management

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/addhardware.py Index: virt-manager-0.10.0/virtManager/addhardware.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/addhardware.py --- virt-manager-0.10.0.orig/virtManager/addhardware.py
+++ virt-manager-0.9.5/src/virtManager/addhardware.py +++ virt-manager-0.10.0/virtManager/addhardware.py
@@ -1167,6 +1167,19 @@ class vmmAddHardware(vmmGObjectUI): @@ -1162,6 +1162,19 @@ class vmmAddHardware(vmmGObjectUI):
if controller is not None: if controller is not None:
logging.debug("Adding controller:\n%s", logging.debug("Adding controller:\n%s",
self._dev.vmm_controller.get_xml_config()) self._dev.vmm_controller.get_xml_config())
@ -22,11 +22,11 @@ Index: virt-manager-0.9.5/src/virtManager/addhardware.py
# Hotplug device # Hotplug device
attach_err = False attach_err = False
try: try:
Index: virt-manager-0.9.5/src/virtManager/details.py Index: virt-manager-0.10.0/virtManager/details.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/details.py --- virt-manager-0.10.0.orig/virtManager/details.py
+++ virt-manager-0.9.5/src/virtManager/details.py +++ virt-manager-0.10.0/virtManager/details.py
@@ -2466,6 +2466,17 @@ class vmmDetails(vmmGObjectUI): @@ -2483,6 +2483,17 @@ class vmmDetails(vmmGObjectUI):
text1=(_("Are you sure you want to remove this device?"))): text1=(_("Are you sure you want to remove this device?"))):
return return
@ -44,11 +44,11 @@ Index: virt-manager-0.9.5/src/virtManager/details.py
# Define the change # Define the change
try: try:
self.vm.remove_device(dev_id_info) self.vm.remove_device(dev_id_info)
Index: virt-manager-0.9.5/src/virtManager/domain.py Index: virt-manager-0.10.0/virtManager/domain.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/domain.py --- virt-manager-0.10.0.orig/virtManager/domain.py
+++ virt-manager-0.9.5/src/virtManager/domain.py +++ virt-manager-0.10.0/virtManager/domain.py
@@ -797,6 +797,10 @@ class vmmDomain(vmmLibvirtObject): @@ -840,6 +840,10 @@ class vmmDomain(vmmLibvirtObject):
devxml = devobj.get_xml_config() devxml = devobj.get_xml_config()
self._backend.attachDevice(devxml) self._backend.attachDevice(devxml)
@ -59,7 +59,7 @@ Index: virt-manager-0.9.5/src/virtManager/domain.py
def detach_device(self, devobj): def detach_device(self, devobj):
""" """
Hotunplug device from running guest Hotunplug device from running guest
@@ -815,6 +819,10 @@ class vmmDomain(vmmLibvirtObject): @@ -858,6 +862,10 @@ class vmmDomain(vmmLibvirtObject):
xml = devobj.get_xml_config() xml = devobj.get_xml_config()
self._backend.updateDeviceFlags(xml, flags) self._backend.updateDeviceFlags(xml, flags)

View File

@ -1,25 +0,0 @@
Subject: Fix a segfault when the connection is dropped
From: Giuseppe Scrivano gscrivano@gnu.org Mon Mar 11 09:21:48 2013 +0100
Date: Wed Apr 3 18:14:01 2013 -0400:
Git: 823c3b20b598c6c718be381139cfc16f93443686
The error dialog window was created on the "tick" thread, causing a
crash in GTK. Fix it by moving its invocation to the main thread.
Index: virt-manager-0.9.5/src/virtManager/engine.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/engine.py
+++ virt-manager-0.9.5/src/virtManager/engine.py
@@ -310,8 +310,9 @@ class vmmEngine(vmmGObject):
logging.debug("Closing connection since libvirtd "
"appears to have stopped")
else:
- self.err.show_err(_("Error polling connection '%s': %s") %
- (conn.get_uri(), e))
+ error_msg = _("Error polling connection '%s': %s") \
+ % (conn.get_uri(), e)
+ self.idle_add(lambda: self.err.show_err(error_msg))
self.idle_add(conn.close)

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/uihelpers.py Index: virt-manager-0.10.0/virtManager/uihelpers.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/uihelpers.py --- virt-manager-0.10.0.orig/virtManager/uihelpers.py
+++ virt-manager-0.9.5/src/virtManager/uihelpers.py +++ virt-manager-0.10.0/virtManager/uihelpers.py
@@ -311,6 +311,7 @@ def populate_netmodel_combo(vm, combo): @@ -332,6 +332,7 @@ def populate_netmodel_combo(vm, combo):
if vm.is_hvm(): if vm.is_hvm():
mod_list = ["rtl8139", "ne2k_pci", "pcnet", "e1000"] mod_list = ["rtl8139", "ne2k_pci", "pcnet", "e1000"]
if vm.get_hv_type() in ["kvm", "qemu", "test"]: if vm.get_hv_type() in ["kvm", "qemu", "test"]:

View File

@ -1,110 +0,0 @@
Subject: manager: Use consistent row spacing even if we disable all graphs
From: Cole Robinson crobinso@redhat.com Mon Sep 2 10:43:53 2013 -0400
Date: Mon Sep 2 10:43:53 2013 -0400:
Git: b86c5b21ec3016f64dcf6e0375fcea166b16bcb7
Index: virt-manager-0.9.5/src/virtManager/manager.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/manager.py
+++ virt-manager-0.9.5/src/virtManager/manager.py
@@ -48,11 +48,11 @@ ROW_COLOR = 11
ROW_INSPECTION_OS_ICON = 12
# Columns in the tree view
-COL_NAME = 0
-COL_GUEST_CPU = 1
-COL_HOST_CPU = 2
-COL_DISK = 3
-COL_NETWORK = 4
+(COL_NAME,
+COL_GUEST_CPU,
+COL_HOST_CPU,
+COL_DISK,
+COL_NETWORK) = range(5)
rcstring = """
style "toolbar-style" {
@@ -92,13 +92,6 @@ class vmmManager(vmmGObjectUI):
self.connmenu = gtk.Menu()
self.connmenu_items = {}
- # There seem to be ref counting issues with calling
- # list.get_column, so avoid it
- self.diskcol = None
- self.netcol = None
- self.guestcpucol = None
- self.hostcpucol = None
-
self.window.connect_signals({
"on_menu_view_guest_cpu_usage_activate":
(self.toggle_stats_visible, COL_GUEST_CPU),
@@ -133,7 +126,15 @@ class vmmManager(vmmGObjectUI):
"on_menu_help_activate": self.show_help,
})
+ # There seem to be ref counting issues with calling
+ # list.get_column, so avoid it
+ self.diskcol = None
+ self.netcol = None
+ self.guestcpucol = None
+ self.hostcpucol = None
+ self.spacer_txt = None
self.init_vmlist()
+
self.init_stats()
self.init_toolbar()
self.init_context_menus()
@@ -368,27 +369,31 @@ class vmmManager(vmmGObjectUI):
nameCol = gtk.TreeViewColumn(_("Name"))
nameCol.set_expand(True)
nameCol.set_spacing(6)
+ nameCol.set_sort_column_id(COL_NAME)
- statusCol = nameCol
vmlist.append_column(nameCol)
status_icon = gtk.CellRendererPixbuf()
status_icon.set_property("stock-size", gtk.ICON_SIZE_DND)
- statusCol.pack_start(status_icon, False)
- statusCol.add_attribute(status_icon, 'icon-name', ROW_STATUS_ICON)
- statusCol.add_attribute(status_icon, 'visible', ROW_IS_VM)
+ nameCol.pack_start(status_icon, False)
+ nameCol.add_attribute(status_icon, 'icon-name', ROW_STATUS_ICON)
+ nameCol.add_attribute(status_icon, 'visible', ROW_IS_VM)
inspection_os_icon = gtk.CellRendererPixbuf()
- statusCol.pack_start(inspection_os_icon, False)
- statusCol.add_attribute(inspection_os_icon, 'pixbuf',
- ROW_INSPECTION_OS_ICON)
- statusCol.add_attribute(inspection_os_icon, 'visible', ROW_IS_VM)
+ nameCol.pack_start(inspection_os_icon, False)
+ nameCol.add_attribute(inspection_os_icon, 'pixbuf',
+ ROW_INSPECTION_OS_ICON)
+ nameCol.add_attribute(inspection_os_icon, 'visible', ROW_IS_VM)
name_txt = gtk.CellRendererText()
nameCol.pack_start(name_txt, True)
nameCol.add_attribute(name_txt, 'markup', ROW_MARKUP)
nameCol.add_attribute(name_txt, 'foreground-gdk', ROW_COLOR)
- nameCol.set_sort_column_id(COL_NAME)
+
+ self.spacer_txt = gtk.CellRendererText()
+ self.spacer_txt.set_property("ypad", 4)
+ self.spacer_txt.set_property("visible", False)
+ nameCol.pack_end(self.spacer_txt, False)
def make_stats_column(title, colnum):
col = gtk.TreeViewColumn(title)
@@ -1161,6 +1166,10 @@ class vmmManager(vmmGObjectUI):
col.set_visible(do_show)
self.widget(menu).set_active(do_show)
+ any_visible = any([col.get_visible() for col in
+ [self.netcol, self.diskcol, self.guestcpucol, self.hostcpucol]])
+ self.spacer_txt.set_property("visible", not any_visible)
+
def toggle_network_traffic_visible_widget(self, *ignore):
self._toggle_graph_helper(
self.config.is_vmlist_network_traffic_visible(), self.netcol,

View File

@ -1,11 +1,11 @@
Index: virt-manager-0.9.5/src/virtManager/uihelpers.py Index: virt-manager-0.10.0/virtManager/uihelpers.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/uihelpers.py --- virt-manager-0.10.0.orig/virtManager/uihelpers.py
+++ virt-manager-0.9.5/src/virtManager/uihelpers.py +++ virt-manager-0.10.0/virtManager/uihelpers.py
@@ -972,6 +972,16 @@ def build_keycombo_menu(cb): @@ -1018,6 +1018,16 @@ def build_keycombo_menu(cb):
make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"]) make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"])
make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"]) make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"])
menu.add(gtk.SeparatorMenuItem()) menu.add(Gtk.SeparatorMenuItem())
+ make_item("Ctrl+Scroll+Scroll", ["Control_L", "Scroll" + "Scroll"]) + make_item("Ctrl+Scroll+Scroll", ["Control_L", "Scroll" + "Scroll"])
+ make_item("Alt+F_10", ["Alt_L", "F10"]) + make_item("Alt+F_10", ["Alt_L", "F10"])
+ make_item("Alt+Tab", ["Alt_L", "Tab"]) + make_item("Alt+Tab", ["Alt_L", "Tab"])
@ -15,7 +15,7 @@ Index: virt-manager-0.9.5/src/virtManager/uihelpers.py
+ make_item("Alt+Shift+Shift+Escape", ["Alt_R", "Shift_R", "Shift_L", "Escape"]) + make_item("Alt+Shift+Shift+Escape", ["Alt_R", "Shift_R", "Shift_L", "Escape"])
+ make_item("F_8", ["F8"]) + make_item("F_8", ["F8"])
+ make_item("F_10", ["F10"]) + make_item("F_10", ["F10"])
+ menu.add(gtk.SeparatorMenuItem()) + menu.add(Gtk.SeparatorMenuItem())
for i in range(1, 13): for i in range(1, 13):
make_item("Ctrl+Alt+F_%d" % i, ["Control_L", "Alt_L", "F%d" % i]) make_item("Ctrl+Alt+F_%d" % i, ["Control_L", "Alt_L", "F%d" % i])

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/engine.py Index: virt-manager-0.10.0/virtManager/engine.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/engine.py --- virt-manager-0.10.0.orig/virtManager/engine.py
+++ virt-manager-0.9.5/src/virtManager/engine.py +++ virt-manager-0.10.0/virtManager/engine.py
@@ -58,6 +58,7 @@ def default_uri(): @@ -63,6 +63,7 @@ def default_uri():
os.path.exists("/usr/bin/qemu") or os.path.exists("/usr/bin/qemu") or
os.path.exists("/usr/bin/qemu-kvm") or os.path.exists("/usr/bin/qemu-kvm") or
os.path.exists("/usr/bin/kvm") or os.path.exists("/usr/bin/kvm") or

View File

@ -1,192 +0,0 @@
Subject: manager: Separate stats and state update callbacks
From: Cole Robinson crobinso@redhat.com Mon Sep 2 09:09:31 2013 -0400
Date: Mon Sep 2 09:32:50 2013 -0400:
Git: f141c77c452d4807b516bdc40a0e86235bf5243a
There's no need to be resetting row keys like VM name, state, on every
'resources-sampled' signals, since we have had finer grained status-changed
and config-changed signals for a while. This seems to reduce the memory
leak on F19 as well.
Index: virt-manager-0.9.5/src/virtManager/manager.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/manager.py
+++ virt-manager-0.9.5/src/virtManager/manager.py
@@ -141,9 +141,9 @@ class vmmManager(vmmGObjectUI):
# XXX: Help docs useless/out of date
self.widget("menu_help").hide()
- self.vm_selected()
- self.widget("vm-list").get_selection().connect("changed",
- self.vm_selected)
+ self.update_current_selection()
+ self.widget("vm-list").get_selection().connect(
+ "changed", self.update_current_selection)
self.max_disk_rate = 10.0
self.max_net_rate = 10.0
@@ -708,9 +708,9 @@ class vmmManager(vmmGObjectUI):
def vm_added(self, conn, vmuuid):
vm = conn.get_vm(vmuuid)
+ vm.connect("config-changed", self.vm_config_changed)
vm.connect("status-changed", self.vm_status_changed)
- vm.connect("resources-sampled", self.vm_resources_sampled)
- vm.connect("config-changed", self.vm_resources_sampled, True)
+ vm.connect("resources-sampled", self.vm_row_updated)
vm.connect("inspection-changed", self.vm_inspection_changed)
vmlist = self.widget("vm-list")
@@ -829,7 +829,7 @@ class vmmManager(vmmGObjectUI):
conn.connect("vm-added", self.vm_added)
conn.connect("vm-removed", self.vm_removed)
- conn.connect("resources-sampled", self.conn_resources_sampled)
+ conn.connect("resources-sampled", self.conn_row_updated)
conn.connect("state-changed", self.conn_state_changed)
conn.connect("connect-error", self._connect_error)
@@ -854,7 +854,7 @@ class vmmManager(vmmGObjectUI):
continue
newname = conn.get_pretty_desc_inactive(False, True)
- self.conn_resources_sampled(conn, newname)
+ self.conn_state_changed(conn, newname=newname)
def remove_conn(self, engine_ignore, uri):
model = self.widget("vm-list").get_model()
@@ -877,6 +877,29 @@ class vmmManager(vmmGObjectUI):
# State/UI updating methods #
#############################
+ def vm_row_updated(self, vm):
+ row = self.rows.get(self.vm_row_key(vm), None)
+ if row is None:
+ return
+ self.widget("vm-list").get_model().row_changed(row.path, row.iter)
+
+ def vm_config_changed(self, vm):
+ if self.vm_row_key(vm) not in self.rows:
+ return
+
+ row = self.rows[self.vm_row_key(vm)]
+ row[ROW_NAME] = vm.get_name()
+ row[ROW_STATUS] = vm.run_status()
+ row[ROW_STATUS_ICON] = vm.run_status_icon_name()
+ row[ROW_IS_VM_RUNNING] = vm.is_active()
+ row[ROW_MARKUP] = self._build_vm_markup(row)
+
+ desc = vm.get_description()
+ if not uihelpers.can_set_row_none:
+ desc = desc or ""
+ row[ROW_HINT] = util.xml_escape(desc)
+ self.vm_row_updated(vm)
+
def vm_status_changed(self, vm, oldstatus, newstatus):
ignore = newstatus
ignore = oldstatus
@@ -887,7 +910,7 @@ class vmmManager(vmmGObjectUI):
missing = True
for row in range(model.iter_n_children(parent)):
_iter = model.iter_nth_child(parent, row)
- if model.get_value(_iter, ROW_KEY) == vm.get_uuid():
+ if model.get_value(_iter, ROW_HANDLE) == vm:
missing = False
break
@@ -895,27 +918,8 @@ class vmmManager(vmmGObjectUI):
self._append_vm(model, vm, vm.conn)
# Update run/shutdown/pause button states
- self.vm_selected()
- self.vm_resources_sampled(vm)
-
- def vm_resources_sampled(self, vm, config_changed=False):
- vmlist = self.widget("vm-list")
- model = vmlist.get_model()
-
- if self.vm_row_key(vm) not in self.rows:
- return
-
- row = self.rows[self.vm_row_key(vm)]
- row[ROW_NAME] = vm.get_name()
- row[ROW_STATUS] = vm.run_status()
- row[ROW_STATUS_ICON] = vm.run_status_icon_name()
- row[ROW_IS_VM_RUNNING] = vm.is_active()
- row[ROW_MARKUP] = self._build_vm_markup(row)
-
- if config_changed:
- row[ROW_HINT] = util.xml_escape(vm.get_description())
-
- model.row_changed(row.path, row.iter)
+ self.update_current_selection()
+ self.vm_config_changed(vm)
def vm_inspection_changed(self, vm):
vmlist = self.widget("vm-list")
@@ -927,7 +931,7 @@ class vmmManager(vmmGObjectUI):
row = self.rows[self.vm_row_key(vm)]
row[ROW_INSPECTION_OS_ICON] = \
self.get_inspection_icon_pixbuf(vm, 16, 16)
- model.row_changed(row.path, row.iter)
+ self.vm_row_updated(vm)
def get_inspection_icon_pixbuf(self, vm, w, h):
# libguestfs gives us the PNG data as a string.
@@ -943,13 +947,7 @@ class vmmManager(vmmGObjectUI):
except:
return None
- def conn_state_changed(self, conn):
- self.conn_resources_sampled(conn)
- self.vm_selected()
-
- def conn_resources_sampled(self, conn, newname=None):
- vmlist = self.widget("vm-list")
- model = vmlist.get_model()
+ def conn_state_changed(self, conn, newname=None):
row = self.rows[conn.get_uri()]
if newname:
@@ -964,20 +962,27 @@ class vmmManager(vmmGObjectUI):
if conn.get_state() in [vmmConnection.STATE_DISCONNECTED,
vmmConnection.STATE_CONNECTING]:
# Connection went inactive, delete any VM child nodes
- parent = self.rows[conn.get_uri()].iter
+ parent = row.iter
if parent is not None:
+ model = self.widget("vm-list").get_model()
child = model.iter_children(parent)
while child is not None:
- del self.rows[self.vm_row_key(model.get_value(child,
- ROW_HANDLE))]
+ vm = model[child][ROW_HANDLE]
+ del self.rows[self.vm_row_key(vm)]
model.remove(child)
child = model.iter_children(parent)
+ self.conn_row_updated(conn)
+ self.update_current_selection()
+
+ def conn_row_updated(self, conn):
+ row = self.rows[conn.get_uri()]
+
self.max_disk_rate = max(self.max_disk_rate, conn.disk_io_max_rate())
self.max_net_rate = max(self.max_net_rate,
conn.network_traffic_max_rate())
- model.row_changed(row.path, row.iter)
+ self.widget("vm-list").get_model().row_changed(row.path, row.iter)
def change_run_text(self, can_restore):
if can_restore:
@@ -989,7 +994,7 @@ class vmmManager(vmmGObjectUI):
self.vmmenu_items["run"].get_child().set_label(text)
self.widget("vm-run").set_label(strip_text)
- def vm_selected(self, ignore=None):
+ def update_current_selection(self, ignore=None):
conn = self.current_conn()
vm = self.current_vm()

View File

@ -1,160 +0,0 @@
Subject: manager: Disable graph data func if graph isn't visible
From: Cole Robinson crobinso@redhat.com Sun Sep 1 21:35:23 2013 -0400
Date: Mon Sep 2 08:42:25 2013 -0400:
Git: db7db9ab47dd00d746cf8a3359c1c26dbfcfa50e
Seems like pygobject is a bit leaky with tree row accesses, and
the cell cb hammers on that quite a bit, even if the graph isn't showing.
Index: virt-manager-0.9.5/src/virtManager/manager.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/manager.py
+++ virt-manager-0.9.5/src/virtManager/manager.py
@@ -249,15 +249,11 @@ class vmmManager(vmmGObjectUI):
self.config.on_stats_enable_net_poll_changed(self.enable_polling,
COL_NETWORK))
+ self.toggle_guest_cpu_usage_visible_widget()
+ self.toggle_host_cpu_usage_visible_widget()
+ self.toggle_disk_io_visible_widget()
+ self.toggle_network_traffic_visible_widget()
- self.widget("menu_view_stats_guest_cpu").set_active(
- self.config.is_vmlist_guest_cpu_usage_visible())
- self.widget("menu_view_stats_host_cpu").set_active(
- self.config.is_vmlist_host_cpu_usage_visible())
- self.widget("menu_view_stats_disk").set_active(
- self.config.is_vmlist_disk_io_visible())
- self.widget("menu_view_stats_network").set_active(
- self.config.is_vmlist_network_traffic_visible())
def init_toolbar(self):
self.widget("vm-new").set_icon_name("vm_new")
@@ -394,7 +390,7 @@ class vmmManager(vmmGObjectUI):
nameCol.add_attribute(name_txt, 'foreground-gdk', ROW_COLOR)
nameCol.set_sort_column_id(COL_NAME)
- def make_stats_column(title, datafunc, is_visible, colnum):
+ def make_stats_column(title, colnum):
col = gtk.TreeViewColumn(title)
col.set_min_width(140)
txt = gtk.CellRendererText()
@@ -406,28 +402,14 @@ class vmmManager(vmmGObjectUI):
col.pack_start(txt, False)
col.add_attribute(img, 'visible', ROW_IS_VM)
col.add_attribute(txt, 'visible', ROW_IS_CONN)
- col.set_cell_data_func(img, datafunc, None)
- col.set_visible(is_visible)
col.set_sort_column_id(colnum)
vmlist.append_column(col)
return col
- self.guestcpucol = make_stats_column(_("CPU usage"),
- self.guest_cpu_usage_img,
- self.config.is_vmlist_guest_cpu_usage_visible(),
- COL_GUEST_CPU)
- self.hostcpucol = make_stats_column(_("Host CPU usage"),
- self.host_cpu_usage_img,
- self.config.is_vmlist_host_cpu_usage_visible(),
- COL_HOST_CPU)
- self.diskcol = make_stats_column(_("Disk I/O"),
- self.disk_io_img,
- self.config.is_vmlist_disk_io_visible(),
- COL_DISK)
- self.netcol = make_stats_column(_("Network I/O"),
- self.network_traffic_img,
- self.config.is_vmlist_network_traffic_visible(),
- COL_NETWORK)
+ self.guestcpucol = make_stats_column(_("CPU usage"), COL_GUEST_CPU)
+ self.hostcpucol = make_stats_column(_("Host CPU usage"), COL_HOST_CPU)
+ self.diskcol = make_stats_column(_("Disk I/O"), COL_DISK)
+ self.netcol = make_stats_column(_("Network I/O"), COL_NETWORK)
model.set_sort_func(COL_NAME, self.vmlist_name_sorter)
model.set_sort_func(COL_GUEST_CPU, self.vmlist_guest_cpu_usage_sorter)
@@ -1163,25 +1145,33 @@ class vmmManager(vmmGObjectUI):
current_text = current_text + disabled_text
widget.set_label(current_text)
- def toggle_network_traffic_visible_widget(self, *ignore):
- val = self.config.is_vmlist_network_traffic_visible()
- self.netcol.set_visible(val)
- self.widget("menu_view_stats_network").set_active(val)
+ def _toggle_graph_helper(self, do_show, col, datafunc, menu):
+ img = -1
+ for child in col.get_cells():
+ if isinstance(child, CellRendererSparkline):
+ img = child
+ datafunc = do_show and datafunc or None
+
+ col.set_cell_data_func(img, datafunc, None)
+ col.set_visible(do_show)
+ self.widget(menu).set_active(do_show)
+ def toggle_network_traffic_visible_widget(self, *ignore):
+ self._toggle_graph_helper(
+ self.config.is_vmlist_network_traffic_visible(), self.netcol,
+ self.network_traffic_img, "menu_view_stats_network")
def toggle_disk_io_visible_widget(self, *ignore):
- val = self.config.is_vmlist_disk_io_visible()
- self.diskcol.set_visible(val)
- self.widget("menu_view_stats_disk").set_active(val)
-
+ self._toggle_graph_helper(
+ self.config.is_vmlist_disk_io_visible(), self.diskcol,
+ self.disk_io_img, "menu_view_stats_disk")
def toggle_guest_cpu_usage_visible_widget(self, *ignore):
- val = self.config.is_vmlist_guest_cpu_usage_visible()
- self.guestcpucol.set_visible(val)
- self.widget("menu_view_stats_guest_cpu").set_active(val)
-
+ self._toggle_graph_helper(
+ self.config.is_vmlist_guest_cpu_usage_visible(), self.guestcpucol,
+ self.guest_cpu_usage_img, "menu_view_stats_guest_cpu")
def toggle_host_cpu_usage_visible_widget(self, *ignore):
- val = self.config.is_vmlist_host_cpu_usage_visible()
- self.hostcpucol.set_visible(val)
- self.widget("menu_view_stats_host_cpu").set_active(val)
+ self._toggle_graph_helper(
+ self.config.is_vmlist_host_cpu_usage_visible(), self.hostcpucol,
+ self.host_cpu_usage_img, "menu_view_stats_host_cpu")
def toggle_stats_visible(self, src, stats_id):
visible = src.get_active()
@@ -1194,7 +1184,7 @@ class vmmManager(vmmGObjectUI):
set_stats[stats_id](visible)
def guest_cpu_usage_img(self, column_ignore, cell, model, _iter, data):
- obj = model.get_value(_iter, ROW_HANDLE)
+ obj = model[_iter][ROW_HANDLE]
if obj is None:
return
@@ -1202,7 +1192,7 @@ class vmmManager(vmmGObjectUI):
cell.set_property('data_array', data)
def host_cpu_usage_img(self, column_ignore, cell, model, _iter, data):
- obj = model.get_value(_iter, ROW_HANDLE)
+ obj = model[_iter][ROW_HANDLE]
if obj is None:
return
@@ -1210,7 +1200,7 @@ class vmmManager(vmmGObjectUI):
cell.set_property('data_array', data)
def disk_io_img(self, column_ignore, cell, model, _iter, data):
- obj = model.get_value(_iter, ROW_HANDLE)
+ obj = model[_iter][ROW_HANDLE]
if obj is None:
return
@@ -1221,7 +1211,7 @@ class vmmManager(vmmGObjectUI):
cell.set_property('data_array', data)
def network_traffic_img(self, column_ignore, cell, model, _iter, data):
- obj = model.get_value(_iter, ROW_HANDLE)
+ obj = model[_iter][ROW_HANDLE]
if obj is None:
return

View File

@ -1,10 +1,10 @@
Index: virt-manager-0.9.5/src/virtManager/uihelpers.py Index: virt-manager-0.10.0/virtManager/uihelpers.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/uihelpers.py --- virt-manager-0.10.0.orig/virtManager/uihelpers.py
+++ virt-manager-0.9.5/src/virtManager/uihelpers.py +++ virt-manager-0.10.0/virtManager/uihelpers.py
@@ -400,13 +400,12 @@ def build_storage_format_combo(vm, combo @@ -426,13 +426,12 @@ def build_storage_format_combo(vm, combo
combo.set_model(dev_model) combo.set_model(dev_model)
combo.set_text_column(0) combo.set_entry_text_column(0)
- formats = ["raw", "qcow2", "qed"] - formats = ["raw", "qcow2", "qed"]
- if vm.rhel6_defaults(): - if vm.rhel6_defaults():

View File

@ -2,11 +2,11 @@ Reverses upstream patch: serialcon: Don't open a console with name=None
Git: ce94126b707f157d88de113a8c591e628d55db63 Git: ce94126b707f157d88de113a8c591e628d55db63
bnc#780859 bnc#780859
Index: virt-manager-0.9.5/src/virtManager/serialcon.py Index: virt-manager-0.10.0/virtManager/serialcon.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/serialcon.py --- virt-manager-0.10.0.orig/virtManager/serialcon.py
+++ virt-manager-0.9.5/src/virtManager/serialcon.py +++ virt-manager-0.10.0/virtManager/serialcon.py
@@ -191,8 +191,9 @@ class LibvirtConsoleConnection(ConsoleCo @@ -199,8 +199,9 @@ class LibvirtConsoleConnection(ConsoleCo
name = dev and dev.alias.name or None name = dev and dev.alias.name or None
logging.debug("Opening console stream for dev=%s alias=%s", logging.debug("Opening console stream for dev=%s alias=%s",
dev, name) dev, name)

View File

@ -6,11 +6,11 @@ From: Cole Robinson crobinso@redhat.com Mon Sep 26 11:05:55 2011 -0400
Date: Mon Sep 26 11:07:52 2011 -0400: Date: Mon Sep 26 11:07:52 2011 -0400:
Git: 0a7640c593a54a6a3f558583d82f8b27c7a7d1d1 Git: 0a7640c593a54a6a3f558583d82f8b27c7a7d1d1
Index: virt-manager-0.9.5/src/virtManager/manager.py Index: virt-manager-0.10.0/virtManager/manager.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/manager.py --- virt-manager-0.10.0.orig/virtManager/manager.py
+++ virt-manager-0.9.5/src/virtManager/manager.py +++ virt-manager-0.10.0/virtManager/manager.py
@@ -774,7 +774,7 @@ class vmmManager(vmmGObjectUI): @@ -813,7 +813,7 @@ class vmmManager(vmmGObjectUI):
row.insert(ROW_STATUS, vm.run_status()) row.insert(ROW_STATUS, vm.run_status())
row.insert(ROW_STATUS_ICON, vm.run_status_icon_name()) row.insert(ROW_STATUS_ICON, vm.run_status_icon_name())
row.insert(ROW_KEY, vm.get_uuid()) row.insert(ROW_KEY, vm.get_uuid())
@ -19,12 +19,12 @@ Index: virt-manager-0.9.5/src/virtManager/manager.py
row.insert(ROW_IS_CONN, False) row.insert(ROW_IS_CONN, False)
row.insert(ROW_IS_CONN_CONNECTED, True) row.insert(ROW_IS_CONN_CONNECTED, True)
row.insert(ROW_IS_VM, True) row.insert(ROW_IS_VM, True)
@@ -902,7 +902,7 @@ class vmmManager(vmmGObjectUI): @@ -965,7 +965,7 @@ class vmmManager(vmmGObjectUI):
desc = vm.get_description() desc = vm.get_description()
if not uihelpers.can_set_row_none: if not can_set_row_none:
desc = desc or "" desc = desc or ""
- row[ROW_HINT] = util.xml_escape(desc) - row[ROW_HINT] = util.xml_escape(desc)
+ row[ROW_HINT] = desc + row[ROW_HINT] = desc
self.vm_row_updated(vm)
model.row_changed(row.path, row.iter)
def vm_status_changed(self, vm, oldstatus, newstatus):

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/virtManager/domain.py Index: virt-manager-0.10.0/virtManager/domain.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/domain.py --- virt-manager-0.10.0.orig/virtManager/domain.py
+++ virt-manager-0.9.5/src/virtManager/domain.py +++ virt-manager-0.10.0/virtManager/domain.py
@@ -1669,7 +1669,14 @@ class vmmDomain(vmmLibvirtObject): @@ -1722,7 +1722,14 @@ class vmmDomain(vmmLibvirtObject):
# Invalidate cached values # Invalidate cached values
self._invalidate_xml() self._invalidate_xml()

View File

@ -1,8 +1,8 @@
Index: virt-manager-0.9.5/src/vmm-manager.ui Index: virt-manager-0.10.0/ui/vmm-manager.ui
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/vmm-manager.ui --- virt-manager-0.10.0.orig/ui/vmm-manager.ui
+++ virt-manager-0.9.5/src/vmm-manager.ui +++ virt-manager-0.10.0/ui/vmm-manager.ui
@@ -293,7 +293,7 @@ @@ -258,7 +258,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="show_arrow">False</property> <property name="show_arrow">False</property>
<child> <child>
@ -11,7 +11,7 @@ Index: virt-manager-0.9.5/src/vmm-manager.ui
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="has_tooltip">True</property> <property name="has_tooltip">True</property>
@@ -306,7 +306,6 @@ @@ -270,7 +270,6 @@
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -19,12 +19,20 @@ Index: virt-manager-0.9.5/src/vmm-manager.ui
</packing> </packing>
</child> </child>
<child> <child>
Index: virt-manager-0.9.5/src/virtManager/manager.py Index: virt-manager-0.10.0/virtManager/manager.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/manager.py --- virt-manager-0.10.0.orig/virtManager/manager.py
+++ virt-manager-0.9.5/src/virtManager/manager.py +++ virt-manager-0.10.0/virtManager/manager.py
@@ -257,7 +257,8 @@ class vmmManager(vmmGObjectUI): @@ -85,6 +85,7 @@ class vmmManager(vmmGObjectUI):
"action-show-host": (GObject.SignalFlags.RUN_FIRST, None, [str]),
"action-show-preferences": (GObject.SignalFlags.RUN_FIRST, None, []),
"action-show-create": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+ "action-show-create-vminstall": (GObject.SignalFlags.RUN_FIRST, None, [str]),
"action-suspend-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
"action-resume-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
"action-run-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
@@ -281,7 +282,8 @@ class vmmManager(vmmGObjectUI):
self.config.is_vmlist_network_traffic_visible())
def init_toolbar(self): def init_toolbar(self):
- self.widget("vm-new").set_icon_name("vm_new") - self.widget("vm-new").set_icon_name("vm_new")
@ -33,7 +41,7 @@ Index: virt-manager-0.9.5/src/virtManager/manager.py
self.widget("vm-open").set_icon_name("icon_console") self.widget("vm-open").set_icon_name("icon_console")
uihelpers.build_shutdown_button_menu(self.widget("vm-shutdown"), uihelpers.build_shutdown_button_menu(self.widget("vm-shutdown"),
self.poweroff_vm, self.poweroff_vm,
@@ -497,6 +498,9 @@ class vmmManager(vmmGObjectUI): @@ -548,6 +550,9 @@ class vmmManager(vmmGObjectUI):
def new_vm(self, src_ignore=None): def new_vm(self, src_ignore=None):
self.emit("action-show-create", self.current_conn_uri()) self.emit("action-show-create", self.current_conn_uri())
@ -43,19 +51,11 @@ Index: virt-manager-0.9.5/src/virtManager/manager.py
def show_about(self, src_ignore): def show_about(self, src_ignore):
self.emit("action-show-about") self.emit("action-show-about")
@@ -1242,6 +1246,7 @@ vmmManager.signal_new(vmmManager, "actio Index: virt-manager-0.10.0/virtManager/uihelpers.py
vmmManager.signal_new(vmmManager, "action-show-host", [str])
vmmManager.signal_new(vmmManager, "action-show-preferences", [])
vmmManager.signal_new(vmmManager, "action-show-create", [str])
+vmmManager.signal_new(vmmManager, "action-show-create-vminstall", [str])
vmmManager.signal_new(vmmManager, "action-suspend-domain", [str, str])
vmmManager.signal_new(vmmManager, "action-resume-domain", [str, str])
vmmManager.signal_new(vmmManager, "action-run-domain", [str, str])
Index: virt-manager-0.9.5/src/virtManager/uihelpers.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/uihelpers.py --- virt-manager-0.10.0.orig/virtManager/uihelpers.py
+++ virt-manager-0.9.5/src/virtManager/uihelpers.py +++ virt-manager-0.10.0/virtManager/uihelpers.py
@@ -837,6 +837,24 @@ def mediadev_set_default_selection(widge @@ -877,6 +877,24 @@ def mediadev_set_default_selection(widge
#################################################################### ####################################################################
@ -65,12 +65,12 @@ Index: virt-manager-0.9.5/src/virtManager/uihelpers.py
+def build_new_button_menu(widget, vminstall_cb): +def build_new_button_menu(widget, vminstall_cb):
+ icon_name = util.running_config.get_new_icon_name() + icon_name = util.running_config.get_new_icon_name()
+ widget.set_icon_name(icon_name) + widget.set_icon_name(icon_name)
+ menu = gtk.Menu() + menu = Gtk.Menu()
+ widget.set_menu(menu) + widget.set_menu(menu)
+ +
+ vminstallimg = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU) + vminstallimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+ +
+ vminstall = gtk.ImageMenuItem(_("_Vm-install")) + vminstall = Gtk.ImageMenuItem(_("_Vm-install"))
+ vminstall.set_image(vminstallimg) + vminstall.set_image(vminstallimg)
+ vminstall.show() + vminstall.show()
+ vminstall.connect("activate", vminstall_cb) + vminstall.connect("activate", vminstall_cb)
@ -80,29 +80,29 @@ Index: virt-manager-0.9.5/src/virtManager/uihelpers.py
# Build toolbar shutdown button menu (manager and details toolbar) # # Build toolbar shutdown button menu (manager and details toolbar) #
#################################################################### ####################################################################
Index: virt-manager-0.9.5/src/virtManager/config.py Index: virt-manager-0.10.0/virtManager/config.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/config.py --- virt-manager-0.10.0.orig/virtManager/config.py
+++ virt-manager-0.9.5/src/virtManager/config.py +++ virt-manager-0.10.0/virtManager/config.py
@@ -150,6 +150,13 @@ class vmmConfig(object): @@ -192,6 +192,13 @@ class vmmConfig(object):
# General app wide helpers (gconf agnostic) # General app wide helpers (gconf agnostic)
+ def get_new_icon_name(self): + def get_new_icon_name(self):
+ theme = gtk.icon_theme_get_default() + theme = Gtk.IconTheme.get_default()
+ iconname = "vm_new" + iconname = "vm_new"
+ if theme.has_icon(iconname): + if theme.has_icon(iconname):
+ return iconname + return iconname
+ return "media-record" + return "media-record"
+ +
def get_shutdown_icon_name(self): def get_appname(self):
theme = gtk.icon_theme_get_default() return self.appname
iconname = "system-shutdown" def get_appversion(self):
Index: virt-manager-0.9.5/src/virtManager/engine.py Index: virt-manager-0.10.0/virtManager/engine.py
=================================================================== ===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/engine.py --- virt-manager-0.10.0.orig/virtManager/engine.py
+++ virt-manager-0.9.5/src/virtManager/engine.py +++ virt-manager-0.10.0/virtManager/engine.py
@@ -24,6 +24,7 @@ import gtk @@ -27,6 +27,7 @@ from gi.repository import Gtk
import logging import logging
import threading import threading
import os import os
@ -110,7 +110,7 @@ Index: virt-manager-0.9.5/src/virtManager/engine.py
import libvirt import libvirt
import virtinst import virtinst
@@ -42,7 +43,6 @@ from virtManager.manager import vmmManag @@ -44,7 +45,6 @@ from virtManager.manager import vmmManag
from virtManager.migrate import vmmMigrateDialog from virtManager.migrate import vmmMigrateDialog
from virtManager.details import vmmDetails from virtManager.details import vmmDetails
from virtManager.asyncjob import vmmAsyncJob from virtManager.asyncjob import vmmAsyncJob
@ -118,15 +118,23 @@ Index: virt-manager-0.9.5/src/virtManager/engine.py
from virtManager.host import vmmHost from virtManager.host import vmmHost
from virtManager.error import vmmErrorDialog from virtManager.error import vmmErrorDialog
from virtManager.systray import vmmSystray from virtManager.systray import vmmSystray
@@ -635,6 +635,7 @@ class vmmEngine(vmmGObject): @@ -89,6 +89,7 @@ class vmmEngine(vmmGObject):
self.windowCreate = None
self.windowManager = None
self.windowMigrate = None
+ self.remote_install = None
self.conns = {}
self.err = vmmErrorDialog()
@@ -663,6 +664,7 @@ class vmmEngine(vmmGObject):
obj.connect("action-show-vm", self._do_show_vm) obj.connect("action-show-vm", self._do_show_vm)
obj.connect("action-show-preferences", self._do_show_preferences) obj.connect("action-show-preferences", self._do_show_preferences)
obj.connect("action-show-create", self._do_show_create) obj.connect("action-show-create", self._do_show_create)
+ obj.connect("action-show-create-vminstall", self._do_show_create_vminstall) + obj.connect("action-show-create-vminstall", self._do_show_create_vminstall)
obj.connect("action-show-help", self._do_show_help)
obj.connect("action-show-about", self._do_show_about) obj.connect("action-show-about", self._do_show_about)
obj.connect("action-show-host", self._do_show_host) obj.connect("action-show-host", self._do_show_host)
@@ -678,11 +679,50 @@ class vmmEngine(vmmGObject): obj.connect("action-show-connect", self._do_show_connect)
@@ -703,11 +705,49 @@ class vmmEngine(vmmGObject):
self.windowCreate = obj self.windowCreate = obj
return self.windowCreate return self.windowCreate
@ -152,7 +160,6 @@ Index: virt-manager-0.9.5/src/virtManager/engine.py
+ from virtManager.create import vmmCreate + from virtManager.create import vmmCreate
+ create = vmmCreate(self) + create = vmmCreate(self)
+ create.connect("action-show-vm", self._do_show_vm) + create.connect("action-show-vm", self._do_show_vm)
+ create.connect("action-show-help", self._do_show_help)
+ create.connect("vmmcreate-closing", self._vmmcreate_closing) + create.connect("vmmcreate-closing", self._vmmcreate_closing)
+ self.remote_install = True + self.remote_install = True
+ self.windowCreate = create + self.windowCreate = create
@ -172,30 +179,13 @@ Index: virt-manager-0.9.5/src/virtManager/engine.py
+ if do_remote: + if do_remote:
+ self.windowCreate.show(src.topwin, uri) + self.windowCreate.show(src.topwin, uri)
+ else: + else:
+ message_box = gtk.MessageDialog(None, + message_box = Gtk.MessageDialog(None,
+ gtk.DIALOG_MODAL, + Gtk.DialogFlags.MODAL,
+ gtk.MESSAGE_WARNING, + Gtk.MessageType.WARNING,
+ gtk.BUTTONS_OK, + Gtk.ButtonsType.OK,
+ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations.")) + _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
+ message_box.run() + message_box.run()
+ message_box.destroy() + message_box.destroy()
def _do_show_migrate(self, src, uri, uuid): def _do_show_migrate(self, src, uri, uuid):
try: try:
Index: virt-manager-0.9.5/src/virtManager/create.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/create.py
+++ virt-manager-0.9.5/src/virtManager/create.py
@@ -176,6 +176,7 @@ class vmmCreate(vmmGObjectUI):
def close(self, ignore1=None, ignore2=None):
logging.debug("Closing new vm wizard")
+ self.emit('vmmcreate-closing', 0)
self.topwin.hide()
self.remove_timers()
@@ -2158,3 +2159,4 @@ class vmmCreate(vmmGObjectUI):
vmmGObjectUI.type_register(vmmCreate)
vmmCreate.signal_new(vmmCreate, "action-show-vm", [str, str])
vmmCreate.signal_new(vmmCreate, "action-show-help", [str])
+vmmCreate.signal_new(vmmCreate, "vmmcreate-closing", [str])