Rebased to version 0.9.1

Support for adding usb redirection devices (Marc-André Lureau)
Option to switch usb controller to support usb2.0 (Marc-André Lureau)
Option to specify machine type for non-x86 guests (Li Zhang)
Support for filesystem device type and write policy (Deepak C Shetty)
Many bug fixes!
This commit is contained in:
Cole Robinson 2012-02-01 11:18:15 -05:00
parent c481b718ef
commit ec6e028e73
10 changed files with 13 additions and 491 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ virt-manager-0.8.4.tar.gz
/virt-manager-0.8.6.tar.gz
/virt-manager-0.8.7.tar.gz
/virt-manager-0.9.0.tar.gz
/virt-manager-0.9.1.tar.gz

View File

@ -1 +1 @@
a10331b467f92f4134a39bf636e04adc virt-manager-0.9.0.tar.gz
cfee07b277e315b16d5180cfab5f8307 virt-manager-0.9.1.tar.gz

View File

@ -1,25 +0,0 @@
commit 9dc799af9c3d4fab926ee41685d68642c95593fe
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Aug 23 15:47:31 2011 -0400
domain: Don't fetch XML on tick to get vcpu count
It's available in the domain info structure. Saves us from hammering
xenstored and just plain doing to much work on every tick.
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index bccf75f..2e4ad4f 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject):
if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF,
libvirt.VIR_DOMAIN_CRASHED]):
+ guestcpus = info[3]
cpuTime = info[4] - prevCpuTime
cpuTimeAbs = info[4]
hostcpus = self.conn.host_active_processor_count()
- guestcpus = self.vcpu_count()
pcentbase = (((cpuTime) * 100.0) /
((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0))

View File

@ -1,26 +0,0 @@
commit 930a321f8e411cd02f4f43c193f967763e8b6e5c
Author: Cole Robinson <crobinso@redhat.com>
Date: Fri Oct 28 12:20:11 2011 -0400
console: Fix crashes when deleting vm on F16
The toolbar cleanup order was causing crashed on f16 at app shutdown or
VM delete (when a console window is fully uninstantiated)
diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index d6d95cd..559bb31 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -603,10 +603,10 @@ class vmmConsolePages(vmmGObjectUI):
self.keycombo_menu.destroy()
self.keycombo_menu = None
- self.fs_toolbar.destroy()
- self.fs_toolbar = None
self.fs_drawer.destroy()
self.fs_drawer = None
+ self.fs_toolbar.destroy()
+ self.fs_toolbar = None
##########################
# Initialization helpers #

View File

@ -1,30 +0,0 @@
commit 9a46aa41e092e73ed1596c361acbca65ac3cbe95
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Aug 30 14:29:08 2011 -0400
util: get_default_path: Handle 'None' in collidelist
diff --git a/src/virtManager/util.py b/src/virtManager/util.py
index d351cb3..0cba349 100644
--- a/src/virtManager/util.py
+++ b/src/virtManager/util.py
@@ -126,14 +126,14 @@ def get_default_path(conn, name, collidelist=None):
target, ignore, suffix = get_ideal_path_info(conn, name)
# Sanitize collidelist to work with the collision checker
- for c in collidelist[:]:
- collidelist.remove(c)
- if os.path.dirname(c) == pool.get_target_path():
- collidelist.append(os.path.basename(c))
+ newcollidelist = []
+ for c in collidelist:
+ if c and os.path.dirname(c) == pool.get_target_path():
+ newcollidelist.append(os.path.basename(c))
path = virtinst.Storage.StorageVolume.find_free_name(name,
pool_object=pool.pool, suffix=suffix,
- collidelist=collidelist)
+ collidelist=newcollidelist)
path = os.path.join(target, path)

View File

@ -1,19 +0,0 @@
commit 62a762e77f2f5e5298ececda6fb4638b8488da4a
Author: Cole Robinson <crobinso@redhat.com>
Date: Wed Jul 27 12:02:29 2011 -0400
domain: Fix typo that broke net stats gathering
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index d0683db..f9a39b5 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -1448,7 +1448,7 @@ class vmmDomain(vmmLibvirtObject):
def _sample_network_traffic(self):
rx = 0
tx = 0
- if (not self._stats_net_supported or not
+ if (not self._stats_net_supported or
not self._enable_net_poll or
not self.is_active()):
return rx, tx

View File

@ -1,38 +0,0 @@
commit a815fa17a7c643ddde8ea326399e2bee449dff98
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
Date: Fri Aug 19 11:50:11 2011 -0400
virt-manager: Fix "Resize to VM" menu option
Hello,
This patch fixes the "Resize to VM" menu option by correcting inverted return
values in autodrawer.py.
Thanks,
Marc.
commit 8e666f4b87926c866ed35e58eb82213d2c514e89
Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
Date: Fri Aug 19 11:46:48 2011 -0400
Fix inverted width and height
diff --git a/src/virtManager/autodrawer.py b/src/virtManager/autodrawer.py
index a0ddec6..9682aa9 100644
--- a/src/virtManager/autodrawer.py
+++ b/src/virtManager/autodrawer.py
@@ -271,10 +271,10 @@ class OverBox(parentclass):
self.underWin = None
def do_size_request(self, req):
- height, width = self._size_request()
+ width, height = self._size_request()
- req.height = height
req.width = width
+ req.height = height
def do_size_allocate(self, newalloc):
self.allocation = newalloc

View File

@ -1,285 +0,0 @@
commit 3d3ac635e1ba33e13961c0d9663f23a2387fa3c4
Author: Cole Robinson <crobinso@redhat.com>
Date: Thu Sep 22 10:43:55 2011 -0400
host: Don't use text entries for fields that aren't editable
Also make some interface labels selectable.
diff --git a/src/vmm-host.glade b/src/vmm-host.glade
index 2a6fde6..532d7c6 100644
--- a/src/vmm-host.glade
+++ b/src/vmm-host.glade
@@ -511,8 +511,8 @@
<property name="border_width">6</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">5</property>
<child>
<widget class="GtkLabel" id="label56">
<property name="visible">True</property>
@@ -525,19 +525,6 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="net-name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
<widget class="GtkLabel" id="label58">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -551,21 +538,6 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="net-device">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
<widget class="GtkLabel" id="label63">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -646,6 +618,32 @@
<property name="y_options"></property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="net-name">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="net-device">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
</widget>
</child>
<child>
@@ -676,8 +674,8 @@
<property name="border_width">6</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">5</property>
<child>
<widget class="GtkLabel" id="label52">
<property name="visible">True</property>
@@ -716,49 +714,6 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="net-ip4-network">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="net-ip4-dhcp-start">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="net-ip4-dhcp-end">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
<widget class="GtkLabel" id="label22">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -808,6 +763,49 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="net-ip4-network">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="net-ip4-dhcp-start">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="net-ip4-dhcp-end">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
</widget>
</child>
<child>
@@ -1070,7 +1068,7 @@
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
- <property name="row_spacing">3</property>
+ <property name="row_spacing">5</property>
<child>
<widget class="GtkLabel" id="label73">
<property name="visible">True</property>
@@ -1140,21 +1138,6 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="pool-location">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">●</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
<widget class="GtkLabel" id="label75">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -1237,6 +1220,20 @@
<property name="y_options"></property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="pool-location">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label">label</property>
+ <property name="selectable">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -1611,6 +1608,7 @@
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label">insert mac</property>
+ <property name="selectable">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -1792,6 +1790,7 @@
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label">label</property>
+ <property name="selectable">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -1869,6 +1868,7 @@
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label">label</property>
+ <property name="selectable">True</property>
</widget>
<packing>
<property name="left_attach">1</property>

View File

@ -1,43 +0,0 @@
commit db21a2a8331c8518f27b136d0013a56cf84df7e6
Author: Cole Robinson <crobinso@redhat.com>
Date: Mon Aug 29 14:01:40 2011 -0400
delete: Properly raise 'undefine' errors
diff --git a/src/virtManager/delete.py b/src/virtManager/delete.py
index 79d267e..22f3b23 100644
--- a/src/virtManager/delete.py
+++ b/src/virtManager/delete.py
@@ -183,7 +183,7 @@ class vmmDeleteDialog(vmmGObjectUI):
for errinfo in storage_errors:
storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1])
- if not storage_errstr:
+ if not storage_errstr and not details:
return
# We had extra storage errors. If there was another error message,
commit b36ec4b8c2ec7ed72404db7f71cadfaecfea719e
Author: Cole Robinson <crobinso@redhat.com>
Date: Mon Aug 29 14:03:50 2011 -0400
domain: Remove managed save state before delete
Newer libvirt forbids 'undefine' in this case
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index 2e4ad4f..679dfc4 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -1055,6 +1055,11 @@ class vmmDomain(vmmLibvirtObject):
self.force_update_status()
def delete(self):
+ if self.hasSavedImage():
+ try:
+ self._backend.managedSaveRemove(0)
+ except:
+ logging.exception("Failed to remove managed save state")
self._backend.undefine()
def resume(self):

View File

@ -1,9 +1,9 @@
# -*- rpm-spec -*-
%define _package virt-manager
%define _version 0.9.0
%define _release 8
%define virtinst_version 0.600.0
%define _version 0.9.1
%define _release 1
%define virtinst_version 0.600.1
%define qemu_user "qemu"
%define preferred_distros "fedora,rhel"
@ -34,20 +34,6 @@ Group: Applications/Emulators
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
# Fix typo that broke net stats reporting
Patch1: %{name}-fix-net-stats.patch
# Fix 'Resize to VM' graphical option (bz 738806)
Patch2: %{name}-fix-resize-to-vm.patch
# Fix deleting guest with managed save data
Patch3: %{name}-managed-save-delete.patch
# Fix error when adding default storage
Patch4: %{name}-default-storage-error.patch
# Don't flush XML cache on every tick
Patch5: %{name}-cache-xml-fix.patch
# Use labels for non-editable network info fields (bz 738751)
Patch6: %{name}-host-net-labels.patch
# Fix crashes when deleting a VM (bz 749263)
Patch7: %{name}-console-cleanup-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -156,13 +142,6 @@ Common files used by the different Virtual Machine Manager interfaces.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
%if %{qemu_user}
@ -280,6 +259,14 @@ update-desktop-database -q %{_datadir}/applications
%endif
%changelog
* Wed Feb 01 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-1
- Rebased to version 0.9.1
- Support for adding usb redirection devices (Marc-André Lureau)
- Option to switch usb controller to support usb2.0 (Marc-André Lureau)
- Option to specify machine type for non-x86 guests (Li Zhang)
- Support for filesystem device type and write policy (Deepak C Shetty)
- Many bug fixes!
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-8.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild