- Drop the following patches for bsc#938942 as they are not needed.
virtman-reset-image-filename-based-on-format.patch virtman-allow-other-disk-formats.patch - Upstream bug fixes a9b303fb-fix-copy-host-cpu-definition.patch f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch aebebbf8-report-an-error-for-pxe-install-without-network.patch 4970615f-fix-qemu-vs-lxc-detection.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=246
This commit is contained in:
parent
3759fa950b
commit
d3a9e22f63
20
4970615f-fix-qemu-vs-lxc-detection.patch
Normal file
20
4970615f-fix-qemu-vs-lxc-detection.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Subject: addconnection: Fix qemu:///session vs. lxc:/// detection
|
||||||
|
From: Cole Robinson crobinso@redhat.com Sun Aug 9 12:27:20 2015 -0400
|
||||||
|
Date: Sun Aug 9 12:27:20 2015 -0400:
|
||||||
|
Git: 4970615f4870cc5394a46ff6a049ac937b3043d6
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/virtManager/connect.py b/virtManager/connect.py
|
||||||
|
index b977fea..7493d14 100644
|
||||||
|
--- a/virtManager/connect.py
|
||||||
|
+++ b/virtManager/connect.py
|
||||||
|
@@ -327,7 +327,8 @@ class vmmConnect(vmmGObjectUI):
|
||||||
|
self.populate_uri()
|
||||||
|
|
||||||
|
def hypervisor_changed(self, src):
|
||||||
|
- is_session = (src.get_active() == HV_QEMU_SESSION)
|
||||||
|
+ hv = uiutil.get_list_selection(self.widget("hypervisor"))
|
||||||
|
+ is_session = (hv == HV_QEMU_SESSION)
|
||||||
|
uiutil.set_grid_row_visible(
|
||||||
|
self.widget("session-warning-box"), is_session)
|
||||||
|
uiutil.set_grid_row_visible(
|
29
a9b303fb-fix-copy-host-cpu-definition.patch
Normal file
29
a9b303fb-fix-copy-host-cpu-definition.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Subject: virtinst.cpu: fix copy host cpu definition
|
||||||
|
From: Pavel Hrdina phrdina@redhat.com Tue Jul 14 15:53:25 2015 +0200
|
||||||
|
Date: Tue Jul 14 11:53:02 2015 -0400:
|
||||||
|
Git: a9b303fb141df5b2d2051c6b4ed489dbb09952f8
|
||||||
|
|
||||||
|
Commit cac4ac14 updated cpu features to use XMLBuilder and this change
|
||||||
|
removes the 'Features' class. There is no longer any '.names()'
|
||||||
|
method to return names, so just cycle through all features and use a
|
||||||
|
name attribute instead.
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1240938
|
||||||
|
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/virtinst/cpu.py b/virtinst/cpu.py
|
||||||
|
index b12fd30..fb17bb7 100644
|
||||||
|
--- a/virtinst/cpu.py
|
||||||
|
+++ b/virtinst/cpu.py
|
||||||
|
@@ -104,8 +104,8 @@ class CPU(XMLBuilder):
|
||||||
|
|
||||||
|
for feature in self.features:
|
||||||
|
self.remove_feature(feature)
|
||||||
|
- for name in cpu.features.names():
|
||||||
|
- self.add_feature(name)
|
||||||
|
+ for feature in cpu.features:
|
||||||
|
+ self.add_feature(feature.name)
|
||||||
|
|
||||||
|
def vcpus_from_topology(self):
|
||||||
|
"""
|
@ -0,0 +1,41 @@
|
|||||||
|
Subject: virt-install: report an error for pxe install without network
|
||||||
|
From: Pavel Hrdina phrdina@redhat.com Thu Aug 6 14:43:00 2015 +0200
|
||||||
|
Date: Thu Aug 6 14:56:30 2015 +0200:
|
||||||
|
Git: aebebbf879ff33af38f858aebc01a5de1cafb1a7
|
||||||
|
|
||||||
|
Fix a regression where we used to report an error message if user
|
||||||
|
specified pxe installation without any network (--nonetworks or
|
||||||
|
--network none).
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1250382
|
||||||
|
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
Index: virt-manager-1.2.1/tests/clitest.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.2.1.orig/tests/clitest.py
|
||||||
|
+++ virt-manager-1.2.1/tests/clitest.py
|
||||||
|
@@ -742,8 +742,8 @@ c.add_valid("--mac 22:22:33:44:55:AF")
|
||||||
|
c.add_valid("--bridge mybr0 --mac 22:22:33:44:55:AF") # Old bridge w/ mac
|
||||||
|
c.add_valid("--network bridge:mybr0,model=e1000") # --network bridge:
|
||||||
|
c.add_valid("--network network:default --mac RANDOM") # VirtualNetwork with a random macaddr
|
||||||
|
-c.add_valid("--nonetworks") # no networks
|
||||||
|
c.add_valid("--vnc --keymap=local") # --keymap local
|
||||||
|
+c.add_invalid("--nonetworks") # no networks
|
||||||
|
c.add_invalid("--graphics vnc --vnclisten 1.2.3.4") # mixing old and new
|
||||||
|
c.add_invalid("--network=FOO") # Nonexistent network
|
||||||
|
c.add_invalid("--mac 1234") # Invalid mac
|
||||||
|
Index: virt-manager-1.2.1/virt-install
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.2.1.orig/virt-install
|
||||||
|
+++ virt-manager-1.2.1/virt-install
|
||||||
|
@@ -226,6 +226,9 @@ def convert_old_networks(options):
|
||||||
|
fail(_("Cannot use --nonetworks with --network"))
|
||||||
|
options.network = ["none"]
|
||||||
|
|
||||||
|
+ if options.pxe and options.network and "none" in options.network:
|
||||||
|
+ fail(_("Can't use --pxe without any network"))
|
||||||
|
+
|
||||||
|
macs = virtinst.util.listify(options.mac)
|
||||||
|
networks = virtinst.util.listify(options.network)
|
||||||
|
bridges = virtinst.util.listify(options.bridge)
|
@ -0,0 +1,29 @@
|
|||||||
|
Subject: details: don't display error if machine is missing in XML
|
||||||
|
From: Pavel Hrdina phrdina@redhat.com Fri Jul 31 14:28:00 2015 +0200
|
||||||
|
Date: Wed Aug 5 13:32:04 2015 +0200:
|
||||||
|
Git: f81358b02d58b709529a35268cbaf8ce098d803a
|
||||||
|
|
||||||
|
Commint 0ddec919 updated the details page. Now the detail page of
|
||||||
|
existing domain cannot update the 'machine' value, only prints that
|
||||||
|
value. If we cannot get the machine from domain XML, don't pass a None,
|
||||||
|
but "Unknown" instead. This can happen if you are connecting with
|
||||||
|
virt-manager to really old libvirt, the machine value is present in
|
||||||
|
domain XML since libvirt v0.9.5.
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238981
|
||||||
|
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/virtManager/details.py b/virtManager/details.py
|
||||||
|
index 718f50a..8507bd0 100644
|
||||||
|
--- a/virtManager/details.py
|
||||||
|
+++ b/virtManager/details.py
|
||||||
|
@@ -2457,7 +2457,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
self.widget("overview-firmware-label").set_text(firmware)
|
||||||
|
|
||||||
|
# Machine settings
|
||||||
|
- machtype = self.vm.get_machtype()
|
||||||
|
+ machtype = self.vm.get_machtype() or _("Unknown")
|
||||||
|
if self.widget("machine-type").is_visible():
|
||||||
|
uiutil.set_list_selection(
|
||||||
|
self.widget("machine-type"), machtype)
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 10 11:58:32 MDT 2015 - carnold@suse.com
|
||||||
|
|
||||||
|
- Drop the following patches for bsc#938942 as they are not needed.
|
||||||
|
virtman-reset-image-filename-based-on-format.patch
|
||||||
|
virtman-allow-other-disk-formats.patch
|
||||||
|
- Upstream bug fixes
|
||||||
|
a9b303fb-fix-copy-host-cpu-definition.patch
|
||||||
|
f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch
|
||||||
|
aebebbf8-report-an-error-for-pxe-install-without-network.patch
|
||||||
|
4970615f-fix-qemu-vs-lxc-detection.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 23 09:39:26 MDT 2015 - carnold@suse.com
|
Thu Jul 23 09:39:26 MDT 2015 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -41,6 +41,10 @@ Patch1: 77423e7a-connection-catch-more-errors-in-filter_nodedevs.patch
|
|||||||
Patch2: fc93e154-fix-udp-tcp-host-vs-mode-UI.patch
|
Patch2: fc93e154-fix-udp-tcp-host-vs-mode-UI.patch
|
||||||
Patch3: 34db1af7-fix-adding-iscsi-pools.patch
|
Patch3: 34db1af7-fix-adding-iscsi-pools.patch
|
||||||
Patch4: 76bad650-fix-virt-xml-define-and-update.patch
|
Patch4: 76bad650-fix-virt-xml-define-and-update.patch
|
||||||
|
Patch5: a9b303fb-fix-copy-host-cpu-definition.patch
|
||||||
|
Patch6: f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch
|
||||||
|
Patch7: aebebbf8-report-an-error-for-pxe-install-without-network.patch
|
||||||
|
Patch8: 4970615f-fix-qemu-vs-lxc-detection.patch
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
Patch70: virtman-desktop.patch
|
Patch70: virtman-desktop.patch
|
||||||
Patch71: virtman-kvm.patch
|
Patch71: virtman-kvm.patch
|
||||||
@ -77,8 +81,6 @@ Patch152: virtman-increase-setKeepAlive-count.patch
|
|||||||
Patch153: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
|
Patch153: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
|
||||||
Patch154: virtman-check-for-valid-display.patch
|
Patch154: virtman-check-for-valid-display.patch
|
||||||
Patch155: virtman-allow-creating-i686-vm.patch
|
Patch155: virtman-allow-creating-i686-vm.patch
|
||||||
Patch156: virtman-reset-image-filename-based-on-format.patch
|
|
||||||
Patch157: virtman-allow-other-disk-formats.patch
|
|
||||||
Patch160: virtinst-xen-drive-type.patch
|
Patch160: virtinst-xen-drive-type.patch
|
||||||
Patch161: virtinst-xenbus-disk-index-fix.patch
|
Patch161: virtinst-xenbus-disk-index-fix.patch
|
||||||
Patch162: virtinst-refresh_before_fetch_pool.patch
|
Patch162: virtinst-refresh_before_fetch_pool.patch
|
||||||
@ -167,6 +169,10 @@ machine).
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
@ -203,8 +209,6 @@ machine).
|
|||||||
%patch153 -p1
|
%patch153 -p1
|
||||||
%patch154 -p1
|
%patch154 -p1
|
||||||
%patch155 -p1
|
%patch155 -p1
|
||||||
%patch156 -p1
|
|
||||||
%patch157 -p1
|
|
||||||
%patch160 -p1
|
%patch160 -p1
|
||||||
%patch161 -p1
|
%patch161 -p1
|
||||||
%patch162 -p1
|
%patch162 -p1
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
Reference: bsc#938942
|
|
||||||
Allow something other than qcow2 to be selected as the initial boot disk
|
|
||||||
from the 'Customize configuration before install' screen. This is valid
|
|
||||||
only when the disk has not yet been created.
|
|
||||||
Changing the format requires changing the domain xml and the volume
|
|
||||||
xml and renaming the file with an appropriate extension.
|
|
||||||
|
|
||||||
Index: virt-manager-1.2.1/virtManager/details.py
|
|
||||||
===================================================================
|
|
||||||
--- virt-manager-1.2.1.orig/virtManager/details.py
|
|
||||||
+++ virt-manager-1.2.1/virtManager/details.py
|
|
||||||
@@ -1830,7 +1830,13 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
self.enable_apply(EDIT_BOOTORDER)
|
|
||||||
|
|
||||||
def disk_format_changed(self, ignore):
|
|
||||||
- self.widget("disk-format-warn").show()
|
|
||||||
+ # Allow changing the disk format if disk hasn't yet been created
|
|
||||||
+ disk = self.get_hw_selection(HW_LIST_COL_DEVICE)
|
|
||||||
+ show_warn = (disk and \
|
|
||||||
+ virtinst.VirtualDisk.path_definitely_exists(disk.conn, disk.path)) and not \
|
|
||||||
+ self.is_customize_dialog
|
|
||||||
+ if show_warn:
|
|
||||||
+ self.widget("disk-format-warn").show()
|
|
||||||
self.enable_apply(EDIT_DISK_FORMAT)
|
|
||||||
|
|
||||||
# IO Tuning
|
|
||||||
@@ -2694,7 +2700,7 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
iotune_wbs = (disk.iotune_wbs or 0) / 1024
|
|
||||||
iotune_wis = (disk.iotune_wis or 0)
|
|
||||||
|
|
||||||
- show_format = (not self.is_customize_dialog or
|
|
||||||
+ show_format = (not self.is_customize_dialog or not
|
|
||||||
virtinst.VirtualDisk.path_definitely_exists(
|
|
||||||
disk.conn, disk.path))
|
|
||||||
|
|
||||||
Index: virt-manager-1.2.1/virtManager/domain.py
|
|
||||||
===================================================================
|
|
||||||
--- virt-manager-1.2.1.orig/virtManager/domain.py
|
|
||||||
+++ virt-manager-1.2.1/virtManager/domain.py
|
|
||||||
@@ -27,6 +27,7 @@ import threading
|
|
||||||
|
|
||||||
import libvirt
|
|
||||||
|
|
||||||
+import virtinst
|
|
||||||
from virtinst import DomainCapabilities
|
|
||||||
from virtinst import DomainSnapshot
|
|
||||||
from virtinst import Guest
|
|
||||||
@@ -721,6 +722,37 @@ class vmmDomain(vmmLibvirtObject):
|
|
||||||
# Device XML editing #
|
|
||||||
######################
|
|
||||||
|
|
||||||
+ # Change the extension on the name.
|
|
||||||
+ def _reset_file_name_extension(self, guest, disk, fmt):
|
|
||||||
+ suffix = virtinst.StorageVolume.get_file_extension_for_format(fmt) or ".img"
|
|
||||||
+ dirpath = os.path.dirname(disk.path)
|
|
||||||
+ pool = self.conn.get_default_pool()
|
|
||||||
+ newcollidelist = []
|
|
||||||
+ collidelist = [d.path for d in self.get_disk_devices()]
|
|
||||||
+ # Sanitize collidelist to work with the collision checker
|
|
||||||
+ for c in collidelist:
|
|
||||||
+ if c and os.path.dirname(c) == pool.get_target_path():
|
|
||||||
+ newcollidelist.append(os.path.basename(c))
|
|
||||||
+ newname = virtinst.StorageVolume.find_free_name(
|
|
||||||
+ pool.get_backend(), guest.name,
|
|
||||||
+ suffix=suffix, collidelist=newcollidelist)
|
|
||||||
+ disk.get_vol_install().name = newname
|
|
||||||
+ return dirpath + '/' + newname
|
|
||||||
+
|
|
||||||
+ # Change the format of the disk image
|
|
||||||
+ def _reset_storage_format(self, disk):
|
|
||||||
+ if disk.driver_type is None:
|
|
||||||
+ return
|
|
||||||
+ fmt = disk.driver_type
|
|
||||||
+ guest = self.get_backend()
|
|
||||||
+ if guest and fmt:
|
|
||||||
+ for d in guest.get_devices("disk"):
|
|
||||||
+ if d.path == disk.path:
|
|
||||||
+ dvol = d.get_vol_install()
|
|
||||||
+ if dvol.format != fmt and fmt in dvol.list_formats():
|
|
||||||
+ dvol.format = fmt
|
|
||||||
+ disk._source_file = self._reset_file_name_extension(guest, d, fmt)
|
|
||||||
+
|
|
||||||
def define_disk(self, devobj, do_hotplug,
|
|
||||||
path=_SENTINEL, readonly=_SENTINEL, serial=_SENTINEL,
|
|
||||||
shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
|
|
||||||
@@ -777,6 +809,7 @@ class vmmDomain(vmmLibvirtObject):
|
|
||||||
editdev.driver_io = io or None
|
|
||||||
if driver_type != _SENTINEL:
|
|
||||||
editdev.driver_type = driver_type or None
|
|
||||||
+ self._reset_storage_format(editdev)
|
|
||||||
if serial != _SENTINEL:
|
|
||||||
editdev.serial = serial or None
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
|||||||
Reference: bsc#938942
|
|
||||||
When a disk is added to an existing virtual machine and the storage format for
|
|
||||||
that disk is selected to be something other than qcow2 reset the image name
|
|
||||||
extension from qcow2 to the format selected. This is for a new disk that needs
|
|
||||||
to be created.
|
|
||||||
|
|
||||||
Index: virt-manager-1.2.1/virtManager/addstorage.py
|
|
||||||
===================================================================
|
|
||||||
--- virt-manager-1.2.1.orig/virtManager/addstorage.py
|
|
||||||
+++ virt-manager-1.2.1/virtManager/addstorage.py
|
|
||||||
@@ -58,9 +58,10 @@ class vmmAddStorage(vmmGObjectUI):
|
|
||||||
def _get_default_dir(self):
|
|
||||||
return virtinst.StoragePool.get_default_dir(self.conn.get_backend())
|
|
||||||
|
|
||||||
- def _get_ideal_path_info(self, name):
|
|
||||||
+ def _get_ideal_path_info(self, name, fmt=None):
|
|
||||||
path = self._get_default_dir()
|
|
||||||
- fmt = self.conn.get_default_storage_format()
|
|
||||||
+ if fmt is None:
|
|
||||||
+ fmt = self.conn.get_default_storage_format()
|
|
||||||
suffix = virtinst.StorageVolume.get_file_extension_for_format(fmt)
|
|
||||||
return (path, name, suffix or ".img")
|
|
||||||
|
|
||||||
@@ -208,7 +209,7 @@ class vmmAddStorage(vmmGObjectUI):
|
|
||||||
use_storage.set_sensitive(True)
|
|
||||||
storage_area.set_tooltip_text(storage_tooltip or "")
|
|
||||||
|
|
||||||
- def get_default_path(self, name, collidelist=None):
|
|
||||||
+ def get_default_path(self, name, fmt=None, collidelist=None):
|
|
||||||
collidelist = collidelist or []
|
|
||||||
pool = self.conn.get_default_pool()
|
|
||||||
|
|
||||||
@@ -217,15 +218,16 @@ class vmmAddStorage(vmmGObjectUI):
|
|
||||||
def path_exists(p):
|
|
||||||
return os.path.exists(p) or p in collidelist
|
|
||||||
|
|
||||||
+ target, ignore, suffix = self._get_ideal_path_info(name, fmt)
|
|
||||||
if not pool:
|
|
||||||
# Use old generating method
|
|
||||||
- origf = os.path.join(default_dir, name + ".img")
|
|
||||||
+ origf = os.path.join(default_dir, name + suffix)
|
|
||||||
f = origf
|
|
||||||
|
|
||||||
n = 1
|
|
||||||
while path_exists(f) and n < 100:
|
|
||||||
f = os.path.join(default_dir, name +
|
|
||||||
- "-" + str(n) + ".img")
|
|
||||||
+ "-" + str(n) + suffix)
|
|
||||||
n += 1
|
|
||||||
|
|
||||||
if path_exists(f):
|
|
||||||
@@ -233,8 +235,6 @@ class vmmAddStorage(vmmGObjectUI):
|
|
||||||
|
|
||||||
path = f
|
|
||||||
else:
|
|
||||||
- target, ignore, suffix = self._get_ideal_path_info(name)
|
|
||||||
-
|
|
||||||
# Sanitize collidelist to work with the collision checker
|
|
||||||
newcollidelist = []
|
|
||||||
for c in collidelist:
|
|
||||||
@@ -310,7 +310,7 @@ class vmmAddStorage(vmmGObjectUI):
|
|
||||||
not self.widget("config-storage-nosparse").get_active())
|
|
||||||
if path is None:
|
|
||||||
if is_default:
|
|
||||||
- path = self.get_default_path(vmname, collidelist)
|
|
||||||
+ path = self.get_default_path(vmname, fmt, collidelist)
|
|
||||||
else:
|
|
||||||
path = self.widget("config-storage-entry").get_text().strip()
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user