import virt-manager-4.1.0-4.el9
This commit is contained in:
parent
c8a1c34216
commit
4e60af558e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/virt-manager-4.0.0.tar.gz
|
SOURCES/virt-manager-4.1.0.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
853b1a65b346ac7be7c68d83697b4107bb780683 SOURCES/virt-manager-4.0.0.tar.gz
|
caaf397d490095b4a026049aa5d87112a07e3699 SOURCES/virt-manager-4.1.0.tar.gz
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
From deb27a8c7e1539e687d589edd7ea517018266f77 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Sun, 21 Aug 2022 16:21:10 -0400
|
||||||
|
Subject: [PATCH] cloner: Sync <uuid> and <sysinfo> system uuid
|
||||||
|
|
||||||
|
Otherwise libvirt errors like:
|
||||||
|
|
||||||
|
ERROR UUID mismatch between <uuid> and <sysinfo>
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=2038040
|
||||||
|
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
(cherry picked from commit b0d0516736320315a70f74aff3759fb35dd35d9d)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2038040
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
tests/data/cli/compare/virt-clone-auto-unmanaged.xml | 5 +++++
|
||||||
|
tests/data/cli/compare/virt-clone-unmanaged-preserve.xml | 5 +++++
|
||||||
|
tests/data/cli/virtclone/clone-disk.xml | 5 +++++
|
||||||
|
virtinst/cloner.py | 6 ++++--
|
||||||
|
4 files changed, 19 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
||||||
|
index 21a9a6398..f2043be25 100644
|
||||||
|
--- a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
||||||
|
+++ b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
||||||
|
@@ -1,6 +1,11 @@
|
||||||
|
<domain type="test">
|
||||||
|
<name>origtest-clone</name>
|
||||||
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||||
|
+ <sysinfo type="smbios">
|
||||||
|
+ <system>
|
||||||
|
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
|
||||||
|
+ </system>
|
||||||
|
+ </sysinfo>
|
||||||
|
<memory>8388608</memory>
|
||||||
|
<currentMemory>2097152</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
diff --git a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
||||||
|
index 3bdbbbe36..c003ed3ee 100644
|
||||||
|
--- a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
||||||
|
+++ b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
||||||
|
@@ -1,6 +1,11 @@
|
||||||
|
<domain type="test">
|
||||||
|
<name>clonetest</name>
|
||||||
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||||
|
+ <sysinfo type="smbios">
|
||||||
|
+ <system>
|
||||||
|
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
|
||||||
|
+ </system>
|
||||||
|
+ </sysinfo>
|
||||||
|
<memory>8388608</memory>
|
||||||
|
<currentMemory>2097152</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
diff --git a/tests/data/cli/virtclone/clone-disk.xml b/tests/data/cli/virtclone/clone-disk.xml
|
||||||
|
index da1eb0a63..2f6e916d7 100644
|
||||||
|
--- a/tests/data/cli/virtclone/clone-disk.xml
|
||||||
|
+++ b/tests/data/cli/virtclone/clone-disk.xml
|
||||||
|
@@ -1,6 +1,11 @@
|
||||||
|
<domain type='test' id='1'>
|
||||||
|
<name>origtest</name>
|
||||||
|
<uuid>db69fa1f-eef0-e567-3c20-3ef16f10376b</uuid>
|
||||||
|
+ <sysinfo type='smbios'>
|
||||||
|
+ <system>
|
||||||
|
+ <entry name='uuid'>db69fa1f-eef0-e567-3c20-3ef16f10376b</entry>
|
||||||
|
+ </system>
|
||||||
|
+ </sysinfo>
|
||||||
|
<memory>8388608</memory>
|
||||||
|
<currentMemory>2097152</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
|
||||||
|
index 34a702f91..9334513c5 100644
|
||||||
|
--- a/virtinst/cloner.py
|
||||||
|
+++ b/virtinst/cloner.py
|
||||||
|
@@ -352,8 +352,7 @@ class Cloner(object):
|
||||||
|
"""
|
||||||
|
self._new_guest.id = None
|
||||||
|
self._new_guest.title = None
|
||||||
|
- self._new_guest.uuid = None
|
||||||
|
- self._new_guest.uuid = Guest.generate_uuid(self.conn)
|
||||||
|
+ self.set_clone_uuid(Guest.generate_uuid(self.conn))
|
||||||
|
|
||||||
|
for dev in self._new_guest.devices.graphics:
|
||||||
|
if dev.port and dev.port != -1:
|
||||||
|
@@ -408,6 +407,9 @@ class Cloner(object):
|
||||||
|
Override the new VMs generated UUId
|
||||||
|
"""
|
||||||
|
self._new_guest.uuid = uuid
|
||||||
|
+ for sysinfo in self._new_guest.sysinfo:
|
||||||
|
+ if sysinfo.system_uuid:
|
||||||
|
+ sysinfo.system_uuid = uuid
|
||||||
|
|
||||||
|
def set_replace(self, val):
|
||||||
|
"""
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,126 @@
|
|||||||
|
From 3702eed072ae7b2d52398a3c9b1c1feb04ffdce3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Wed, 14 Dec 2022 12:57:10 -0500
|
||||||
|
Subject: [PATCH] progress: Fix showing correct final total
|
||||||
|
|
||||||
|
Reproducer:
|
||||||
|
Reproducer:
|
||||||
|
./virt-install --connect test:///default \
|
||||||
|
--location tests/data/fakemedia/fake-f26-netinst.iso
|
||||||
|
|
||||||
|
Before:
|
||||||
|
Starting install...
|
||||||
|
Retrieving 'vmlinuz' | 0 B 00:00:00 ...
|
||||||
|
Retrieving 'initrd.img' | 0 B 00:00:00 ...
|
||||||
|
|
||||||
|
After:
|
||||||
|
Starting install...
|
||||||
|
Retrieving 'vmlinuz' | 9 B 00:00:00 ...
|
||||||
|
Retrieving 'initrd.img' | 9 B 00:00:00 ...
|
||||||
|
|
||||||
|
progress.end() currently only reports the total amount of bytes
|
||||||
|
that were last written to the UI. It should report the total amount
|
||||||
|
that's been passed to update().
|
||||||
|
|
||||||
|
Reported-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
(cherry picked from commit 4114fa1aa827b836d3a1d11c2ac2d367c9bb0463)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
|
||||||
|
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
tests/data/meter/meter1.txt | 2 +-
|
||||||
|
tests/data/meter/meter2.txt | 2 +-
|
||||||
|
tests/data/meter/meter3.txt | 2 +-
|
||||||
|
tests/data/meter/meter5.txt | 2 +-
|
||||||
|
tests/data/meter/meter6.txt | 2 +-
|
||||||
|
tests/test_misc.py | 4 +++-
|
||||||
|
virtinst/_progresspriv.py | 4 ++--
|
||||||
|
7 files changed, 10 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/data/meter/meter1.txt b/tests/data/meter/meter1.txt
|
||||||
|
index a3f7c7d2f..7e154c972 100644
|
||||||
|
--- a/tests/data/meter/meter1.txt
|
||||||
|
+++ b/tests/data/meter/meter1.txt
|
||||||
|
@@ -9,4 +9,4 @@ Meter text test 20% [=== ] 413 B/s | 2.0 kB 00:19 ETA
|
||||||
|
|
||||||
|
Meter text test 40% [======- ] 731 B/s | 3.9 kB 00:08 ETA
|
||||||
|
|
||||||
|
-Meter text test | 3.9 kB 00:04 ...
|
||||||
|
+Meter text test | 4.4 kB 00:04 ...
|
||||||
|
diff --git a/tests/data/meter/meter2.txt b/tests/data/meter/meter2.txt
|
||||||
|
index 93e93dc31..7ccc31636 100644
|
||||||
|
--- a/tests/data/meter/meter2.txt
|
||||||
|
+++ b/tests/data/meter/meter2.txt
|
||||||
|
@@ -9,4 +9,4 @@ Meter text test 20% [=======
|
||||||
|
|
||||||
|
Meter text test 40% [============== ] 731 B/s | 3.9 kB 00:00:08 ETA
|
||||||
|
|
||||||
|
-Meter text test | 3.9 kB 00:00:04 ...
|
||||||
|
+Meter text test | 4.4 kB 00:00:04 ...
|
||||||
|
diff --git a/tests/data/meter/meter3.txt b/tests/data/meter/meter3.txt
|
||||||
|
index 474e40f74..6f66608fe 100644
|
||||||
|
--- a/tests/data/meter/meter3.txt
|
||||||
|
+++ b/tests/data/meter/meter3.txt
|
||||||
|
@@ -4,4 +4,4 @@ Meter text test 67 B/s | 200 B 00:02
|
||||||
|
Meter text test 413 B/s | 2.0 kB 00:03
|
||||||
|
Meter text test 731 B/s | 3.9 kB 00:04
|
||||||
|
|
||||||
|
-Meter text test | 3.9 kB 00:04
|
||||||
|
+Meter text test | 4.4 kB 00:04
|
||||||
|
diff --git a/tests/data/meter/meter5.txt b/tests/data/meter/meter5.txt
|
||||||
|
index 1d232a5de..7142a9718 100644
|
||||||
|
--- a/tests/data/meter/meter5.txt
|
||||||
|
+++ b/tests/data/meter/meter5.txt
|
||||||
|
@@ -9,4 +9,4 @@ Meter text test 1000% [================] 413 B/s | 2.0 kB --:-- ETA
|
||||||
|
|
||||||
|
Meter text test 2000% [================] 731 B/s | 3.9 kB --:-- ETA
|
||||||
|
|
||||||
|
-Meter text test | 3.9 kB 00:04 !!!
|
||||||
|
+Meter text test | 4.4 kB 00:04 !!!
|
||||||
|
diff --git a/tests/data/meter/meter6.txt b/tests/data/meter/meter6.txt
|
||||||
|
index 07d99bfd8..dd5d3d47b 100644
|
||||||
|
--- a/tests/data/meter/meter6.txt
|
||||||
|
+++ b/tests/data/meter/meter6.txt
|
||||||
|
@@ -9,4 +9,4 @@ Meter text test 100% [================] 413 B/s | 2.0 kB --:-- ETA
|
||||||
|
|
||||||
|
Meter text test 100% [================] 731 B/s | 3.9 kB --:-- ETA
|
||||||
|
|
||||||
|
-Meter text test | 3.9 kB 00:04
|
||||||
|
+Meter text test | 4.4 kB 00:04
|
||||||
|
diff --git a/tests/test_misc.py b/tests/test_misc.py
|
||||||
|
index aa610f4df..20f5a626b 100644
|
||||||
|
--- a/tests/test_misc.py
|
||||||
|
+++ b/tests/test_misc.py
|
||||||
|
@@ -178,7 +178,9 @@ def test_misc_meter():
|
||||||
|
m.update(2000)
|
||||||
|
with unittest.mock.patch("time.time", return_value=5.0):
|
||||||
|
m.update(4000)
|
||||||
|
- with unittest.mock.patch("time.time", return_value=6.0):
|
||||||
|
+ with unittest.mock.patch("time.time", return_value=5.1):
|
||||||
|
+ m.update(4500)
|
||||||
|
+ with unittest.mock.patch("time.time", return_value=5.5):
|
||||||
|
m.end()
|
||||||
|
|
||||||
|
# Basic output testing
|
||||||
|
diff --git a/virtinst/_progresspriv.py b/virtinst/_progresspriv.py
|
||||||
|
index 5a31a18cc..a035c9c43 100644
|
||||||
|
--- a/virtinst/_progresspriv.py
|
||||||
|
+++ b/virtinst/_progresspriv.py
|
||||||
|
@@ -112,10 +112,10 @@ class BaseMeter:
|
||||||
|
assert type(amount_read) is int
|
||||||
|
|
||||||
|
now = time.time()
|
||||||
|
+ self.last_amount_read = amount_read
|
||||||
|
+ self.re.update(amount_read, now)
|
||||||
|
if (not self.last_update_time or
|
||||||
|
(now >= self.last_update_time + self.update_period)):
|
||||||
|
- self.re.update(amount_read, now)
|
||||||
|
- self.last_amount_read = amount_read
|
||||||
|
self.last_update_time = now
|
||||||
|
self._do_update(amount_read)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From f44c6ec970413843214f52d5523ee8cf277b0150 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
Date: Mon, 12 Dec 2022 19:38:22 +0100
|
||||||
|
Subject: [PATCH] virt-install: Document Secure Boot setups
|
||||||
|
|
||||||
|
Provide ready to use recipes for explicitly enabling and
|
||||||
|
explicitly disabling Secure Boot, as well as a pointer to
|
||||||
|
the more extensive information found on the libvirt website.
|
||||||
|
|
||||||
|
Setting loader_secure=yes is only one part of a proper Secure
|
||||||
|
Boot setup, so stop documenting it in the section about manual
|
||||||
|
firmware selection to avoid confusion.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=2112154
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=2149971
|
||||||
|
|
||||||
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
(cherry picked from commit 33ff193ee9fcfdb74f95d946a1b93239a1a12a61)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2112154
|
||||||
|
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
man/virt-install.rst | 17 +++++++++++++++--
|
||||||
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/man/virt-install.rst b/man/virt-install.rst
|
||||||
|
index 684f22655..a0df73280 100644
|
||||||
|
--- a/man/virt-install.rst
|
||||||
|
+++ b/man/virt-install.rst
|
||||||
|
@@ -957,13 +957,26 @@ Some examples:
|
||||||
|
via domcapabilities XML, so this will likely only work if using properly
|
||||||
|
configured distro packages. This is the recommended UEFI setup.
|
||||||
|
|
||||||
|
+``--boot uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=yes,firmware.feature1.name=enrolled-keys,firmware.feature1.enabled=yes``
|
||||||
|
+ Configure the VM to boot from UEFI with Secure Boot support enabled.
|
||||||
|
+ Only signed operating systems will be able to boot with this configuration.
|
||||||
|
+
|
||||||
|
+``--boot uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no``
|
||||||
|
+ Configure the VM to boot from UEFI with Secure Boot support disabled.
|
||||||
|
+ This configuration allows both signed and unsigned operating systems to
|
||||||
|
+ run.
|
||||||
|
+
|
||||||
|
+ Additional information about the ``secure-boot`` and
|
||||||
|
+ ``enrolled-keys`` firmware features and how they can be used to
|
||||||
|
+ influence firmware selection is available at
|
||||||
|
+ https://libvirt.org/kbase/secureboot.html
|
||||||
|
+
|
||||||
|
``--boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no``
|
||||||
|
Specify that the virtual machine use the custom OVMF binary as boot firmware,
|
||||||
|
mapped as a virtual flash chip. In addition, request that libvirt instantiate
|
||||||
|
the VM-specific UEFI varstore from the custom "/.../OVMF_VARS.fd" varstore
|
||||||
|
template. This setup is not recommended, and should only be used if
|
||||||
|
- --boot uefi doesn't know about your UEFI binaries. If your UEFI firmware
|
||||||
|
- supports Secure boot feature you can enable it via loader_secure.
|
||||||
|
+ --boot uefi doesn't know about your UEFI binaries.
|
||||||
|
|
||||||
|
Use --boot=? to see a list of all available sub options.
|
||||||
|
Complete details at https://libvirt.org/formatdomain.html#elementsOS
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
42
SOURCES/virt-manager-virt-install-Recommend-boot-uefi.patch
Normal file
42
SOURCES/virt-manager-virt-install-Recommend-boot-uefi.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 19b683f075d11b920552990d16b9a7a82eed12e3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
Date: Mon, 12 Dec 2022 19:32:32 +0100
|
||||||
|
Subject: [PATCH] virt-install: Recommend '--boot uefi'
|
||||||
|
|
||||||
|
Firmware autoselection is the way to go in most cases, so
|
||||||
|
recommend that instead of telling users that they should provide
|
||||||
|
all information manually.
|
||||||
|
|
||||||
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||||
|
(cherry picked from commit f2b5aaf458764ec7ecf105038e5f2f7cc26b6c17)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2112154
|
||||||
|
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
man/virt-install.rst | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/man/virt-install.rst b/man/virt-install.rst
|
||||||
|
index 3a6e8dcd2..684f22655 100644
|
||||||
|
--- a/man/virt-install.rst
|
||||||
|
+++ b/man/virt-install.rst
|
||||||
|
@@ -955,13 +955,13 @@ Some examples:
|
||||||
|
Configure the VM to boot from UEFI. In order for virt-install to know the
|
||||||
|
correct UEFI parameters, libvirt needs to be advertising known UEFI binaries
|
||||||
|
via domcapabilities XML, so this will likely only work if using properly
|
||||||
|
- configured distro packages.
|
||||||
|
+ configured distro packages. This is the recommended UEFI setup.
|
||||||
|
|
||||||
|
``--boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no``
|
||||||
|
Specify that the virtual machine use the custom OVMF binary as boot firmware,
|
||||||
|
mapped as a virtual flash chip. In addition, request that libvirt instantiate
|
||||||
|
the VM-specific UEFI varstore from the custom "/.../OVMF_VARS.fd" varstore
|
||||||
|
- template. This is the recommended UEFI setup, and should be used if
|
||||||
|
+ template. This setup is not recommended, and should only be used if
|
||||||
|
--boot uefi doesn't know about your UEFI binaries. If your UEFI firmware
|
||||||
|
supports Secure boot feature you can enable it via loader_secure.
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From 6ec78c1b8a935bd5fe0896dc323bfdf51cc67585 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
Date: Wed, 18 May 2022 17:03:29 -0500
|
|
||||||
Subject: [PATCH] virt-install: add support for qemu-vdagent channel
|
|
||||||
|
|
||||||
This allows support for host/guest clipboard sharing when using vnc
|
|
||||||
guests (and possibly other graphics types in the future). This channel
|
|
||||||
is similar to the spicevmc channel, but it contains a couple additional
|
|
||||||
options to enable/disable clipboard sharing and specify the mouse mode.
|
|
||||||
In the case of spice, these settings are specified on the 'graphics'
|
|
||||||
element, but for qemu-vdagent, they are specified on the channel. For
|
|
||||||
example:
|
|
||||||
|
|
||||||
--channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client
|
|
||||||
|
|
||||||
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
(cherry picked from commit 44355e5ed0d0791675e8113732dde37664d5aa91)
|
|
||||||
|
|
||||||
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2060724
|
|
||||||
|
|
||||||
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
---
|
|
||||||
man/virt-install.rst | 9 +++++++++
|
|
||||||
tests/data/cli/compare/virt-install-many-devices.xml | 7 +++++++
|
|
||||||
tests/test_cli.py | 5 +++--
|
|
||||||
virtinst/cli.py | 2 ++
|
|
||||||
virtinst/devices/char.py | 8 +++++++-
|
|
||||||
5 files changed, 28 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/virt-install.rst b/man/virt-install.rst
|
|
||||||
index c1d1c1aa1..3a6e8dcd2 100644
|
|
||||||
--- a/man/virt-install.rst
|
|
||||||
+++ b/man/virt-install.rst
|
|
||||||
@@ -1761,6 +1761,15 @@ Some of the types of character device redirection are:
|
|
||||||
and can be any string, such as the default com.redhat.spice.0 that
|
|
||||||
specifies how the guest will see the channel.
|
|
||||||
|
|
||||||
+``--channel qemu-vdagent,target.type=virtio[,target.name=NAME]``
|
|
||||||
+ Communication channel for QEMU vd agent, using virtio serial (requires
|
|
||||||
+ 2.6.34 or later host and guest). This allows copy/paste functionality with
|
|
||||||
+ VNC guests. Note that the guest clipboard integration is implemented via
|
|
||||||
+ spice-vdagent, which must be running even when the guest does not use spice
|
|
||||||
+ graphics. NAME is optional metadata that specifies how the guest will see
|
|
||||||
+ the channel, and should be left as the default com.redhat.spice.0 unless you
|
|
||||||
+ know what you are doing.
|
|
||||||
+
|
|
||||||
|
|
||||||
Use --channel=? to see a list of all available sub options.
|
|
||||||
Complete details at https://libvirt.org/formatdomain.html#elementsCharChannel
|
|
||||||
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
|
|
||||||
index 4c0024225..be82032fe 100644
|
|
||||||
--- a/tests/data/cli/compare/virt-install-many-devices.xml
|
|
||||||
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
|
|
||||||
@@ -647,6 +647,13 @@
|
|
||||||
<channel type="spicevmc">
|
|
||||||
<target type="virtio" name="com.redhat.spice.0"/>
|
|
||||||
</channel>
|
|
||||||
+ <channel type="qemu-vdagent">
|
|
||||||
+ <source>
|
|
||||||
+ <clipboard copypaste="yes"/>
|
|
||||||
+ <mouse mode="client"/>
|
|
||||||
+ </source>
|
|
||||||
+ <target type="virtio" name="com.redhat.spice.0"/>
|
|
||||||
+ </channel>
|
|
||||||
<input type="keyboard" bus="usb"/>
|
|
||||||
<input type="tablet" bus="usb"/>
|
|
||||||
<input type="mouse" bus="ps2"/>
|
|
||||||
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
|
||||||
index 8b78a1a78..22749d43a 100644
|
|
||||||
--- a/tests/test_cli.py
|
|
||||||
+++ b/tests/test_cli.py
|
|
||||||
@@ -669,6 +669,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
|
|
||||||
--channel pty,target_type=virtio,name=org.linux-kvm.port1
|
|
||||||
--channel pty,target.type=virtio,target.name=org.linux-kvm.port2
|
|
||||||
--channel spicevmc
|
|
||||||
+--channel qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client
|
|
||||||
|
|
||||||
|
|
||||||
--console pty,target_type=virtio
|
|
||||||
@@ -734,7 +735,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
|
|
||||||
|
|
||||||
|
|
||||||
--rng /dev/random
|
|
||||||
---rng device=/dev/urandom,backend.protocol.type=,backend.log.file=,backend.log.append=
|
|
||||||
+--rng device=/dev/urandom,backend.protocol.type=,backend.log.file=,backend.log.append=,backend.source.clipboard.copypaste=,backend.source.mouse.mode=
|
|
||||||
--rng type=egd,backend.type=nmdm,backend.source.master=/dev/foo1,backend.source.slave=/dev/foo2
|
|
||||||
--rng egd,backend_host=127.0.0.1,backend_service=8000,backend_type=udp,backend_mode=bind,backend_connect_host=foo,backend_connect_service=708,rate.bytes=1234,rate.period=1000,model=virtio
|
|
||||||
|
|
||||||
@@ -786,7 +787,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
|
|
||||||
--xml xpath.delete=./deleteme/deleteme2
|
|
||||||
|
|
||||||
|
|
||||||
-""", "many-devices", predefine_check="7.4.0")
|
|
||||||
+""", "many-devices", predefine_check="8.4.0")
|
|
||||||
|
|
||||||
|
|
||||||
# Specific XML test cases #1
|
|
||||||
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
|
||||||
index 52be9f298..c869c323a 100644
|
|
||||||
--- a/virtinst/cli.py
|
|
||||||
+++ b/virtinst/cli.py
|
|
||||||
@@ -3396,6 +3396,8 @@ def _add_char_source_args(cls, prefix=""):
|
|
||||||
_add_arg("protocol.type", "source.protocol")
|
|
||||||
_add_arg("log.file", "source.log_file")
|
|
||||||
_add_arg("log.append", "source.log_append", is_onoff=True)
|
|
||||||
+ _add_arg("source.clipboard.copypaste", "source.clipboard_copypaste", is_onoff=True)
|
|
||||||
+ _add_arg("source.mouse.mode", "source.mouse_mode")
|
|
||||||
|
|
||||||
|
|
||||||
##################
|
|
||||||
diff --git a/virtinst/devices/char.py b/virtinst/devices/char.py
|
|
||||||
index 9547c649e..01fc634b1 100644
|
|
||||||
--- a/virtinst/devices/char.py
|
|
||||||
+++ b/virtinst/devices/char.py
|
|
||||||
@@ -45,6 +45,10 @@ class CharSource(XMLBuilder):
|
|
||||||
slave = XMLProperty("./@slave")
|
|
||||||
mode = XMLProperty("./@mode")
|
|
||||||
|
|
||||||
+ # for qemu-vdagent channel
|
|
||||||
+ clipboard_copypaste = XMLProperty("./clipboard/@copypaste", is_yesno=True)
|
|
||||||
+ mouse_mode = XMLProperty("./mouse/@mode")
|
|
||||||
+
|
|
||||||
# It's weird to track these properties here, since the XML is set on
|
|
||||||
# the parent, but this is how libvirt does it internally, which means
|
|
||||||
# everything that shares a charsource has these values too.
|
|
||||||
@@ -80,6 +84,7 @@ class _DeviceChar(Device):
|
|
||||||
TYPE_SPICEVMC = "spicevmc"
|
|
||||||
TYPE_SPICEPORT = "spiceport"
|
|
||||||
TYPE_NMDM = "nmdm"
|
|
||||||
+ TYPE_QEMUVDAGENT = "qemu-vdagent"
|
|
||||||
|
|
||||||
CHANNEL_NAME_SPICE = "com.redhat.spice.0"
|
|
||||||
CHANNEL_NAME_QEMUGA = "org.qemu.guest_agent.0"
|
|
||||||
@@ -117,7 +122,8 @@ class _DeviceChar(Device):
|
|
||||||
self.source.mode = "bind"
|
|
||||||
if not self.target_type and self.DEVICE_TYPE == "channel":
|
|
||||||
self.target_type = "virtio"
|
|
||||||
- if not self.target_name and self.type == self.TYPE_SPICEVMC:
|
|
||||||
+ if not self.target_name and (self.type == self.TYPE_SPICEVMC or
|
|
||||||
+ self.type == self.TYPE_QEMUVDAGENT):
|
|
||||||
self.target_name = self.CHANNEL_NAME_SPICE
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
2.35.3
|
|
||||||
|
|
@ -1,231 +0,0 @@
|
|||||||
From e4e7210b3bd669bfeb8015f66163e7e49d710d1d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
Date: Wed, 18 May 2022 17:03:30 -0500
|
|
||||||
Subject: [PATCH] virt-manager: add support for qemu-vdagent channel
|
|
||||||
|
|
||||||
This provides the UI support for the qemu-vdagent channel which allows
|
|
||||||
clipboard sharing with VNC graphics (see previous commit for more
|
|
||||||
information).
|
|
||||||
|
|
||||||
The channel name in the device list was changed slightly in order to
|
|
||||||
avoid confusion. Due to the fact that both the spice-vdagent and the
|
|
||||||
qemu-vdagent specify the same virtio name (com.redhat.spice.0), both of
|
|
||||||
these channels were showing up in the device list as "Channel spice",
|
|
||||||
which is a bit confusing.
|
|
||||||
|
|
||||||
In order to disambiguate these, channels now show up in the device list
|
|
||||||
as "Channel {type} ({name})" instead of "Channel {name}". So for
|
|
||||||
example, a qemu-vdagent channel would show up as:
|
|
||||||
Channel Qemu vdagent (spice)
|
|
||||||
Whereas a spice-vdagent channel would show up as:
|
|
||||||
Channel Spice agent (spice)
|
|
||||||
|
|
||||||
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
(cherry picked from commit caa99a6001be0c86a1dd0eb5fc0ce142ab929a31)
|
|
||||||
|
|
||||||
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2060724
|
|
||||||
|
|
||||||
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
||||||
---
|
|
||||||
ui/addhardware.ui | 28 +++++++++++++++++++++++++++-
|
|
||||||
ui/details.ui | 27 ++++++++++++++++++++++++++-
|
|
||||||
virtManager/addhardware.py | 10 +++++++++-
|
|
||||||
virtManager/details/details.py | 7 +++++--
|
|
||||||
4 files changed, 67 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ui/addhardware.ui b/ui/addhardware.ui
|
|
||||||
index fa88127b8..f212481a3 100644
|
|
||||||
--- a/ui/addhardware.ui
|
|
||||||
+++ b/ui/addhardware.ui
|
|
||||||
@@ -725,7 +725,7 @@
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
- <!-- n-columns=2 n-rows=6 -->
|
|
||||||
+ <!-- n-columns=2 n-rows=7 -->
|
|
||||||
<object class="GtkGrid" id="char-table">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">False</property>
|
|
||||||
@@ -901,6 +901,32 @@
|
|
||||||
<property name="top-attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="char-vdagent-clipboard-label">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can-focus">False</property>
|
|
||||||
+ <property name="label" translatable="yes">_Share Clipboard:</property>
|
|
||||||
+ <property name="use-underline">True</property>
|
|
||||||
+ <property name="mnemonic-widget">char-vdagent-clipboard</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="left-attach">0</property>
|
|
||||||
+ <property name="top-attach">6</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkCheckButton" id="char-vdagent-clipboard">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can-focus">True</property>
|
|
||||||
+ <property name="receives-default">False</property>
|
|
||||||
+ <property name="halign">start</property>
|
|
||||||
+ <property name="draw-indicator">True</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="left-attach">1</property>
|
|
||||||
+ <property name="top-attach">6</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
<child internal-child="accessible">
|
|
||||||
<object class="AtkObject" id="char-table-atkobject">
|
|
||||||
<property name="AtkObject::accessible-name">char-tab</property>
|
|
||||||
diff --git a/ui/details.ui b/ui/details.ui
|
|
||||||
index 10b308242..264f7cdd4 100644
|
|
||||||
--- a/ui/details.ui
|
|
||||||
+++ b/ui/details.ui
|
|
||||||
@@ -3506,7 +3506,7 @@
|
|
||||||
<property name="margin-start">12</property>
|
|
||||||
<property name="margin-top">3</property>
|
|
||||||
<child>
|
|
||||||
- <!-- n-columns=2 n-rows=7 -->
|
|
||||||
+ <!-- n-columns=2 n-rows=8 -->
|
|
||||||
<object class="GtkGrid" id="table37">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">False</property>
|
|
||||||
@@ -3601,6 +3601,19 @@
|
|
||||||
<property name="top-attach">6</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="char-clipboard-sharing">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can-focus">False</property>
|
|
||||||
+ <property name="halign">start</property>
|
|
||||||
+ <property name="label" translatable="yes">label507</property>
|
|
||||||
+ <property name="selectable">True</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="left-attach">1</property>
|
|
||||||
+ <property name="top-attach">7</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="char-source-host">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
@@ -3673,6 +3686,18 @@
|
|
||||||
<property name="top-attach">6</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="char-clipboard-sharing-label">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can-focus">False</property>
|
|
||||||
+ <property name="halign">end</property>
|
|
||||||
+ <property name="label" translatable="yes">Clipboard:</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="left-attach">0</property>
|
|
||||||
+ <property name="top-attach">7</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="char-source-path-label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
|
||||||
index 8c7fa0c72..0a8e33d30 100644
|
|
||||||
--- a/virtManager/addhardware.py
|
|
||||||
+++ b/virtManager/addhardware.py
|
|
||||||
@@ -308,6 +308,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
self.widget("char-path").set_text("")
|
|
||||||
self.widget("char-channel").set_text("")
|
|
||||||
self.widget("char-auto-socket").set_active(True)
|
|
||||||
+ self.widget("char-vdagent-clipboard").set_active(True)
|
|
||||||
|
|
||||||
|
|
||||||
# RNG params
|
|
||||||
@@ -399,7 +400,8 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
DeviceSerial.TYPE_UNIX]
|
|
||||||
if char_class.XML_NAME == "channel":
|
|
||||||
ret = [DeviceSerial.TYPE_SPICEVMC,
|
|
||||||
- DeviceSerial.TYPE_SPICEPORT] + ret
|
|
||||||
+ DeviceSerial.TYPE_SPICEPORT,
|
|
||||||
+ DeviceSerial.TYPE_QEMUVDAGENT] + ret
|
|
||||||
return ret
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@@ -425,6 +427,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
DeviceSerial.TYPE_UNIX: _("UNIX socket"),
|
|
||||||
DeviceSerial.TYPE_SPICEVMC: _("Spice agent"),
|
|
||||||
DeviceSerial.TYPE_SPICEPORT: _("Spice port"),
|
|
||||||
+ DeviceSerial.TYPE_QEMUVDAGENT: _("QEMU vdagent"),
|
|
||||||
}
|
|
||||||
return labels.get(val, val)
|
|
||||||
|
|
||||||
@@ -1114,11 +1117,14 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
supports_path = [dev.TYPE_FILE, dev.TYPE_UNIX,
|
|
||||||
dev.TYPE_DEV, dev.TYPE_PIPE]
|
|
||||||
supports_channel = [dev.TYPE_SPICEPORT]
|
|
||||||
+ supports_clipboard = [dev.TYPE_QEMUVDAGENT]
|
|
||||||
|
|
||||||
uiutil.set_grid_row_visible(self.widget("char-path-label"),
|
|
||||||
devtype in supports_path)
|
|
||||||
uiutil.set_grid_row_visible(self.widget("char-channel-label"),
|
|
||||||
devtype in supports_channel)
|
|
||||||
+ uiutil.set_grid_row_visible(self.widget("char-vdagent-clipboard-label"),
|
|
||||||
+ devtype in supports_clipboard)
|
|
||||||
|
|
||||||
uiutil.set_grid_row_visible(
|
|
||||||
self.widget("char-target-name-label"), ischan)
|
|
||||||
@@ -1472,6 +1478,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
source_channel = self.widget("char-channel").get_text()
|
|
||||||
target_name = self.widget("char-target-name").get_child().get_text()
|
|
||||||
target_type = uiutil.get_list_selection(typebox)
|
|
||||||
+ clipboard = self.widget("char-vdagent-clipboard").get_active()
|
|
||||||
|
|
||||||
if not self.widget("char-path").get_visible():
|
|
||||||
source_path = None
|
|
||||||
@@ -1486,6 +1493,7 @@ class vmmAddHardware(vmmGObjectUI):
|
|
||||||
dev.type = devtype
|
|
||||||
dev.source.path = source_path
|
|
||||||
dev.source.channel = source_channel
|
|
||||||
+ dev.source.clipboard_copypaste = clipboard
|
|
||||||
dev.target_name = target_name
|
|
||||||
dev.target_type = target_type
|
|
||||||
return dev
|
|
||||||
diff --git a/virtManager/details/details.py b/virtManager/details/details.py
|
|
||||||
index 24810f0ff..ddc43b767 100644
|
|
||||||
--- a/virtManager/details/details.py
|
|
||||||
+++ b/virtManager/details/details.py
|
|
||||||
@@ -207,10 +207,10 @@ def _label_for_device(dev, disk_bus_index):
|
|
||||||
return _("Console %(num)d") % {"num": port + 1}
|
|
||||||
|
|
||||||
if devtype == "channel":
|
|
||||||
+ pretty_type = vmmAddHardware.char_pretty_type(dev.type)
|
|
||||||
name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
|
|
||||||
if name:
|
|
||||||
- return _("Channel %(name)s") % {"name": name}
|
|
||||||
- pretty_type = vmmAddHardware.char_pretty_type(dev.type)
|
|
||||||
+ return _("Channel %(type)s (%(name)s)") % {"type": pretty_type, "name": name}
|
|
||||||
return _("Channel %(type)s") % {"type": pretty_type}
|
|
||||||
|
|
||||||
if devtype == "graphics":
|
|
||||||
@@ -2098,6 +2098,7 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
primary = self.vm.serial_is_console_dup(chardev)
|
|
||||||
show_target_type = not (char_type in ["serial", "parallel"])
|
|
||||||
is_qemuga = chardev.target_name == chardev.CHANNEL_NAME_QEMUGA
|
|
||||||
+ show_clipboard = chardev.type == chardev.TYPE_QEMUVDAGENT
|
|
||||||
|
|
||||||
if char_type == "serial":
|
|
||||||
typelabel = _("Serial Device")
|
|
||||||
@@ -2152,6 +2153,8 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
# notifiations about connection state. For spice this UI field
|
|
||||||
# can get out of date
|
|
||||||
show_ui("char-target-state", chardev.target_state, doshow=is_qemuga)
|
|
||||||
+ clipboard = _("On") if chardev.source.clipboard_copypaste else _("Off")
|
|
||||||
+ show_ui("char-clipboard-sharing", clipboard, doshow=show_clipboard)
|
|
||||||
|
|
||||||
def _refresh_hostdev_page(self, hostdev):
|
|
||||||
rom_bar = hostdev.rom_bar
|
|
||||||
--
|
|
||||||
2.35.3
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From f68b3667591ab5f9edb9a40f9a7c0c798c923bc4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
|
||||||
|
Date: Wed, 9 Nov 2022 18:33:56 +0900
|
||||||
|
Subject: [PATCH] virtinstall: Fix the allocating disk size printed by the
|
||||||
|
progress bar
|
||||||
|
|
||||||
|
When a sparse file is created during a disk allocation,
|
||||||
|
virt-install prints not the created disk size but a sparse file size.
|
||||||
|
|
||||||
|
Therefore, we fix to print the created disk size during disk allocation
|
||||||
|
instead of the size of the sparse file by updating the meter with the
|
||||||
|
self.capacity.
|
||||||
|
|
||||||
|
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
|
||||||
|
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
|
||||||
|
(cherry picked from commit 39c7a443146433766e4e71e48ab59145c74924b3)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
|
||||||
|
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
virtinst/storage.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/virtinst/storage.py b/virtinst/storage.py
|
||||||
|
index 509f5cb06..617b05e0d 100644
|
||||||
|
--- a/virtinst/storage.py
|
||||||
|
+++ b/virtinst/storage.py
|
||||||
|
@@ -697,6 +697,7 @@ class StorageVolume(_StorageObject):
|
||||||
|
log.debug("Using vol create flags=%s", createflags)
|
||||||
|
vol = self.pool.createXML(xml, createflags)
|
||||||
|
|
||||||
|
+ meter.update(self.capacity)
|
||||||
|
meter.end()
|
||||||
|
log.debug("Storage volume '%s' install complete.", self.name)
|
||||||
|
return vol
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
From 91cd135f66b517cf247d031966c2f33343c23aa3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
|
||||||
|
Date: Wed, 9 Nov 2022 18:33:57 +0900
|
||||||
|
Subject: [PATCH] virtinstall: Hide total_size in the progress bar if it
|
||||||
|
doesn't need
|
||||||
|
|
||||||
|
virt-install prints the total_size value to the progress bar even if it
|
||||||
|
is meaningless.
|
||||||
|
This value can be confusing to user, so for execute prosess that doesn't
|
||||||
|
copy files (total_size = 0B), we hide the total_size value.
|
||||||
|
For example, 'Creating domain...' doesn't need to print the total_size
|
||||||
|
value.
|
||||||
|
|
||||||
|
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
|
||||||
|
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
|
||||||
|
(cherry picked from commit 6ec00474a659158f20248d6af3771d1a12ddac7b)
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
|
||||||
|
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
tests/data/meter/meter-zero.txt | 4 ++++
|
||||||
|
tests/test_misc.py | 14 ++++++++++++++
|
||||||
|
virtinst/_progresspriv.py | 8 ++++++--
|
||||||
|
3 files changed, 24 insertions(+), 2 deletions(-)
|
||||||
|
create mode 100644 tests/data/meter/meter-zero.txt
|
||||||
|
|
||||||
|
diff --git a/tests/data/meter/meter-zero.txt b/tests/data/meter/meter-zero.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..fc81f21fd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/data/meter/meter-zero.txt
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+
|
||||||
|
+Meter text test 100% [================] 0 B/s | 0 B --:-- ETA
|
||||||
|
+
|
||||||
|
+Meter text test | 00:02
|
||||||
|
diff --git a/tests/test_misc.py b/tests/test_misc.py
|
||||||
|
index 20f5a626b..2cabc3382 100644
|
||||||
|
--- a/tests/test_misc.py
|
||||||
|
+++ b/tests/test_misc.py
|
||||||
|
@@ -224,6 +224,20 @@ def test_misc_meter():
|
||||||
|
out = meter.output.getvalue().replace("\r", "\n")
|
||||||
|
utils.diff_compare(out, os.path.join(utils.DATADIR, "meter", "meter6.txt"))
|
||||||
|
|
||||||
|
+ def _test_meter_zero(m, startval=0, text="Meter text test"):
|
||||||
|
+ with unittest.mock.patch("time.time", return_value=1.0):
|
||||||
|
+ m.start(text, startval)
|
||||||
|
+ with unittest.mock.patch("time.time", return_value=3.0):
|
||||||
|
+ m.update(0)
|
||||||
|
+ with unittest.mock.patch("time.time", return_value=3.1):
|
||||||
|
+ m.end()
|
||||||
|
+
|
||||||
|
+ # meter with size 0 and startval size 0
|
||||||
|
+ meter = _progresspriv.TextMeter(output=io.StringIO())
|
||||||
|
+ _test_meter_zero(meter, 0)
|
||||||
|
+ out = meter.output.getvalue().replace("\r", "\n")
|
||||||
|
+ utils.diff_compare(out, os.path.join(utils.DATADIR, "meter", "meter-zero.txt"))
|
||||||
|
+
|
||||||
|
# BaseMeter coverage
|
||||||
|
meter = _progresspriv.BaseMeter()
|
||||||
|
_test_meter_values(meter)
|
||||||
|
diff --git a/virtinst/_progresspriv.py b/virtinst/_progresspriv.py
|
||||||
|
index a035c9c43..207c64796 100644
|
||||||
|
--- a/virtinst/_progresspriv.py
|
||||||
|
+++ b/virtinst/_progresspriv.py
|
||||||
|
@@ -247,11 +247,15 @@ class TextMeter(BaseMeter):
|
||||||
|
tl = TerminalLine(8)
|
||||||
|
# For big screens, make it more readable.
|
||||||
|
use_hours = bool(tl.llen > 80)
|
||||||
|
- ui_size = tl.add(' | %5sB' % total_size)
|
||||||
|
ui_time = tl.add(' %s' % format_time(self.re.elapsed_time(),
|
||||||
|
use_hours))
|
||||||
|
ui_end, not_done = _term_add_end(tl, self.size, amount_read)
|
||||||
|
- dummy = not_done
|
||||||
|
+ if not not_done and amount_read == 0:
|
||||||
|
+ # Doesn't need to print total_size
|
||||||
|
+ ui_size = tl.add(' | %5s ' % ' ')
|
||||||
|
+ else:
|
||||||
|
+ ui_size = tl.add(' | %5sB' % total_size)
|
||||||
|
+
|
||||||
|
out = '\r%-*.*s%s%s%s\n' % (tl.rest(), tl.rest(), self.text,
|
||||||
|
ui_size, ui_time, ui_end)
|
||||||
|
self.output.write(out)
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From afb42b86ad8bd72930859968c92c084134e6d114 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Sat, 20 Aug 2022 09:54:01 -0400
|
||||||
|
Subject: [PATCH] virtinstall: fix regression with --boot and no install method
|
||||||
|
|
||||||
|
Anything passed to --boot should imply --install no_install=yes
|
||||||
|
in the absence of other --install options. This is historically
|
||||||
|
what we've done but we regressed in 4.1.0
|
||||||
|
|
||||||
|
Resolves: https://github.com/virt-manager/virt-manager/issues/426
|
||||||
|
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2144885
|
||||||
|
|
||||||
|
(cherry picked from commit e94786c066696781a821f5a4bcef3c377e4bc5e5)
|
||||||
|
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||||
|
---
|
||||||
|
tests/test_cli.py | 1 +
|
||||||
|
virtinst/virtinstall.py | 3 ++-
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||||
|
index 774db098f..ca8d2340a 100644
|
||||||
|
--- a/tests/test_cli.py
|
||||||
|
+++ b/tests/test_cli.py
|
||||||
|
@@ -966,6 +966,7 @@ c.add_valid("--os-variant generic --pxe --ram 16", grep="Requested memory 16 MiB
|
||||||
|
c.add_valid("--os-variant winxp --ram 32 --cdrom %(EXISTIMG1)s", grep="32 MiB is less than the recommended 64 MiB") # Windows. Catch memory warning
|
||||||
|
c.add_valid("--osinfo generic --pxe --autostart") # --autostart flag
|
||||||
|
c.add_valid("--cdrom %(EXISTIMG2)s --os-variant win2k3 --print-step 2") # HVM windows install, print 3rd stage XML
|
||||||
|
+c.add_valid("--memory 512 --osinfo generic --boot cdrom") # --boot XXX should imply --install no_install
|
||||||
|
c.add_compare("--location location=%(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", "initrd-inject") # initrd-inject
|
||||||
|
c.add_compare("--cdrom http://example.com/path/to/some.iso --os-variant detect=yes,require=no", "cdrom-url")
|
||||||
|
c.add_compare("--pxe --print-step all --os-variant none", "simple-pxe") # Diskless PXE install
|
||||||
|
diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py
|
||||||
|
index 6d7f56b8d..20b901813 100644
|
||||||
|
--- a/virtinst/virtinstall.py
|
||||||
|
+++ b/virtinst/virtinstall.py
|
||||||
|
@@ -431,7 +431,7 @@ def build_installer(options, guest, installdata):
|
||||||
|
pass
|
||||||
|
elif (options.import_install or
|
||||||
|
options.xmlonly or
|
||||||
|
- options.boot or
|
||||||
|
+ options.boot_was_set or
|
||||||
|
options.cloud_init or
|
||||||
|
options.unattended):
|
||||||
|
no_install = True
|
||||||
|
@@ -641,6 +641,7 @@ def _build_options_guest(conn, options):
|
||||||
|
def build_guest_instance(conn, options):
|
||||||
|
installdata = cli.parse_install(options.install)
|
||||||
|
osdata = cli.parse_os_variant(options.os_variant or installdata.os)
|
||||||
|
+ options.boot_was_set = bool(options.boot)
|
||||||
|
|
||||||
|
if options.reinstall:
|
||||||
|
dummy1, guest, dummy2 = cli.get_domain_and_guest(conn, options.reinstall)
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -7,8 +7,8 @@
|
|||||||
# End local config
|
# End local config
|
||||||
|
|
||||||
Name: virt-manager
|
Name: virt-manager
|
||||||
Version: 4.0.0
|
Version: 4.1.0
|
||||||
Release: 1%{?dist}%{?extra_release}
|
Release: 4%{?dist}%{?extra_release}
|
||||||
%global verrel %{version}-%{release}
|
%global verrel %{version}-%{release}
|
||||||
|
|
||||||
Summary: Desktop tool for managing virtual machines via libvirt
|
Summary: Desktop tool for managing virtual machines via libvirt
|
||||||
@ -18,8 +18,13 @@ URL: https://virt-manager.org/
|
|||||||
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: symlinks
|
Source1: symlinks
|
||||||
|
|
||||||
Patch1: virt-manager-virt-install-add-support-for-qemu-vdagent-channel.patch
|
Patch1: virt-manager-cloner-Sync-uuid-and-sysinfo-system-uuid.patch
|
||||||
Patch2: virt-manager-virt-manager-add-support-for-qemu-vdagent-channel.patch
|
Patch2: virt-manager-virtinstall-fix-regression-with-boot-and-no-install-method.patch
|
||||||
|
Patch3: virt-manager-progress-Fix-showing-correct-final-total.patch
|
||||||
|
Patch4: virt-manager-virtinstall-Fix-the-allocating-disk-size-printed-by-the-progress-bar.patch
|
||||||
|
Patch5: virt-manager-virtinstall-Hide-total_size-in-the-progress-bar-if-it-doesn-t-need.patch
|
||||||
|
Patch6: virt-manager-virt-install-Recommend-boot-uefi.patch
|
||||||
|
Patch7: virt-manager-virt-install-Document-Secure-Boot-setups.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: virt-manager-common = %{verrel}
|
Requires: virt-manager-common = %{verrel}
|
||||||
@ -185,6 +190,22 @@ git config gc.auto 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 14 2023 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-4
|
||||||
|
- virt-install: Recommend '--boot uefi' (rhbz#2112154)
|
||||||
|
- virt-install: Document Secure Boot setups (rhbz#2112154)
|
||||||
|
|
||||||
|
* Wed Feb 1 2023 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-3
|
||||||
|
- progress: Fix showing correct final total (rhbz#2156247)
|
||||||
|
- virtinstall: Fix the allocating disk size printed by the progress bar (rhbz#2156247)
|
||||||
|
- virtinstall: Hide total_size in the progress bar if it doesn't need (rhbz#2156247)
|
||||||
|
|
||||||
|
* Mon Dec 5 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-2
|
||||||
|
- virtinstall: fix regression with --boot and no install method (rhbz#2144885)
|
||||||
|
|
||||||
|
* Tue Nov 15 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-1
|
||||||
|
- Rebased to virt-manager-4.1.0 (rhbz#2135791)
|
||||||
|
- cloner: Sync <uuid> and <sysinfo> system uuid (rhbz#2038040)
|
||||||
|
|
||||||
* Thu Jul 7 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.0.0-1
|
* Thu Jul 7 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.0.0-1
|
||||||
- Rebased to virt-manager-4.0.0 (rhbz#2100525)
|
- Rebased to virt-manager-4.0.0 (rhbz#2100525)
|
||||||
- virt-install: add support for qemu-vdagent channel (rhbz#2060724)
|
- virt-install: add support for qemu-vdagent channel (rhbz#2060724)
|
||||||
|
Loading…
Reference in New Issue
Block a user