Accepting request 728085 from Virtualization
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/728085 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=199
This commit is contained in:
commit
22ad4451e2
110
0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
Normal file
110
0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
Normal file
@ -0,0 +1,110 @@
|
||||
Subject: guest: Don't set default uefi if firmware= is set
|
||||
From: Cole Robinson crobinso@redhat.com Fri Jul 12 15:58:22 2019 -0400
|
||||
Date: Fri Jul 12 16:01:21 2019 -0400:
|
||||
Git: 0c223ab21f0cff216b4a1ab2070a43f0e943d308
|
||||
|
||||
|
||||
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml b/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml
|
||||
new file mode 100644
|
||||
index 00000000..b062e805
|
||||
--- /dev/null
|
||||
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml
|
||||
@@ -0,0 +1,55 @@
|
||||
+<domain type="kvm">
|
||||
+ <name>vm1</name>
|
||||
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
+ <memory>65536</memory>
|
||||
+ <currentMemory>65536</currentMemory>
|
||||
+ <vcpu>1</vcpu>
|
||||
+ <os firmware="efi">
|
||||
+ <type arch="aarch64" machine="virt">hvm</type>
|
||||
+ <boot dev="network"/>
|
||||
+ </os>
|
||||
+ <cpu mode="host-passthrough"/>
|
||||
+ <clock offset="utc"/>
|
||||
+ <on_reboot>destroy</on_reboot>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
+ <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||
+ <interface type="bridge">
|
||||
+ <source bridge="testsuitebr0"/>
|
||||
+ <mac address="00:11:22:33:44:55"/>
|
||||
+ <model type="virtio"/>
|
||||
+ </interface>
|
||||
+ <console type="pty"/>
|
||||
+ <channel type="unix">
|
||||
+ <source mode="bind"/>
|
||||
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
+ </channel>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
+<domain type="kvm">
|
||||
+ <name>vm1</name>
|
||||
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
+ <memory>65536</memory>
|
||||
+ <currentMemory>65536</currentMemory>
|
||||
+ <vcpu>1</vcpu>
|
||||
+ <os firmware="efi">
|
||||
+ <type arch="aarch64" machine="virt">hvm</type>
|
||||
+ <boot dev="network"/>
|
||||
+ </os>
|
||||
+ <cpu mode="host-passthrough"/>
|
||||
+ <clock offset="utc"/>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
+ <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||
+ <interface type="bridge">
|
||||
+ <source bridge="testsuitebr0"/>
|
||||
+ <mac address="00:11:22:33:44:55"/>
|
||||
+ <model type="virtio"/>
|
||||
+ </interface>
|
||||
+ <console type="pty"/>
|
||||
+ <channel type="unix">
|
||||
+ <source mode="bind"/>
|
||||
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
+ </channel>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
diff --git a/tests/clitest.py b/tests/clitest.py
|
||||
index 7ef324bc..a309f937 100644
|
||||
--- a/tests/clitest.py
|
||||
+++ b/tests/clitest.py
|
||||
@@ -990,6 +990,7 @@ c.add_compare("--arch aarch64 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.init
|
||||
c.add_compare("--arch aarch64 --cdrom %(EXISTIMG2)s --boot loader=CODE.fd,nvram.template=VARS.fd --disk %(EXISTIMG1)s --cpu none --events on_crash=preserve,on_reboot=destroy,on_poweroff=restart", "aarch64-cdrom")
|
||||
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21 --panic default", "aarch64-kvm-import") # the --panic is a no-op
|
||||
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk size=1 --os-variant fedora22 --features gic_version=host --network network=default,address.type=pci --controller type=scsi,model=virtio-scsi,address.type=pci", "aarch64-kvm-gic")
|
||||
+c.add_compare("--connect %(URI-KVM-AARCH64)s --arch aarch64 --disk none --pxe --boot firmware=efi", "aarch64-firmware-no-override")
|
||||
|
||||
|
||||
# Simple headless guests for various architectures
|
||||
diff --git a/virtinst/guest.py b/virtinst/guest.py
|
||||
index 41357644..f0fcfe7d 100644
|
||||
--- a/virtinst/guest.py
|
||||
+++ b/virtinst/guest.py
|
||||
@@ -561,8 +561,9 @@ class Guest(XMLBuilder):
|
||||
return path
|
||||
|
||||
def is_uefi(self):
|
||||
- return bool(self.os.loader and
|
||||
- self.os.loader_type == "pflash")
|
||||
+ if self.os.loader and self.os.loader_type == "pflash":
|
||||
+ return True
|
||||
+ return self.os.firmware == "efi"
|
||||
|
||||
def set_uefi_path(self, path):
|
||||
"""
|
||||
@@ -781,11 +782,13 @@ class Guest(XMLBuilder):
|
||||
not self.os.kernel and
|
||||
not self.os.loader and
|
||||
self.os.loader_ro is None and
|
||||
- self.os.nvram is None)
|
||||
+ self.os.nvram is None and
|
||||
+ self.os.firmware is None)
|
||||
|
||||
if use_default_uefi or self.uefi_requested:
|
||||
try:
|
||||
path = self.get_uefi_path()
|
||||
+ log.debug("Setting UEFI path=%s", path)
|
||||
self.set_uefi_path(path)
|
||||
except RuntimeError as e:
|
||||
if self.uefi_requested:
|
@ -0,0 +1,27 @@
|
||||
Subject: urlfetcher: Don't override fullurl when it's explicitly set
|
||||
From: Fabiano Fidêncio fidencio@redhat.com Fri Aug 2 17:01:44 2019 +0200
|
||||
Date: Tue Aug 6 17:59:05 2019 -0400:
|
||||
Git: 3009888a0ed200a4f472dd32239a7c5157fef391
|
||||
|
||||
acquireFile method receives an optional "fullurl" argument. In case it's
|
||||
not passed, its value is set as the same value of the filename. However,
|
||||
when fullurl is passed, it should be used and not overriden by the
|
||||
filename, otherwise fetcher.acquireFile() will just bail.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
||||
|
||||
diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py
|
||||
index 07f8b5ea..6084bf01 100644
|
||||
--- a/virtinst/install/urlfetcher.py
|
||||
+++ b/virtinst/install/urlfetcher.py
|
||||
@@ -411,7 +411,8 @@ class DirectFetcher(_URLFetcher):
|
||||
return filename
|
||||
|
||||
def acquireFile(self, filename, fullurl=None):
|
||||
- fullurl = filename
|
||||
+ if not fullurl:
|
||||
+ fullurl = filename
|
||||
filename = os.path.basename(filename)
|
||||
fetcher = fetcherForURI(fullurl, self.scratchdir, self.meter, direct=True)
|
||||
return fetcher.acquireFile(filename, fullurl) # pylint: disable=protected-access
|
@ -0,0 +1,29 @@
|
||||
Subject: virt-install: Use minutes instead of seconds on get_time_string()
|
||||
From: Fabiano Fidêncio fidencio@redhat.com Thu Jul 25 14:09:53 2019 +0200
|
||||
Date: Thu Jul 25 19:13:13 2019 -0400:
|
||||
Git: 414ffa5ef82548d502a4de98d40228a68bdb29c1
|
||||
|
||||
get_time_string() currently uses self._wait_secs, while it should use
|
||||
self._wait_mins, resulting on confusing messages when using `--wait`
|
||||
option, as shown below:
|
||||
|
||||
fidencio@laerte ~/src/upstream/virt-manager $ ./virt-install --install fedora30 --unattended --wait 20
|
||||
...
|
||||
Waiting 1200 minutes for installation to complete.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
||||
|
||||
diff --git a/virt-install b/virt-install
|
||||
index af6c75bf..8efa4960 100755
|
||||
--- a/virt-install
|
||||
+++ b/virt-install
|
||||
@@ -610,7 +610,7 @@ class WaitHandler:
|
||||
self._start_time = time.time()
|
||||
|
||||
def get_time_string(self):
|
||||
- timestr = _(" %d minutes") % self._wait_secs
|
||||
+ timestr = _(" %d minutes") % self._wait_mins
|
||||
if self._wait_forever:
|
||||
timestr = ""
|
||||
ret = _("Waiting%(time_string)s for installation to complete.") % {
|
@ -0,0 +1,39 @@
|
||||
Subject: urlfetcher: Force a flush after writing to a file
|
||||
From: Fabiano Fidêncio fidencio@redhat.com Mon Aug 5 13:47:25 2019 +0200
|
||||
Date: Tue Aug 6 17:59:05 2019 -0400:
|
||||
Git: 5324582747a57c5df1574ed99dbe20d3d0f65747
|
||||
|
||||
While downloading really small files, on some file systems, the files
|
||||
may not be flushed on time for whatever reason they've been downloaded.
|
||||
|
||||
This issue was noticed after trying to perform unattended installations
|
||||
and noticing that some files, particularly really small ones, where just
|
||||
empty.
|
||||
|
||||
While the original issue would be fixed by doing the flush on
|
||||
_HTTPURLFetcher::_write(), let's also force it on _URLFetcher::_write()
|
||||
to do the same.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
||||
|
||||
diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py
|
||||
index e48c801c..07f8b5ea 100644
|
||||
--- a/virtinst/install/urlfetcher.py
|
||||
+++ b/virtinst/install/urlfetcher.py
|
||||
@@ -156,6 +156,7 @@ class _URLFetcher(object):
|
||||
fileobj.write(buff)
|
||||
total += len(buff)
|
||||
self.meter.update(total)
|
||||
+ fileobj.flush()
|
||||
return total
|
||||
|
||||
def _grabber(self, url):
|
||||
@@ -291,6 +292,7 @@ class _HTTPURLFetcher(_URLFetcher):
|
||||
fileobj.write(data)
|
||||
total += len(data)
|
||||
self.meter.update(total)
|
||||
+ fileobj.flush()
|
||||
return total
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 27 13:54:23 MDT 2019 - carnold@suse.com
|
||||
|
||||
- Upstream bug fixes (bsc#1027942)
|
||||
0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
|
||||
414ffa5e-virt-install-Use-minutes-instead-of-seconds-on-get_time_string.patch
|
||||
53245827-urlfetcher-Force-a-flush-after-writing-to-a-file.patch
|
||||
3009888a-urlfetcher-Dont-override-fullurl-when-its-explicitly-set.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 29 13:22:56 MDT 2019 - carnold@suse.com
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -33,6 +33,10 @@ Source2: virt-install.desktop
|
||||
Source3: virt-manager-supportconfig
|
||||
# Upstream Patches
|
||||
Patch1: 3c6e8537-guest-fix-warning-message-when-machine-type-is-changed-for-secure-boot.patch
|
||||
Patch2: 0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
|
||||
Patch3: 414ffa5e-virt-install-Use-minutes-instead-of-seconds-on-get_time_string.patch
|
||||
Patch4: 53245827-urlfetcher-Force-a-flush-after-writing-to-a-file.patch
|
||||
Patch5: 3009888a-urlfetcher-Dont-override-fullurl-when-its-explicitly-set.patch
|
||||
# SUSE Only
|
||||
Patch70: virtman-desktop.patch
|
||||
Patch71: virtman-kvm.patch
|
||||
@ -166,6 +170,10 @@ machine).
|
||||
%setup -q
|
||||
# Upstream Patches
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
# SUSE Only
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
|
@ -32,7 +32,7 @@ Index: virt-manager-2.2.1/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-2.2.1.orig/virtinst/guest.py
|
||||
+++ virt-manager-2.2.1/virtinst/guest.py
|
||||
@@ -821,7 +821,7 @@ class Guest(XMLBuilder):
|
||||
@@ -824,7 +824,7 @@ class Guest(XMLBuilder):
|
||||
|
||||
usb_tablet = False
|
||||
usb_keyboard = False
|
||||
|
@ -25,7 +25,7 @@ Index: virt-manager-2.2.1/virtinst/guest.py
|
||||
return True
|
||||
|
||||
return False
|
||||
@@ -861,7 +864,7 @@ class Guest(XMLBuilder):
|
||||
@@ -864,7 +867,7 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def _add_default_video_device(self):
|
||||
@ -34,7 +34,7 @@ Index: virt-manager-2.2.1/virtinst/guest.py
|
||||
return
|
||||
if self.devices.video:
|
||||
return
|
||||
@@ -928,7 +931,7 @@ class Guest(XMLBuilder):
|
||||
@@ -931,7 +934,7 @@ class Guest(XMLBuilder):
|
||||
return
|
||||
if self.os.is_container() and not self.conn.is_vz():
|
||||
return
|
||||
|
@ -5,7 +5,7 @@ Index: virt-manager-2.2.1/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-2.2.1.orig/virtinst/guest.py
|
||||
+++ virt-manager-2.2.1/virtinst/guest.py
|
||||
@@ -739,6 +739,10 @@ class Guest(XMLBuilder):
|
||||
@@ -740,6 +740,10 @@ class Guest(XMLBuilder):
|
||||
self._add_default_memballoon()
|
||||
|
||||
self.clock.set_defaults(self)
|
||||
|
Loading…
Reference in New Issue
Block a user