1
0
mirror of https://src.fedoraproject.org/rpms/virt-manager.git synced 2025-07-15 16:53:32 +00:00

Error when trying to modify existing 9p share (bz #1257565)

virt-manager tries to create vmport device on non-x86 backends (bz #1259998)
Details/Virtual networks: Allow manually specifying a bridge for qemu:///session (bz #1212443)
RFE Improve Solaris 10 x86-64 support in virt-manager (bz #1262093)
No system tray icon in Cinnamon session (bz #1257949)
This commit is contained in:
Cole Robinson
2015-11-27 19:50:58 -05:00
parent a44b6fcc46
commit ac98aee4b0
6 changed files with 439 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 1 Sep 2015 12:31:53 -0400
Subject: [PATCH virt-manager] fsdetails: Drop check for qemu target collision
(bz #1257565)
We can fix the reported bug, but this is one of those cases where
libvirt or qemu should be warning if there's a problem, so just drop
our local check
(cherry picked from commit fbb31bd156acda1508a2d540425e97b7ddf68737)
---
virtManager/fsdetails.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/virtManager/fsdetails.py b/virtManager/fsdetails.py
index d351f0a..52bd3b7 100644
--- a/virtManager/fsdetails.py
+++ b/virtManager/fsdetails.py
@@ -299,10 +299,6 @@ class vmmFSDetails(vmmGObjectUI):
if not target:
return self.err.val_err(_("A filesystem target must be specified"))
- if self.conn.is_qemu() and self.filesystem_target_present(target):
- return self.err.val_err(_('Invalid target path. A filesystem with'
- ' that target already exists'))
-
try:
self._dev = VirtualFilesystem(conn)
if fstype == VirtualFilesystem.TYPE_RAM:
@@ -328,15 +324,6 @@ class vmmFSDetails(vmmGObjectUI):
except Exception, e:
return self.err.val_err(_("Filesystem parameter error"), e)
- def filesystem_target_present(self, target):
- fsdevs = self.vm.get_filesystem_devices()
-
- for fs in fsdevs:
- if (fs.target == target):
- return True
-
- return False
-
def _browse_file(self, textent, isdir=False):
def set_storage_cb(src, path):
if path:

View File

@ -0,0 +1,106 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 4 Sep 2015 12:14:22 -0400
Subject: [PATCH virt-manager] guest: Don't try to set vmport on non-x86, it
isn't supported (bz 1259998)
(cherry picked from commit 5e68b0fc3d9b93491817a3c1914fa9b3633440b6)
---
.../cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml | 1 -
tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml | 1 -
tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml | 1 -
tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml | 2 +-
tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml | 9 ---------
tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml | 2 +-
virtinst/guest.py | 1 +
7 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml b/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
index 6c7e573..df864f1 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
@@ -12,7 +12,6 @@
<acpi/>
<apic/>
<pae/>
- <vmport state="off"/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml b/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
index 6c7e573..df864f1 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
@@ -12,7 +12,6 @@
<acpi/>
<apic/>
<pae/>
- <vmport state="off"/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
index 0a27562..aff7ebd 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
@@ -11,7 +11,6 @@
<features>
<acpi/>
<apic/>
- <vmport state="off"/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml
index 2935216..84b4a88 100644
--- a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml
+++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml
@@ -1,5 +1,5 @@
<console type="pty">
- <target type="virtio" port="0"/>
+ <target type="virtio" port="1"/>
</console>
- <channel type="pipe">
+ <channel type="null">
diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml
index 7bf3a19..639f1bc 100644
--- a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml
+++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml
@@ -1,11 +1,2 @@
- <target port="0"/>
- </parallel>
- <console type="pty">
-- <target type="virtio" port="0"/>
-+ <target type="serial" port="0"/>
- </console>
- <channel type="pipe">
- <source path="/tmp/guestfwd"/>
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown.
\ No newline at end of file
diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml
index ca2c811..8513c0e 100644
--- a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml
+++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml
@@ -7,7 +7,7 @@
+ <source path="/some/other/log"/>
<target port="0"/>
</parallel>
- <console type="pty">
+ <console type="null">
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown.
\ No newline at end of file
diff --git a/virtinst/guest.py b/virtinst/guest.py
index bf4b70b..fc5f2a8 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -847,6 +847,7 @@ class Guest(XMLBuilder):
self.features.pae = self.conn.caps.supports_pae()
if (self.features.vmport == "default" and
+ self.os.is_x86() and
self.has_spice() and
self.conn.check_support(self.conn.SUPPORT_CONN_VMPORT)):
self.features.vmport = False

View File

@ -0,0 +1,54 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Thu, 24 Sep 2015 16:32:04 -0400
Subject: [PATCH virt-manager] netlist: Allow specifying a manual bridge name
for qemu:///session (bz 1212443)
Since qemu has the setuid qemu-bridge-helper, give a way in the UI
to specify a manual bridge name for qemu:///session. Might not work
all the time but at least the users can try
https://bugzilla.redhat.com/show_bug.cgi?id=1212443
(cherry picked from commit d57d4d0e76a00d39753b8137be7fd81255cd1d87)
---
virtManager/netlist.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/virtManager/netlist.py b/virtManager/netlist.py
index bc9b1fd..c8f37f4 100644
--- a/virtManager/netlist.py
+++ b/virtManager/netlist.py
@@ -240,12 +240,19 @@ class vmmNetworkList(vmmGObjectUI):
model = net_list.get_model()
model.clear()
- # For qemu:///session
+ def _add_manual_bridge_row():
+ manual_row = self._build_source_row(
+ None, None, _("Specify shared device name"),
+ True, False, manual_bridge=True)
+ model.append(manual_row)
+
if self.conn.is_qemu_session():
nettype = virtinst.VirtualNetworkInterface.TYPE_USER
r = self._build_source_row(
nettype, None, self._pretty_network_desc(nettype), True, True)
model.append(r)
+
+ _add_manual_bridge_row()
net_list.set_active(0)
return
@@ -284,12 +291,7 @@ class vmmNetworkList(vmmGObjectUI):
default = [idx for idx in range(len(model)) if
model[idx][2] == label][0]
- # After all is said and done, add a manual bridge option
- manual_row = self._build_source_row(
- None, None, _("Specify shared device name"),
- True, False, manual_bridge=True)
- model.append(manual_row)
-
+ _add_manual_bridge_row()
net_list.set_active(default)

View File

@ -0,0 +1,136 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 3 Nov 2015 11:15:26 -0500
Subject: [PATCH virt-manager] osdict: Disable x2apic for solaris10 (bz
1262093)
It breaks networking:
https://bugzilla.redhat.com/show_bug.cgi?id=1262093
https://bugs.launchpad.net/bugs/1395217
(cherry picked from commit b7e073a407451e1f3e16e98d97357802cf6b3657)
---
.../compare/virt-install-solaris10-defaults.xml | 68 ++++++++++++++++++++++
tests/clitest.py | 1 +
virtinst/guest.py | 4 ++
virtinst/osdict.py | 5 ++
4 files changed, 78 insertions(+)
create mode 100644 tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml
diff --git a/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml b/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml
new file mode 100644
index 0000000..34e89dc
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-install-solaris10-defaults.xml
@@ -0,0 +1,68 @@
+<domain type="kvm">
+ <name>foobar</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch="x86_64">hvm</type>
+ <boot dev="hd"/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <vmport state="off"/>
+ </features>
+ <cpu mode="custom" match="exact">
+ <model>Opteron_G4</model>
+ <feature policy="disable" name="x2apic"/>
+ </cpu>
+ <clock offset="localtime">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <pm>
+ <suspend-to-mem enabled="no"/>
+ <suspend-to-disk enabled="no"/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-kvm</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/var/lib/libvirt/images/foobar.qcow2"/>
+ <target dev="hda" bus="ide"/>
+ </disk>
+ <controller type="usb" index="0" model="ich9-ehci1"/>
+ <controller type="usb" index="0" model="ich9-uhci1">
+ <master startport="0"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci2">
+ <master startport="2"/>
+ </controller>
+ <controller type="usb" index="0" model="ich9-uhci3">
+ <master startport="4"/>
+ </controller>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+ <input type="mouse" bus="ps2"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+ <image compression="off"/>
+ </graphics>
+ <console type="pty"/>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <sound model="ich6"/>
+ <video>
+ <model type="qxl"/>
+ </video>
+ <redirdev bus="usb" type="spicevmc"/>
+ <redirdev bus="usb" type="spicevmc"/>
+ </devices>
+</domain>
diff --git a/tests/clitest.py b/tests/clitest.py
index 056ec4a..2c7ced4 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -700,6 +700,7 @@ c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel7.0", "kvm-rhel7") #
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant centos7.0", "kvm-centos7") # Centos 7 defaults
c.add_compare("--os-variant win7 --cdrom %(EXISTIMG2)s --boot loader_type=pflash,loader=CODE.fd,nvram_template=VARS.fd --disk %(EXISTIMG1)s", "win7-uefi") # no HYPER-V with UEFI
c.add_compare("--machine q35 --cdrom %(EXISTIMG2)s --disk %(EXISTIMG1)s", "q35-defaults") # proper q35 disk defaults
+c.add_compare("--disk size=20 --os-variant solaris10", "solaris10-defaults") # test solaris OS defaults
c.add_compare("--connect %(URI-KVM-REMOTE)s --import --disk %(EXISTIMG1)s --os-variant fedora21 --pm suspend_to_disk=yes", "f21-kvm-remote")
c.add_valid("--connect %(URI-KVM-NODOMCAPS)s --arch aarch64 --nodisks --pxe") # attempt to default to aarch64 UEFI, but it fails, but should only print warnings
diff --git a/virtinst/guest.py b/virtinst/guest.py
index fc5f2a8..91b078a 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -802,7 +802,11 @@ class Guest(XMLBuilder):
elif self.os.is_x86() and self.type == "kvm":
if self.os.arch != self.conn.caps.host.cpu.arch:
return
+
self.cpu.set_special_mode(self.x86_cpu_default)
+ if self._os_object.broken_x2apic():
+ self.cpu.add_feature("x2apic", policy="disable")
+
def _hv_supported(self):
if (self.os.loader_type == "pflash" and
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index a6ae3ac..479d24f 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -426,6 +426,11 @@ class _OsVariant(object):
def need_old_xen_disable_acpi(self):
return self._is_related_to(["winxp", "win2k"], check_upgrades=False)
+ def broken_x2apic(self):
+ # x2apic breaks networking in solaris10
+ # https://bugs.launchpad.net/bugs/1395217
+ return self.name == 'solaris10'
+
def get_clock(self):
if self.is_windows() or self._family in ['solaris']:
return "localtime"

View File

@ -0,0 +1,22 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 18 Nov 2015 18:48:30 -0500
Subject: [PATCH virt-manager] systray: Fix appindicator icon name (bz 1257949)
(cherry picked from commit cbef4ad84b9c241d7fad23ac7ef676e1b06ae29d)
---
virtManager/systray.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtManager/systray.py b/virtManager/systray.py
index 16e8fde..dd6ca71 100644
--- a/virtManager/systray.py
+++ b/virtManager/systray.py
@@ -132,7 +132,7 @@ class vmmSystray(vmmGObject):
if self.systray_indicator:
# pylint: disable=maybe-no-member
self.systray_icon = AppIndicator3.Indicator.new("virt-manager",
- "virt-manager-icon",
+ "virt-manager",
AppIndicator3.IndicatorCategory.OTHER)
self.systray_icon.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
self.systray_icon.set_menu(self.systray_menu)

View File

@ -21,7 +21,7 @@
Name: virt-manager
Version: 1.2.1
Release: 3%{?dist}
Release: 4%{?dist}
%define verrel %{version}-%{release}
Summary: Virtual Machine Manager
@ -29,6 +29,42 @@ Group: Applications/Emulators
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
# Fix errors with missing nodedevs (bz #1225771)
Patch0001: 0001-connection-catch-more-errors-in-filter_nodedevs-bug-.patch
# Fix CDROM media change if device is bootable (bz #1229819)
Patch0002: 0002-domain-Use-UpdateDevice-for-CDROM-media-change-bz-12.patch
# Fix adding iscsi pools (bz #1231558)
Patch0003: 0003-createpool-Fix-adding-iscsi-pools-bz-1231558.patch
# spec: Add LXC to default connection list (bz #1235972)
Patch0004: 0004-spec-Add-LXC-to-default-connection-list-bz-1235972.patch
# Fix backtrace when reporting OS error (bz #1241902)
Patch0005: 0005-create-Fix-backtrace-when-reporting-OS-error-bz-1241.patch
Patch0006: 0006-osdict-Fix-unix-alias.patch
# Raise upper limits for lxc ID namespaces (bz #1244490)
Patch0007: 0007-details-Raise-upper-limits-for-lxc-ID-namespaces-bz-.patch
# Fix 'copy host CPU definition'
Patch0008: 0008-virtinst.cpu-fix-copy-host-cpu-definition.patch
Patch0009: 0009-tests-Add-test-for-CPU-clearing.patch
# Fix displaying VM machine type when connecting to old libvirt
Patch0010: 0010-details-don-t-display-error-if-machine-is-missing-in.patch
# Fix qemu:///session handling in 'Add Connection' dialog
Patch0011: 0011-addconnection-Fix-qemu-session-vs.-lxc-detection.patch
# Fix default storage path for qemu:///session, it should be
# .local/share/...
Patch0012: 0012-storage-session-path-should-be-.local-share-libvirt-.patch
# Error when trying to modify existing 9p share (bz #1257565)
Patch0013: 0013-fsdetails-Drop-check-for-qemu-target-collision-bz-12.patch
# virt-manager tries to create vmport device on non-x86 backends (bz
# #1259998)
Patch0014: 0014-guest-Don-t-try-to-set-vmport-on-non-x86-it-isn-t-su.patch
# Details/Virtual networks: Allow manually specifying a bridge for
# qemu:///session (bz #1212443)
Patch0015: 0015-netlist-Allow-specifying-a-manual-bridge-name-for-qe.patch
# RFE Improve Solaris 10 x86-64 support in virt-manager (bz #1262093)
Patch0016: 0016-osdict-Disable-x2apic-for-solaris10-bz-1262093.patch
# No system tray icon in Cinnamon session (bz #1257949)
Patch0017: 0017-systray-Fix-appindicator-icon-name-bz-1257949.patch
BuildArch: noarch
@ -102,6 +138,42 @@ machine).
%prep
%setup -q
# Fix errors with missing nodedevs (bz #1225771)
%patch0001 -p1
# Fix CDROM media change if device is bootable (bz #1229819)
%patch0002 -p1
# Fix adding iscsi pools (bz #1231558)
%patch0003 -p1
# spec: Add LXC to default connection list (bz #1235972)
%patch0004 -p1
# Fix backtrace when reporting OS error (bz #1241902)
%patch0005 -p1
%patch0006 -p1
# Raise upper limits for lxc ID namespaces (bz #1244490)
%patch0007 -p1
# Fix 'copy host CPU definition'
%patch0008 -p1
%patch0009 -p1
# Fix displaying VM machine type when connecting to old libvirt
%patch0010 -p1
# Fix qemu:///session handling in 'Add Connection' dialog
%patch0011 -p1
# Fix default storage path for qemu:///session, it should be
# .local/share/...
%patch0012 -p1
# Error when trying to modify existing 9p share (bz #1257565)
%patch0013 -p1
# virt-manager tries to create vmport device on non-x86 backends (bz
# #1259998)
%patch0014 -p1
# Details/Virtual networks: Allow manually specifying a bridge for
# qemu:///session (bz #1212443)
%patch0015 -p1
# RFE Improve Solaris 10 x86-64 support in virt-manager (bz #1262093)
%patch0016 -p1
# No system tray icon in Cinnamon session (bz #1257949)
%patch0017 -p1
%build
%if %{qemu_user}
%define _qemu_user --qemu-user=%{qemu_user}
@ -213,6 +285,9 @@ fi
%{_bindir}/virt-xml
%changelog
* Fri Nov 27 2015 Cole Robinson <crobinso@redhat.com> - 1.2.1-4
- Re-add incorrectly dropped patches
* Wed Nov 25 2015 Cole Robinson <crobinso@redhat.com> - 1.2.1-3
- Error when trying to modify existing 9p share (bz #1257565)
- virt-manager tries to create vmport device on non-x86 backends (bz #1259998)