diff --git a/0001-initrdinject-Use-full-option-versions-for-cpio.patch b/0001-initrdinject-Use-full-option-versions-for-cpio.patch deleted file mode 100644 index 3ce130c64087d82c1eef934970cf5337a4208a31..0000000000000000000000000000000000000000 --- a/0001-initrdinject-Use-full-option-versions-for-cpio.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Cole Robinson -Date: Tue, 2 Apr 2019 15:02:47 -0400 -Subject: [PATCH virt-manager] initrdinject: Use full option versions for cpio - -Makes it more self documenting IMO - -(cherry picked from commit 309840b9535b0e1965ed177b4558652faa256b36) ---- - virtinst/initrdinject.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py -index 78c18c28..9a09f20c 100644 ---- a/virtinst/initrdinject.py -+++ b/virtinst/initrdinject.py -@@ -30,7 +30,8 @@ def perform_initrd_injections(initrd, injections, scratchdir): - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=tempdir) -- cpio_proc = subprocess.Popen(['cpio', '-o', '--null', '-Hnewc', '--quiet'], -+ cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet', -+ '--format=newc'], - stdin=find_proc.stdout, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, diff --git a/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch b/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch new file mode 100644 index 0000000000000000000000000000000000000000..f747754973f5fe7e6e1e81739e777f3ff6c49785 --- /dev/null +++ b/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch @@ -0,0 +1,44 @@ +From 4d0e323227f18e58283c45be4d240b506faacb22 Mon Sep 17 00:00:00 2001 +Message-Id: <4d0e323227f18e58283c45be4d240b506faacb22.1610390294.git.crobinso@redhat.com> +From: Martin Pitt +Date: Tue, 24 Nov 2020 14:24:06 +0100 +Subject: [PATCH virt-manager] virtinst: Fix TOCTOU in domain enumeration + +Similar to commit 49a01b5482, _fetch_all_domains_raw() has a race +condition where a domain may disappear (from parallel libvirt +operations) in between enumerating and inspecting the objects. + +Ignore these missing domains instead of crashing. + +https://bugzilla.redhat.com/show_bug.cgi?id=1901081 +Signed-off-by: Cole Robinson +--- + virtinst/connection.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/virtinst/connection.py b/virtinst/connection.py +index fec273b7..06bc60ad 100644 +--- a/virtinst/connection.py ++++ b/virtinst/connection.py +@@ -182,8 +182,16 @@ class VirtinstConnection(object): + def _fetch_all_domains_raw(self): + dummy1, dummy2, ret = pollhelpers.fetch_vms( + self, {}, lambda obj, ignore: obj) +- return [Guest(weakref.proxy(self), parsexml=obj.XMLDesc(0)) +- for obj in ret] ++ domains = [] ++ for obj in ret: ++ # TOCTOU race: a domain may go away in between enumeration and inspection ++ try: ++ xml = obj.XMLDesc(0) ++ except libvirt.libvirtError as e: # pragma: no cover ++ log.debug("Fetching domain XML failed: %s", e) ++ continue ++ domains.append(Guest(weakref.proxy(self), parsexml=xml)) ++ return domains + + def _build_pool_raw(self, poolobj): + return StoragePool(weakref.proxy(self), +-- +2.29.2 + diff --git a/0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch b/0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch deleted file mode 100644 index 881c1deea9dc2d6d1853119a33141fa23bca4698..0000000000000000000000000000000000000000 --- a/0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Cole Robinson -Date: Wed, 3 Apr 2019 18:07:12 -0400 -Subject: [PATCH virt-manager] initrdinject: Force added files to be owned as - root (bz 1686464) - -systemd in fedora30 has some new security restriction about non-root -owned directories. Initrd inject would tickle this because the cpio -archive would cause the root dir in the initrd to be owned by the -uid that launched virt-install. - -Pass --owner=+0:+0 to cpio to force root ownership - -Suggested-by: James Szinger - -https://bugzilla.redhat.com/show_bug.cgi?id=1686464 -(cherry picked from commit c6b5f22fa61d87557b5fab23be080073d2f7906e) ---- - virtinst/initrdinject.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py -index 9a09f20c..4032f9ba 100644 ---- a/virtinst/initrdinject.py -+++ b/virtinst/initrdinject.py -@@ -31,7 +31,7 @@ def perform_initrd_injections(initrd, injections, scratchdir): - stderr=subprocess.PIPE, - cwd=tempdir) - cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet', -- '--format=newc'], -+ '--format=newc', '--owner=+0:+0'], - stdin=find_proc.stdout, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, diff --git a/0003-Improve-simplified-Chinese-translation.patch b/0003-Improve-simplified-Chinese-translation.patch deleted file mode 100644 index 3607d76b8214cf6b93db825376c6f044e633245e..0000000000000000000000000000000000000000 --- a/0003-Improve-simplified-Chinese-translation.patch +++ /dev/null @@ -1,1323 +0,0 @@ -From a8bf1d1db2307c06a41c1f947697b9f6f5ef804a Mon Sep 17 00:00:00 2001 -From: liuxingxiang -Date: Thu, 17 Feb 2022 17:34:37 +0800 -Subject: [PATCH 1/1] Improve simplified Chinese translation - ---- - po/zh_CN.po | 344 +++++++++++++++++++++++++----------------- - virtManager/create.py | 2 +- - 2 files changed, 209 insertions(+), 137 deletions(-) - -diff --git a/po/zh_CN.po b/po/zh_CN.po -index 4016792..4e7411b 100644 ---- a/po/zh_CN.po -+++ b/po/zh_CN.po -@@ -110,7 +110,7 @@ msgstr "请参考 man 手册以了解使用 --location 选项与 CDROM 介质的 - - #: ../virt-install:368 - msgid "--noreboot and --transient can not be specified together" --msgstr "" -+msgstr "--noreboot 和 --transient 不能同时指定" - - #: ../virt-install:372 - msgid "Only one install method can be used (%(methods)s)" -@@ -247,7 +247,7 @@ msgstr "试运行成功完成" - #: ../virt-install:736 - #, c-format - msgid "Unknown XML step request '%s', must be 1, 2, or all" --msgstr "" -+msgstr "未知的 XML 步骤请求 '%s',必须是1,2,,或者 all" - - #: ../virt-install:743 - msgid "Requested installation does not have XML step 2" -@@ -278,6 +278,8 @@ msgid "" - "Distro install URL, eg. https://host/path. See man page for specific distro " - "examples." - msgstr "" -+"发行版安装 URL,例如。 https://host/path。 有关特定发行版,请参见手册页 " -+"示例。" - - #: ../virt-install:780 - msgid "Boot from the network using the PXE protocol" -@@ -346,11 +348,11 @@ msgstr "主机启动时自动启动域。" - - #: ../virt-install:864 - msgid "Create a transient domain." --msgstr "" -+msgstr "创建一个临时域。" - - #: ../virt-install:866 - msgid "Force power off the domain when the console viewer is closed." --msgstr "" -+msgstr "关闭控制台查看器时强制关闭域。" - - #: ../virt-install:869 - msgid "Minutes to wait for install to complete." -@@ -437,7 +439,7 @@ msgstr "不克隆存储,通过 --file 参数指定的新磁盘镜像将保留 - - #: ../virt-clone:126 - msgid "New file to use as storage for nvram VARS" --msgstr "" -+msgstr "用于存储 nvram 变量的新文件" - - #: ../virt-clone:128 - msgid "Networking Configuration" -@@ -454,6 +456,8 @@ msgid "" - "Either --auto-clone or --file is required, use '--auto-clone or --file' and " - "try again." - msgstr "" -+"如果需要 --auto-clone 或者 --file,使用'--auto-clone 或者 --file' 并且" -+"再试一次。" - - #: ../virt-clone:203 - #, c-format -@@ -563,7 +567,7 @@ msgstr "'--edit %s' 的 --%s 无任何意义,只需使用 '--edit'" - - #: ../virt-xml:185 - msgid "--os-variant is not supported with --edit" --msgstr "" -+msgstr "--edit 不支持 --os-variant" - - #: ../virt-xml:192 - #, c-format -@@ -577,7 +581,7 @@ msgstr "不能同时使用 --remove-device 和 --%s 选项" - - #: ../virt-xml:206 - msgid "--os-variant is not supported with --remove-device" --msgstr "" -+msgstr "--remove-device 不支持 --os-variant" - - #: ../virt-xml:219 - #, c-format -@@ -586,7 +590,7 @@ msgstr "--%s 选项不支持 --build-xml" - - #: ../virt-xml:222 - msgid "--os-variant is not supported with --build-xml" --msgstr "" -+msgstr "--build-xml 不支持 --os-variant" - - #: ../virt-xml:253 - #, c-format -@@ -714,11 +718,11 @@ msgstr "不知如何为 --%s 应用 --update 选项" - - #: ../virt-xml:465 - msgid "The VM is not running, --update is inapplicable." --msgstr "" -+msgstr "VM 未运行,--update 不适用。" - - #: ../virt-xml:472 - msgid "Changes will take effect after the domain is fully powered off." --msgstr "" -+msgstr "更改将在域完全断电后生效。" - - #: ../virtManager/about.py:21 - #, python-format -@@ -843,7 +847,7 @@ msgstr "Panic 通知器" - - #: ../virtManager/addhardware.py:296 ../virtManager/addhardware.py:299 - msgid "Not supported for this hypervisor/libvirt/arch combination." --msgstr "" -+msgstr "对此 hypervisor/libvirt/arch 组合而言不支持" - - #: ../virtManager/addhardware.py:297 ../virtManager/details.py:272 - msgid "Virtio VSOCK" -@@ -976,7 +980,7 @@ msgstr "无法添加设备:%s" - #: ../virtManager/addhardware.py:1099 - #, python-format - msgid "Error validating device parameters: %s" --msgstr "" -+msgstr "验证设备参数时出错:%s" - - #: ../virtManager/addhardware.py:1105 - msgid "Creating device" -@@ -1001,7 +1005,7 @@ msgstr "必须选择一个网络源。" - - #: ../virtManager/addhardware.py:1318 - msgid "invalid listen type" --msgstr "" -+msgstr "无效的监听类型" - - #: ../virtManager/addhardware.py:1330 - msgid "Physical Device Required" -@@ -1134,11 +1138,11 @@ msgstr "没有写入权限" - - #: ../virtManager/clone.py:98 - msgid "SCSI device" --msgstr "" -+msgstr "SCSI 设备" - - #: ../virtManager/clone.py:102 - msgid "iSCSI share" --msgstr "" -+msgstr "ISCSI 共享" - - #: ../virtManager/clone.py:105 - msgid "Shareable" -@@ -1147,7 +1151,7 @@ msgstr "可共享" - #: ../virtManager/clone.py:123 - #, python-format - msgid "Error launching clone dialog: %s" --msgstr "" -+msgstr "启动克隆对话框时出错:%s" - - #: ../virtManager/clone.py:291 ../virtManager/clone.py:547 - msgid "Details..." -@@ -1296,16 +1300,18 @@ msgstr "需要认证" - msgid "" - "The remote host requires a version of netcat/nc which supports the -U option." - msgstr "" -+"远程主机需要支持 -U 选项的 netcat/nc 版本。" - - #: ../virtManager/connectauth.py:160 - msgid "" - "Configure SSH key access for the remote host, or install an SSH askpass " - "package locally." - msgstr "" -+"为远程主机配置 SSH 密钥访问,或在本地安装 SSH askpass 包。" - - #: ../virtManager/connectauth.py:164 - msgid "Verify that the 'libvirtd' daemon is running on the remote host." --msgstr "" -+msgstr "验证 'libvirtd' 守护进程是否正在远程主机上运行。" - - #: ../virtManager/connectauth.py:168 - msgid "" -@@ -1323,6 +1329,9 @@ msgid "" - "X or VNC, you may not be able to connect to libvirt as a regular user. Try " - "running as root." - msgstr "" -+"无法检测到本地会话:如果您通过 ssh -X " -+"或 VNC 运行 virt-manager,您可能无法以普通用户身份连接到 libvirt。" -+" 尝试以 root 身份运行。" - - #: ../virtManager/connectauth.py:180 - msgid "Verify that the 'libvirtd' daemon is running." -@@ -1331,7 +1340,7 @@ msgstr "确定 ‘libvirtd’ 守护进程正在运行。" - #: ../virtManager/connectauth.py:183 - #, python-format - msgid "Unable to connect to libvirt %s." --msgstr "" -+msgstr "无法连接到libvirt %s。" - - #: ../virtManager/connectauth.py:195 - msgid "Virtual Machine Manager Connection Failure" -@@ -1408,11 +1417,11 @@ msgstr "客户机代理不可用。" - - #: ../virtManager/console.py:581 - msgid "Guest has crashed." --msgstr "" -+msgstr "客户机崩溃了。" - - #: ../virtManager/console.py:583 - msgid "Guest is not running." --msgstr "" -+msgstr "客户机未运行。" - - #: ../virtManager/console.py:724 - msgid "Graphical console not configured for guest" -@@ -1442,16 +1451,16 @@ msgstr "USB 重定向错误" - - #: ../virtManager/console.py:842 - msgid "Viewer was disconnected." --msgstr "" -+msgstr "查看器已断开连接。" - - #: ../virtManager/console.py:848 - #, python-format - msgid "SSH tunnel error output: %s" --msgstr "" -+msgstr "SSH隧道错误输出:%s" - - #: ../virtManager/console.py:853 ../virtManager/console.py:1039 - msgid "Viewer disconnected." --msgstr "" -+msgstr "查看器断开了连接。" - - #: ../virtManager/console.py:944 - msgid "No text console available" -@@ -1492,7 +1501,7 @@ msgstr "" - #: ../virtManager/create.py:117 - #, python-format - msgid "Error launching create dialog: %s" --msgstr "" -+msgstr "启动创建对话框时出错:%s" - - #: ../virtManager/create.py:259 ../virtManager/create.py:264 - msgid "Warning" -@@ -1504,6 +1513,8 @@ msgid "" - "Failed to setup UEFI: %s\n" - "Install options are limited." - msgstr "" -+"设置 UEFI 失败:%s\n" -+"安装选项是有限的。" - - #: ../virtManager/create.py:466 - msgid "Libvirt version does not support remote URL installs." -@@ -1596,7 +1607,7 @@ msgstr "操作系统容器" - - #: ../virtManager/create.py:947 - msgid "Virtuozzo container" --msgstr "" -+msgstr "Virtuozzo 容器" - - #: ../virtManager/create.py:1093 - msgid "Removing disk images" -@@ -1622,7 +1633,7 @@ msgstr "%(max_page)d 的步骤 %(current_page)d" - - #: ../virtManager/create.py:1338 - msgid "Waiting for install media / source" --msgstr "" -+msgstr "等待安装介质 / 源" - - #: ../virtManager/create.py:1411 - #, python-format -@@ -1640,7 +1651,7 @@ msgstr "验证安装参数时未捕获的错误:%s" - - #: ../virtManager/create.py:1521 - msgid "You must select an OS." --msgstr "" -+msgstr "您必须选择一个操作系统。" - - #: ../virtManager/create.py:1528 - msgid "An install media selection is required." -@@ -1656,7 +1667,7 @@ msgstr "需要导入的存储路径。" - - #: ../virtManager/create.py:1552 - msgid "The import path must point to an existing storage." --msgstr "" -+msgstr "导入路径必须指向一个存在的存储。" - - #: ../virtManager/create.py:1558 - msgid "An application path is required." -@@ -1668,25 +1679,25 @@ msgstr "需要操作系统路径。" - - #: ../virtManager/create.py:1572 - msgid "Source URL is required" --msgstr "" -+msgstr "Source URL 是必须的" - - #: ../virtManager/create.py:1577 - msgid "Please specify password for accessing source registry" --msgstr "" -+msgstr "请指定访问源注册表的密码" - - #: ../virtManager/create.py:1583 - #, python-format - msgid "Destination path is not directory: %s" --msgstr "" -+msgstr "目标路径不是目录:%s" - - #: ../virtManager/create.py:1586 - #, python-format - msgid "No write permissions for directory path: %s" --msgstr "" -+msgstr "目录路径没有写入权限:%s" - - #: ../virtManager/create.py:1591 - msgid "OS root directory is not empty" --msgstr "" -+msgstr "操作系统根目录不为空" - - #: ../virtManager/create.py:1592 - msgid "" -@@ -1694,10 +1705,12 @@ msgid "" - "conflicts.\n" - "Would you like to continue?" - msgstr "" -+"由于文件冲突,在非空目录中创建根文件系统可能会失败。" -+"你想继续吗?" - - #: ../virtManager/create.py:1602 - msgid "A template name is required." --msgstr "" -+msgstr "模板名称是必需的。" - - #: ../virtManager/create.py:1617 - msgid "Error setting installer parameters." -@@ -1730,11 +1743,11 @@ msgstr "%s 安装需要网络设备。" - - #: ../virtManager/create.py:1909 - msgid "Detecting..." --msgstr "" -+msgstr "正在检测..." - - #: ../virtManager/create.py:1971 - msgid "None detected" --msgstr "" -+msgstr "未检测到" - - #: ../virtManager/create.py:2006 - msgid "Error starting installation: " -@@ -1767,7 +1780,7 @@ msgstr "继续安装时出错:%s" - - #: ../virtManager/create.py:2200 - msgid "Bootstraping container" --msgstr "" -+msgstr "引导容器" - - #: ../virtManager/createnet.py:128 ../virtinst/network.py:154 - msgid "NAT" -@@ -1797,7 +1810,7 @@ msgstr "" - - #: ../virtManager/createnet.py:206 - msgid "No available device" --msgstr "" -+msgstr "没有可用的设备" - - #: ../virtManager/createnet.py:290 - msgid "Invalid network name" -@@ -2061,7 +2074,7 @@ msgstr "无法删除 iscsi 共享。" - - #: ../virtManager/delete.py:350 - msgid "Cannot delete SCSI device." --msgstr "" -+msgstr "无法删除 SCSI 设备。" - - #: ../virtManager/delete.py:353 - msgid "Cannot delete unmanaged remote storage." -@@ -2085,7 +2098,7 @@ msgstr "将存储标记为可共享。" - - #: ../virtManager/delete.py:388 - msgid "Storage is a media device." --msgstr "" -+msgstr "存储是一种媒体设备。" - - #: ../virtManager/delete.py:398 - #, python-format -@@ -2134,7 +2147,7 @@ msgstr "%s 转发器 %s" - #: ../virtManager/details.py:249 - #, python-format - msgid "Sound %s" --msgstr "" -+msgstr "声音 %s" - - #: ../virtManager/details.py:251 - #, python-format -@@ -2149,7 +2162,7 @@ msgstr "文件系统 %s" - #: ../virtManager/details.py:255 - #, python-format - msgid "Controller %s %s" --msgstr "" -+msgstr "控制器 %s %s" - - #: ../virtManager/details.py:347 - msgid "MS-DOS/FreeDOS" -@@ -2357,7 +2370,7 @@ msgstr "%(received)d %(units)s 读取" - #: ../virtManager/details.py:2562 - #, python-format - msgid "%(transferred)d %(units)s write" --msgstr "" -+msgstr "%(transferred)d %(units)s 写入" - - #: ../virtManager/details.py:2565 - #, python-format -@@ -2367,7 +2380,7 @@ msgstr "%(received)d %(units)s 入站" - #: ../virtManager/details.py:2566 - #, python-format - msgid "%(transferred)d %(units)s out" --msgstr "" -+msgstr "%(transferred)d %(units)s 出站" - - #: ../virtManager/details.py:2568 ../virtManager/details.py:2569 - #: ../virtManager/details.py:2570 ../virtManager/details.py:2571 -@@ -2425,12 +2438,12 @@ msgstr "物理 %s 设备" - - #: ../virtManager/details.py:2981 - msgid "Cannot remove last video device while Graphics/Display is attached." --msgstr "" -+msgstr "连接图形/显示器时无法移除最后一个视频设备。" - - #: ../virtManager/details.py:3010 ../virtManager/details.py:3017 - #: ../virtManager/details.py:3023 - msgid "Cannot remove controller while devices are attached." --msgstr "" -+msgstr "连接设备时无法移除控制器。" - - #: ../virtManager/details.py:3126 - msgid "Overview" -@@ -2518,30 +2531,34 @@ msgstr "正在迁移域" - - #: ../virtManager/engine.py:123 - msgid "Checking for virtualization packages..." --msgstr "" -+msgstr "正在检查虚拟化包..." - - #: ../virtManager/engine.py:190 - msgid "" - "The libvirtd service does not appear to be installed. Install and run the " - "libvirtd service to manage virtualization on this host." - msgstr "" -+"似乎没有安装 libvirtd 服务。 安装并运行 libvirtd 服务以管理此主机上的虚拟化。" - - #: ../virtManager/engine.py:194 - msgid "" - "libvirtd is installed but not running. Start the libvirtd service to manage " - "virtualization on this host." - msgstr "" -+"libvirtd 已安装但未运行。 启动 libvirtd 服务以管理此主机上的虚拟化。" - - #: ../virtManager/engine.py:200 - msgid "" - "Could not detect a default hypervisor. Make sure the appropriate qemu/kvm " - "virtualization packages are installed to manage virtualization on this host." - msgstr "" -+"无法检测到默认管理程序。 确保安装了适当的 qemu/kvm 虚拟化软件包来管理此主机上的虚拟化。" - - #: ../virtManager/engine.py:207 - msgid "" - "A virtualization connection can be manually added via File->Add Connection" - msgstr "" -+"可以通过 File->Add Connection 手动添加虚拟化连接" - - #: ../virtManager/error.py:121 - msgid "Input Error" -@@ -2594,7 +2611,7 @@ msgstr "VNC 服务器" - - #: ../virtManager/gfxdetails.py:76 - msgid "Address" --msgstr "" -+msgstr "地址" - - #: ../virtManager/gfxdetails.py:85 - msgid "Localhost only" -@@ -2623,19 +2640,19 @@ msgstr "%(graphicstype)s 服务器" - - #: ../virtManager/gfxdetails.py:242 - msgid "Hypervisor/libvirt does not support spice GL" --msgstr "" -+msgstr "Hypervisor/libvirt 不支持 spice GL" - - #: ../virtManager/gfxdetails.py:245 - msgid "Hypervisor/libvirt does not support manual rendernode" --msgstr "" -+msgstr "Hypervisor/libvirt 不支持手动渲染节点" - - #: ../virtManager/gfxdetails.py:259 - msgid "Spice GL requires virtio graphics configured with accel3d." --msgstr "" -+msgstr "Spice GL 需要使用 accel3d 配置的 virtio 图形。" - - #: ../virtManager/gfxdetails.py:262 - msgid "Graphics listen type does not support spice GL." --msgstr "" -+msgstr "图形监听类型不支持 spice GL。" - - #: ../virtManager/gfxdetails.py:287 - msgid "Local SDL Window" -@@ -2740,20 +2757,20 @@ msgstr "隔离的网络" - #: ../virtManager/inspection.py:184 - #, python-format - msgid "Error inspection VM: %s" --msgstr "" -+msgstr "检查 VM 错误:%s" - - #: ../virtManager/inspection.py:195 - msgid "Cannot inspect VM on remote connection" --msgstr "" -+msgstr "无法在远程连接上检查 VM" - - #: ../virtManager/inspection.py:210 - #, python-format - msgid "Error launching libguestfs appliance: %s" --msgstr "" -+msgstr "启动 libguestfs 设备时出错:%s" - - #: ../virtManager/inspection.py:219 - msgid "Inspection found no operating systems." --msgstr "" -+msgstr "检查没有发现操作系统。" - - #: ../virtManager/interface.py:87 - msgid "Interface" -@@ -2931,7 +2948,7 @@ msgstr "在属性对话中禁用。" - - #: ../virtManager/mediacombo.py:67 - msgid "No media selected" --msgstr "" -+msgstr "没有选择介质" - - #: ../virtManager/mediacombo.py:102 - msgid "No media detected" -@@ -3083,7 +3100,7 @@ msgstr "Libvirt 版本不支持物理端口列表。" - - #: ../virtManager/oslist.py:26 - msgid "Type to start searching..." --msgstr "" -+msgstr "输入开始搜索..." - - #: ../virtManager/preferences.py:28 - #, python-format -@@ -3118,11 +3135,11 @@ msgstr "系统默认 (%s)" - - #: ../virtManager/preferences.py:139 - msgid "Manual redirect only" --msgstr "" -+msgstr "仅手动重定向" - - #: ../virtManager/preferences.py:140 - msgid "Auto redirect on USB attach" --msgstr "" -+msgstr "USB 连接时自动重定向" - - #: ../virtManager/preferences.py:162 - msgid "Yes" -@@ -3134,7 +3151,7 @@ msgstr "否" - - #: ../virtManager/preferences.py:182 - msgid "Application default" --msgstr "" -+msgstr "应用程序默认值" - - #: ../virtManager/preferences.py:185 - msgid "Nearest host CPU model" -@@ -3146,7 +3163,7 @@ msgstr "复制主机 CPU 定义" - - #: ../virtManager/preferences.py:195 - msgid "python libguestfs support is not installed" --msgstr "" -+msgstr "未安装 python libguestfs 支持" - - #: ../virtManager/preferences.py:331 - msgid "Configure grab key combination" -@@ -3173,7 +3190,7 @@ msgstr "不活跃的虚拟机不能使用串口控制台" - #: ../virtManager/serialcon.py:177 - #, python-format - msgid "Console for device type '%s' is not supported" --msgstr "" -+msgstr "不支持设备类型为 '%s' 的控制台" - - #: ../virtManager/serialcon.py:288 - #, python-format -@@ -3291,11 +3308,11 @@ msgstr "选择快照出错:%s" - msgid "" - "Guest is on a remote host, but is only configured to allow local file " - "descriptor connections." --msgstr "" -+msgstr "客户机位于远程主机上,但仅配置为允许本地文件描述符连接。" - - #: ../virtManager/sshtunnels.py:66 - msgid "Guest is configured for TLS only which does not work over SSH." --msgstr "" -+msgstr "客户机仅针对 TLS 配置,不能通过 SSH 工作。" - - #: ../virtManager/sshtunnels.py:72 - #, python-format -@@ -3304,6 +3321,8 @@ msgid "" - "listen locally. To connect remotely you will need to change the guest's " - "listen address." - msgstr "" -+"客户机位于具有传输 '%s' 的远程主机上,但仅配置为在本地监听。" -+" 要远程连接,您需要更改客户机的监听地址。" - - #: ../virtManager/storagebrowse.py:85 - msgid "Cannot use local storage on remote connection." -@@ -3336,7 +3355,7 @@ msgstr "存储池" - #: ../virtManager/storagelist.py:325 - #, python-format - msgid "%s Free / %s In Use" --msgstr "" -+msgstr "%s 可用 / %s 使用中" - - #: ../virtManager/storagelist.py:345 - msgid "Create new volume" -@@ -3444,7 +3463,7 @@ msgstr "打开插槽路径 '%s' 出错" - #: ../virtManager/viewers.py:574 - #, python-format - msgid "Encountered SPICE %(error-name)s" --msgstr "" -+msgstr "遭遇 SPICE %(error-name)s" - - #: ../virtManager/vmmenu.py:64 - msgid "_Reboot" -@@ -3833,6 +3852,10 @@ msgid "" - "--memory 512,maxmemory=1024\n" - "--memory 512,maxmemory=1024,hotplugmemorymax=2048,hotplugmemoryslots=2" - msgstr "" -+"配置客户机的内存分配。例:\n" -+"--memory 1024 (in MiB)\n" -+"--memory 512,maxmemory=1024\n" -+"--memory 512,maxmemory=1024,hotplugmemorymax=2048,hotplugmemoryslots=2" - - #: ../virtinst/cli.py:628 - #, fuzzy -@@ -3853,6 +3876,9 @@ msgid "" - "--cpu coreduo,+x2apic\n" - "--cpu host-passthrough\n" - msgstr "" -+"CPU 型号和功能。例:\n" -+"--cpu coreduo,+x2apic\n" -+"--cpu host-passthrough\n" - - #: ../virtinst/cli.py:650 - msgid "" -@@ -3890,6 +3916,9 @@ msgid "" - "--controller type=usb,model=qemu-xhci\n" - "--controller virtio-scsi\n" - msgstr "" -+"配置客户机的控制器设备。例:\n" -+"--controller type=usb,model=qemu-xhci\n" -+"--controller virtio-scsi\n" - - #: ../virtinst/cli.py:676 - msgid "" -@@ -3980,6 +4009,8 @@ msgid "" - "Configure a guest RNG device. Ex:\n" - "--rng /dev/urandom" - msgstr "" -+"配置客户机 RNG 设备。例:\n" -+"--rng /dev/urandom" - - #: ../virtinst/cli.py:747 - msgid "" -@@ -3994,6 +4025,8 @@ msgid "" - "Configure a guest memory device. Ex:\n" - "--memdev dimm,target_size=1024" - msgstr "" -+"配置客户机的内存设备。例:\n" -+"--memdev dimm,target_size=1024" - - #: ../virtinst/cli.py:755 - msgid "" -@@ -4001,6 +4034,9 @@ msgid "" - "--vsock auto_cid=yes\n" - "--vsock cid=7" - msgstr "" -+"配置客户机 vsock 套接字。例:\n" -+"--vsock auto_cid=yes\n" -+"--vsock cid=7" - - #: ../virtinst/cli.py:763 - msgid "Set domain security driver configuration." -@@ -4008,7 +4044,7 @@ msgstr "设置域安全驱动配置。" - - #: ../virtinst/cli.py:767 - msgid "Tune CPU parameters for the domain process." --msgstr "" -+msgstr "调整域进程的 CPU 参数。" - - #: ../virtinst/cli.py:771 - msgid "Tune NUMA policy for the domain process." -@@ -4066,6 +4102,9 @@ msgid "" - "--sysinfo host\n" - "--sysinfo bios_vendor=MyVendor,bios_version=1.2.3,...\n" - msgstr "" -+"配置 SMBIOS 系统信息。例:\n" -+"--sysinfo host\n" -+"--sysinfo bios_vendor=MyVendor,bios_version=1.2.3,...\n" - - #: ../virtinst/cli.py:817 - msgid "" -@@ -4073,6 +4112,9 @@ msgid "" - "--qemu-commandline='-display gtk,gl=on'\n" - "--qemu-commandline env=DISPLAY=:0.1" - msgstr "" -+"将参数直接传递给 qemu 模拟器。例:\n" -+"--qemu-commandline='-display gtk,gl=on'\n" -+"--qemu-commandline env=DISPLAY=:0.1" - - #: ../virtinst/cli.py:825 - msgid "" -@@ -4108,7 +4150,7 @@ msgstr "" - - #: ../virtinst/cli.py:849 - msgid "OS options" --msgstr "" -+msgstr "操作系统选项" - - #: ../virtinst/cli.py:852 - #, fuzzy -@@ -4126,6 +4168,9 @@ msgid "" - "Example values: fedora29, rhel7.0, win10, ...\n" - "See 'osinfo-query os' for a full list." - msgstr "" -+"这用于确定最佳默认值,如 virtio。\n" -+"示例值:fedora29, rhel7.0, win10, ...\n" -+"有关完整列表,请参见“osinfo-query os”。" - - #: ../virtinst/cli.py:888 - #, python-format -@@ -4152,7 +4197,7 @@ msgstr "错误: --%(cli_arg_name)s %(options)s: %(err)s" - #: ../virtinst/cli.py:2044 - #, python-format - msgid "Unknown sysinfo flag '%s'" --msgstr "" -+msgstr "未知的系统信息标志 '%s'" - - #: ../virtinst/cli.py:2215 - #, python-format -@@ -4216,7 +4261,7 @@ msgstr "目前不支持克隆到现有存储卷:'%s'" - #: ../virtinst/cloner.py:355 - #, python-format - msgid "Path does not exist: %s" --msgstr "" -+msgstr "路经不存在:%s" - - #: ../virtinst/cloner.py:380 - #, python-format -@@ -4355,7 +4400,7 @@ msgstr "控制器编号 %d 磁盘类型 %s 没有空闲的插槽供使用" - #: ../virtinst/devices/disk.py:935 - #, python-format - msgid "Only %s disks for bus '%s' are supported" --msgstr "" -+msgstr "仅 %s 个磁盘其总线为 '%s' 是被支持的" - - #: ../virtinst/devices/filesystem.py:104 - #, python-format -@@ -4369,7 +4414,7 @@ msgstr "%s 必须在 5900 以上,或设为 -1 自动分配" - - #: ../virtinst/devices/graphics.py:254 - msgid "Host does not support spice GL" --msgstr "" -+msgstr "主机不支持 spice GL" - - #: ../virtinst/devices/hostdev.py:43 - #, python-format -@@ -4440,7 +4485,7 @@ msgstr "直通设备" - - #: ../virtinst/devices/tpm.py:32 - msgid "Emulated device" --msgstr "" -+msgstr "模拟设备" - - #: ../virtinst/devices/tpm.py:38 - msgid "TIS" -@@ -4472,7 +4517,7 @@ msgstr "无动作" - - #: ../virtinst/devices/watchdog.py:42 - msgid "Dump guest memory core" --msgstr "" -+msgstr "转储客户机内存核心" - - #: ../virtinst/diskbackend.py:120 - #, python-format -@@ -4570,12 +4615,12 @@ msgstr "客户机名称 '%s' 已经在使用。" - #: ../virtinst/guest.py:263 - #, python-format - msgid "Unknown OS name '%s'. See `osinfo-query os` for valid values." --msgstr "" -+msgstr "未知的操作系统名称“%s”。 有关有效值,请参阅 `osinfo-query os`。" - - #: ../virtinst/guest.py:273 - #, python-format - msgid "Unknown libosinfo ID '%s'" --msgstr "" -+msgstr "未知的 libosinfo ID '%s'" - - #: ../virtinst/guest.py:332 - msgid "Libvirt version does not support UEFI." -@@ -4593,11 +4638,11 @@ msgstr "不能为架构 '%s' 找到任何 UEFI 二进制路径" - - #: ../virtinst/installer.py:56 - msgid "location kernel/initrd may only be specified with a location URL/path" --msgstr "" -+msgstr "kernel/initrd 路经只能执行为一个URL/path路经" - - #: ../virtinst/installer.py:59 - msgid "location kernel/initrd must be be specified as a pair" --msgstr "" -+msgstr "kernel/initrd 路经必须指定为一对" - - #: ../virtinst/installer.py:344 - msgid "Creating domain..." -@@ -4605,7 +4650,7 @@ msgstr "创建域......" - - #: ../virtinst/installer.py:351 - msgid "Domain type 'vz' doesn't support transient installs." --msgstr "" -+msgstr "域类型“vz”不支持临时安装。" - - #: ../virtinst/installer.py:441 - #, python-format -@@ -4624,7 +4669,7 @@ msgstr "无法在远程连接中使用本地存储。" - - #: ../virtinst/installertreemedia.py:140 - msgid "Couldn't find kernel for install tree." --msgstr "" -+msgstr "找不到安装树的内核。" - - #: ../virtinst/interface.py:158 - #, python-format -@@ -4736,6 +4781,8 @@ msgid "" - "OS name '%s' is deprecated, using '%s' instead. This alias will be removed " - "in the future." - msgstr "" -+"操作系统名称 '%s' 已经被弃用,使用 '%s' 替代。" -+"将来会删除此别名。" - - #: ../virtinst/snapshot.py:64 - msgid "A name must be specified." -@@ -4787,7 +4834,7 @@ msgstr "Sheepdog 文件系统" - - #: ../virtinst/storage.py:105 - msgid "ZFS Pool" --msgstr "" -+msgstr "ZFS 池" - - #: ../virtinst/storage.py:201 - #, python-format -@@ -4937,11 +4984,11 @@ msgstr "超出名称生成范围。" - - #: ../data/virt-manager.desktop.in.h:2 - msgid "Manage virtual machines" --msgstr "" -+msgstr "管理虚拟机" - - #: ../data/virt-manager.appdata.xml.in.h:2 - msgid "Graphically manage KVM, Xen, or LXC via libvirt" --msgstr "" -+msgstr "通过 libvirt 以图形方式管理 KVM、Xen、LXC" - - #: ../data/virt-manager.appdata.xml.in.h:3 - msgid "" -@@ -4951,18 +4998,23 @@ msgid "" - "for existing VMs on local or remote machines. Uses libvirt as the backend " - "management API." - msgstr "" -+"Virtual Machine Manager 提供了一个图形工具," -+"用于管理 KVM、Xen 和 LXC 的虚拟机。 " -+"启动、停止、添加或删除虚拟设备,连接到图形或串行控制台," -+"并查看本地或远程计算机上现有 VM 的资源使用统计信息。 " -+"使用 libvirt 作为后端管理 API。" - - #: ../data/virt-manager.appdata.xml.in.h:4 - msgid "Main manager window" --msgstr "" -+msgstr "主管理器窗口" - - #: ../data/virt-manager.appdata.xml.in.h:5 - msgid "Virtual machine configuration screen" --msgstr "" -+msgstr "虚拟机配置界面" - - #: ../data/virt-manager.appdata.xml.in.h:6 - msgid "Graphical console connection for a virtual machine" --msgstr "" -+msgstr "虚拟机的图形控制台连接" - - #: ../ui/about.ui.h:1 - msgid "Copyright (C) 2006-2019 Red Hat Inc." -@@ -5009,15 +5061,15 @@ msgstr "_IO 模式:" - - #: ../ui/addhardware.ui.h:6 ../ui/details.ui.h:114 - msgid "Discard mod_e:" --msgstr "" -+msgstr "丢弃模式(_E):" - - #: ../ui/addhardware.ui.h:7 ../ui/details.ui.h:115 - msgid "Detect _zeroes:" --msgstr "" -+msgstr "侦测零(_Z):" - - #: ../ui/addhardware.ui.h:8 ../ui/details.ui.h:111 - msgid "Persistent _Reservations:" --msgstr "" -+msgstr "永久保留(_R):" - - #: ../ui/addhardware.ui.h:9 - msgid "Ad_vanced options" -@@ -5265,7 +5317,7 @@ msgstr "管理程序(_H):" - - #: ../ui/connect.ui.h:4 - msgid "Connect to _remote host over SSH" --msgstr "" -+msgstr "通过 SSH 连接到远程主机(_R)" - - #: ../ui/connect.ui.h:5 - msgid "_Autoconnect:" -@@ -5292,7 +5344,7 @@ msgstr "" - - #: ../ui/connect.ui.h:12 - msgid "Cu_stom URI:" --msgstr "" -+msgstr "自定义 URI(_S):" - - #: ../ui/connect.ui.h:13 - msgid "Generated URI:" -@@ -5308,15 +5360,15 @@ msgstr "生成新虚拟机" - - #: ../ui/create.ui.h:3 - msgid "Choose virtualization type" --msgstr "" -+msgstr "选择虚拟化类型" - - #: ../ui/create.ui.h:4 - msgid "_Virtual machine" --msgstr "" -+msgstr "虚拟机(_V)" - - #: ../ui/create.ui.h:5 - msgid "_Container" --msgstr "" -+msgstr "容器(_C)" - - #: ../ui/create.ui.h:6 - msgid "Choose how you would like to install the operating system" -@@ -5328,7 +5380,7 @@ msgstr "本地安装介质(ISO 映像或者光驱)(_L)" - - #: ../ui/create.ui.h:8 - msgid "Network _Install (HTTP, HTTPS, or FTP)" --msgstr "" -+msgstr "网络安装(_I),可为 HTTP、FTP 或者 NFS。" - - #: ../ui/create.ui.h:9 - msgid "Network _Boot (PXE)" -@@ -5376,7 +5428,7 @@ msgstr "架构选项" - - #: ../ui/create.ui.h:21 - msgid "Choose _ISO or CDROM install media:" --msgstr "" -+msgstr "选择 _ISO 或者 CDROM 安装介质:" - - #: ../ui/create.ui.h:22 - msgid "Bro_wse..." -@@ -5388,7 +5440,7 @@ msgstr "ISO" - - #: ../ui/create.ui.h:24 - msgid "Provide the operating system install U_RL:" --msgstr "" -+msgstr "提供操作系统安装 U_RL:" - - #: ../ui/create.ui.h:25 - msgid "Kerne_l options:" -@@ -5453,6 +5505,9 @@ msgid "" - "please install virt-bootstrap" - msgstr "" -+"操作系统目录树必须已经存在。 为启用操作系统目录树创建\n" -+"请安装 virt-bootstrap" - - #: ../ui/create.ui.h:41 - msgid "" -@@ -5460,14 +5515,16 @@ msgid "" - "tree for remote\n" - "connections is not yet supported." - msgstr "" -+"操作系统目录树必须已经存在。 为远程创建操作系统目录树\n" -+"尚不支持连接。" - - #: ../ui/create.ui.h:43 - msgid "Create OS directory tree from container image" --msgstr "" -+msgstr "从容器映像创建 OS 目录树" - - #: ../ui/create.ui.h:44 - msgid "Source URI:" --msgstr "" -+msgstr "源 URI:" - - #: ../ui/create.ui.h:45 - msgid "" -@@ -5476,42 +5533,46 @@ msgid "" - " * docker://registry:port/image:tag\n" - " * virt-builder://template\n" - msgstr "" -+"可能的 URL 格式:\n" -+" * file:///path/to/rootfs.tar\n" -+" * docker://registry:port/image:tag\n" -+" * virt-builder://template\n" - - #: ../ui/create.ui.h:50 - msgid "Do not verify TLS certificates of registry" --msgstr "" -+msgstr "不要验证注册的 TLS 证书" - - #: ../ui/create.ui.h:51 - msgid "Username:" --msgstr "" -+msgstr "用户名:" - - #: ../ui/create.ui.h:52 - msgid "Password:" --msgstr "" -+msgstr "密码:" - - #: ../ui/create.ui.h:53 - msgid "Credentials for accessing the source registry" --msgstr "" -+msgstr "访问源注册表的凭据" - - #: ../ui/create.ui.h:54 - msgid "Root password:" --msgstr "" -+msgstr "ROOT 密码:" - - #: ../ui/create.ui.h:55 - msgid "Select _container template:" --msgstr "" -+msgstr "选择容器模板(_C):" - - #: ../ui/create.ui.h:56 - msgid "VZ templates" --msgstr "" -+msgstr "VZ 模板" - - #: ../ui/create.ui.h:57 - msgid "C_hoose the operating system you are installing:" --msgstr "" -+msgstr "选择您正要安装的操作系统(_H):" - - #: ../ui/create.ui.h:58 - msgid "A_utomatically detect from the installation media / source" --msgstr "" -+msgstr "根据安装介质或者源来自动检测" - - #: ../ui/create.ui.h:59 - msgid "Install" -@@ -5519,11 +5580,11 @@ msgstr "安装" - - #: ../ui/create.ui.h:60 - msgid "Choose Memory and CPU settings:" --msgstr "" -+msgstr "选择内存和 CPU 设置" - - #: ../ui/create.ui.h:61 - msgid "_Memory:" --msgstr "" -+msgstr "内存(_M):" - - #: ../ui/create.ui.h:62 - msgid "C_PUs:" -@@ -5663,6 +5724,9 @@ msgid "" - "address ranges. eg FC00::/7. The prefix must be 64. A typical IPv6 " - "network address will look something like: fd00:e81d:a6d7:55::/64" - msgstr "" -+"Note: 可以从 IPv6 私有地址范围之一中选择网络。" -+"例如 FC00::/7。 前缀必须是 64。 " -+"典型的 IPv6 网络地址类似于:fd00:e81d:a6d7:55::/64" - - #: ../ui/createnet.ui.h:23 - msgid "fd00:100::1" -@@ -5690,11 +5754,11 @@ msgstr "目的(_D):" - - #: ../ui/createnet.ui.h:30 - msgid "_Pool containing all of VFs of a SR-IOV device" --msgstr "" -+msgstr "包含 SR-IOV 设备的所有 VF 的池(_P)" - - #: ../ui/createnet.ui.h:31 - msgid "Device _List:" --msgstr "" -+msgstr "设备列表(_L):" - - #: ../ui/createnet.ui.h:32 - msgid "Enable IPv6 internal routing/networking" -@@ -5921,7 +5985,7 @@ msgstr "暂停" - - #: ../ui/details.ui.h:30 ../ui/manager.ui.h:24 - msgid "Shut down the virtual machine" --msgstr "" -+msgstr "关闭虚拟机" - - #: ../ui/details.ui.h:32 - msgid "Snapshots" -@@ -6029,7 +6093,7 @@ msgstr "用户命名空间" - - #: ../ui/details.ui.h:60 - msgid "Operating Sys_tem" --msgstr "" -+msgstr "操作系统(_T)" - - #: ../ui/details.ui.h:61 - msgid "Applications" -@@ -6037,7 +6101,7 @@ msgstr "应用程序" - - #: ../ui/details.ui.h:62 - msgid "Refresh" --msgstr "" -+msgstr "刷新" - - #: ../ui/details.ui.h:63 ../ui/host.ui.h:8 - msgid "CPU usage" -@@ -6165,7 +6229,7 @@ msgstr "内核参数(_G):" - - #: ../ui/details.ui.h:95 - msgid "D_TB path:" --msgstr "" -+msgstr "D_TB 路经:" - - #: ../ui/details.ui.h:96 - msgid "Dir_ect kernel boot" -@@ -6193,11 +6257,11 @@ msgstr "存储大小:" - - #: ../ui/details.ui.h:102 - msgid "Source _path:" --msgstr "" -+msgstr "源路经(_P):" - - #: ../ui/details.ui.h:103 - msgid "_Browse" --msgstr "" -+msgstr "浏览(_B)" - - #: ../ui/details.ui.h:104 - msgid "Device type:" -@@ -6248,11 +6312,11 @@ msgstr "MAC 地址:" - - #: ../ui/details.ui.h:121 - msgid "Link _state:" --msgstr "" -+msgstr "连接状态(_S):" - - #: ../ui/details.ui.h:122 - msgid "active" --msgstr "" -+msgstr "启用" - - #: ../ui/details.ui.h:123 ../ui/gfxdetails.ui.h:14 ../ui/snapshots.ui.h:12 - #: ../ui/storagelist.ui.h:17 -@@ -6261,7 +6325,7 @@ msgstr "标签" - - #: ../ui/details.ui.h:124 - msgid "I_P address:" --msgstr "" -+msgstr "I_P 地址:" - - #: ../ui/details.ui.h:125 - msgid "Virtual Network Interface" -@@ -6325,7 +6389,7 @@ msgstr "标头:" - - #: ../ui/details.ui.h:141 - msgid "_3D acceleration:" --msgstr "" -+msgstr "_3D 加速:" - - #: ../ui/details.ui.h:142 - msgid "Video" -@@ -6333,7 +6397,7 @@ msgstr "视频" - - #: ../ui/details.ui.h:144 - msgid "Devices:" --msgstr "" -+msgstr "设备:" - - #: ../ui/details.ui.h:145 - msgid "Controller" -@@ -6365,7 +6429,7 @@ msgstr "重定向设备" - - #: ../ui/details.ui.h:153 - msgid "Version:" --msgstr "" -+msgstr "版本:" - - #: ../ui/details.ui.h:154 - msgid "TPM Device" -@@ -6373,7 +6437,7 @@ msgstr "TPM 设备" - - #: ../ui/details.ui.h:155 - msgid "Host Device:" --msgstr "" -+msgstr "主机设备:" - - #: ../ui/details.ui.h:156 - msgid "Random Number Generator" -@@ -6381,7 +6445,7 @@ msgstr "随机数生成器" - - #: ../ui/details.ui.h:158 - msgid "Model:" --msgstr "" -+msgstr "类型:" - - #: ../ui/details.ui.h:159 - msgid "panic-model" -@@ -6405,7 +6469,7 @@ msgstr "将密码保存到钥匙环(_S)" - - #: ../ui/details.ui.h:165 - msgid "Check to save password, uncheck to forget password." --msgstr "" -+msgstr "勾选以存储密码,不够选以忘记密码。" - - #: ../ui/details.ui.h:167 - msgid "_Login" -@@ -6437,7 +6501,7 @@ msgstr "格式(_F):" - - #: ../ui/gfxdetails.ui.h:1 - msgid "Show passwor_d" --msgstr "" -+msgstr "显示密码(_D)" - - #: ../ui/gfxdetails.ui.h:3 - msgid "Addr_ess:" -@@ -6489,7 +6553,7 @@ msgstr "" - - #: ../ui/gfxdetails.ui.h:16 - msgid "L_isten type:" --msgstr "" -+msgstr "监听类型(_I):" - - #: ../ui/host.ui.h:1 - msgid "Connection Details" -@@ -6581,15 +6645,15 @@ msgstr "_QoS 配置" - - #: ../ui/host.ui.h:31 - msgid "Physical Function:" --msgstr "" -+msgstr "实体功能:" - - #: ../ui/host.ui.h:32 - msgid "Virtual Functions:" --msgstr "" -+msgstr "虚拟功能:" - - #: ../ui/host.ui.h:33 - msgid "_SR-IOV information" --msgstr "" -+msgstr "_SR-IOV 信息" - - #: ../ui/host.ui.h:34 - msgid "Add Network" -@@ -6819,7 +6883,7 @@ msgstr "虚拟端口(_P)" - - #: ../ui/oslist.ui.h:1 - msgid "Include end of life operating systems" --msgstr "" -+msgstr "包括生命周期结束的操作系统" - - #: ../ui/preferences.ui.h:1 - msgid "Preferences" -@@ -6831,7 +6895,7 @@ msgstr "启用系统托盘图标(_S)" - - #: ../ui/preferences.ui.h:3 - msgid "Enable libgues_tfs VM introspection" --msgstr "" -+msgstr "启用 libgues_tfs VM 自查" - - #: ../ui/preferences.ui.h:4 - msgid "General" -@@ -6965,7 +7029,7 @@ msgstr "调整客户机窗口大小(_R):" - - #: ../ui/preferences.ui.h:34 - msgid "SPICE _USB Redirection:" --msgstr "" -+msgstr "SPICE _USB 重定向" - - #: ../ui/preferences.ui.h:35 - msgid "Graphical Consoles" -@@ -7143,3 +7207,11 @@ msgstr "客户机" - - #~ msgid "Invalid install location: " - #~ msgstr "无效安装位置:" -+msgid "" -+"Can't find the operating system you are looking for?\n" -+"Try selecting the next most recent version displayed,\n" -+"or use the \"Generic\" entry." -+msgstr "" -+"找不到您正在寻找的操作系统?\n" -+"尝试选择显示的下一个最新版本,\n" -+"或者使用\"Generic\"。" -diff --git a/virtManager/create.py b/virtManager/create.py -index ff3373d..3096ea0 100644 ---- a/virtManager/create.py -+++ b/virtManager/create.py -@@ -1519,7 +1519,7 @@ class vmmCreate(vmmGObjectUI): - - if not self._is_container_install() and not osobj: - return self.err.val_err(_("You must select an OS.") + -- "\n\n" + self._os_list.eol_text) -+ "\n\n" + _(self._os_list.eol_text)) - - if instmethod == INSTALL_PAGE_ISO: - media = self._get_config_local_media() --- -2.27.0 - diff --git a/virt-manager-2.1.0.tar.gz b/virt-manager-2.1.0.tar.gz deleted file mode 100644 index bd704809f80b0221f5bf6e6439d47f836dbadf55..0000000000000000000000000000000000000000 Binary files a/virt-manager-2.1.0.tar.gz and /dev/null differ diff --git a/virt-manager-3.2.0.tar.gz b/virt-manager-3.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6059a8d844bd53fd47c64058086436053d75de32 Binary files /dev/null and b/virt-manager-3.2.0.tar.gz differ diff --git a/virt-manager-Handle-new-nodedev-name-for-mediated-devices.patch b/virt-manager-Handle-new-nodedev-name-for-mediated-devices.patch new file mode 100644 index 0000000000000000000000000000000000000000..f7a2a5a6e30f2d3967168057ee48905a312e296d --- /dev/null +++ b/virt-manager-Handle-new-nodedev-name-for-mediated-devices.patch @@ -0,0 +1,112 @@ +From 9cb766bec0296720e98101807726dd9a488486c4 Mon Sep 17 00:00:00 2001 +From: Jonathon Jongsma +Date: Tue, 26 Oct 2021 14:18:40 -0500 +Subject: [PATCH] Handle new nodedev name for mediated devices + +libvirt recently changed the nodedev names for mediated devices due to +the fact that mdevctl supports defining multiple mediated devices with +the same UUID as long as only one is active at a time. This means that +the nodedev name changed from the format 'mdev_$UUID' to the format +'mdev_$UUID_$PARENT'. + +Unfortunately, virt-install was parsing the nodedev name to extract the +UUID of a mediated device. This fails with the new name format. +Fortunately, in libvirt 7.3.0, a field was added to the xml +schema for mdev devices, so we can simply use this instead, and fall +back to the name parsing if it doesn't exist. + +Signed-off-by: Jonathon Jongsma +(cherry picked from commit 0c146b250384ddddcefd2cc0d76b9e808377ebe5) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2023650 + +Signed-off-by: Jonathon Jongsma +--- + tests/data/testdriver/testdriver.xml | 14 ++++++++++++++ + tests/test_nodedev.py | 14 ++++++++++++++ + virtinst/nodedev.py | 7 +++++++ + 3 files changed, 35 insertions(+) + +diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml +index 5875732a..e4880936 100644 +--- a/tests/data/testdriver/testdriver.xml ++++ b/tests/data/testdriver/testdriver.xml +@@ -3725,4 +3725,18 @@ ba + + + ++ ++ mdev_35ceae7f_eea5_4f28_b7f3_7b12a3e62d3c_0000_06_00_0 ++ /sys/devices/pci0000:00/0000:00:02.0/35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c ++ pci_0000_06_00_0 ++ ++ vfio_mdev ++ ++ ++ ++ ++ 35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c ++ ++ ++ + +diff --git a/tests/test_nodedev.py b/tests/test_nodedev.py +index 79678bc8..41435262 100644 +--- a/tests/test_nodedev.py ++++ b/tests/test_nodedev.py +@@ -8,6 +8,7 @@ + import os.path + + import pytest ++import libvirt + + from virtinst import Guest + from virtinst import NodeDevice +@@ -154,6 +155,19 @@ def testPCIMdev(): + assert dev.parent == "pci_0000_06_00_0" + assert dev.device_type == "mdev" + assert dev.type_id == "nvidia-11" ++ assert dev.get_mdev_uuid() == "4b20d080-1b54-4048-85b3-a6a62d165c01" ++ ++# libvirt <7.3.0 doesn't support in the mdev node device xml ++@pytest.mark.skipif(libvirt.getVersion() < 7003000, reason="libvirt version doesn't support new mdev format") ++def testPCIMdevNewFormat(): ++ conn = utils.URIs.open_testdriver_cached() ++ devname = "mdev_35ceae7f_eea5_4f28_b7f3_7b12a3e62d3c_0000_06_00_0" ++ dev = _nodeDevFromName(conn, devname) ++ assert dev.name == devname ++ assert dev.parent == "pci_0000_06_00_0" ++ assert dev.device_type == "mdev" ++ assert dev.type_id == "nvidia-11" ++ assert dev.get_mdev_uuid() == "35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c" + + + # NodeDevice 2 Device XML tests +diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py +index f54a311c..248723b9 100644 +--- a/virtinst/nodedev.py ++++ b/virtinst/nodedev.py +@@ -94,6 +94,12 @@ class NodeDevice(XMLBuilder): + device_type = XMLProperty("./capability/@type") + + def get_mdev_uuid(self): ++ # libvirt 7.3.0 added a element to the nodedev xml for mdev ++ # types. For older versions, we unfortunately have to parse the nodedev ++ # name, which uses the format "mdev_$UUID_WITH_UNDERSCORES" ++ if self.uuid is not None: ++ return self.uuid ++ + return self.name[5:].replace('_', '-') + + def compare_to_hostdev(self, hostdev): +@@ -191,6 +197,7 @@ class NodeDevice(XMLBuilder): + + # type='mdev' options + type_id = XMLProperty("./capability/type/@id") ++ uuid = XMLProperty("./capability/uuid") + + + def _AddressStringToHostdev(conn, addrstr): +-- +2.31.1 + diff --git a/virt-manager-cli-add-ioapic.driver-to-features.patch b/virt-manager-cli-add-ioapic.driver-to-features.patch new file mode 100644 index 0000000000000000000000000000000000000000..5c0124ed9d0f09f7636685245d47cec892873982 --- /dev/null +++ b/virt-manager-cli-add-ioapic.driver-to-features.patch @@ -0,0 +1,112 @@ +From a024c96367ce5f1f8e24e19e9d0735de308d870b Mon Sep 17 00:00:00 2001 +From: Jonathon Jongsma +Date: Tue, 11 Jan 2022 11:21:39 -0600 +Subject: [PATCH] cli: add 'ioapic.driver' to --features + +Add the ability to set the ioapic driver using the --features argument: + + $ virt-install --features ioapic.driver=qemu ... + +This results in the following xml: + + + ... + + + +This is required in order to install a guest with >255 cpus. Such a +configuration requires an iommu with extended interrupt mode enabled, +which in turn requires IOMMU interrupt remapping to be enabled, which in +turn requires a split I/O APIC. + +Signed-off-by: Jonathon Jongsma +(cherry picked from commit 9766beea0432faad7cded9e0285d05851659020e) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2039127 + +Signed-off-by: Jonathon Jongsma +--- + tests/data/cli/compare/virt-install-singleton-config-3.xml | 1 + + tests/data/xmlparse/change-guest-out.xml | 1 + + tests/test_cli.py | 2 +- + tests/test_xmlparse.py | 1 + + virtinst/cli.py | 1 + + virtinst/domain/features.py | 1 + + 6 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/data/cli/compare/virt-install-singleton-config-3.xml b/tests/data/cli/compare/virt-install-singleton-config-3.xml +index d2e7a363..a36c7bf2 100644 +--- a/tests/data/cli/compare/virt-install-singleton-config-3.xml ++++ b/tests/data/cli/compare/virt-install-singleton-config-3.xml +@@ -73,6 +73,7 @@ + + + ++ + + + +diff --git a/tests/data/xmlparse/change-guest-out.xml b/tests/data/xmlparse/change-guest-out.xml +index 17af0826..3faf8783 100644 +--- a/tests/data/xmlparse/change-guest-out.xml ++++ b/tests/data/xmlparse/change-guest-out.xml +@@ -32,6 +32,7 @@ + + + ++ + + + +diff --git a/tests/test_cli.py b/tests/test_cli.py +index aba1fe3c..2034d21c 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -558,7 +558,7 @@ c.add_compare(""" + --vcpus vcpu.current=3,maxvcpus=4,vcpu.placement=auto + --memory hotplugmemorymax=2048,hotplugmemoryslots=2 + --disk none +---features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on ++--features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on,ioapic.driver=qemu + --clock rtc_present=no,pit_present=yes,pit_tickpolicy=catchup,tsc_present=no,platform_present=no,hypervclock_present=no,platform_tickpolicy=foo,hpet_tickpolicy=bar,tsc_tickpolicy=wibble,kvmclock_tickpolicy=wobble,hypervclock_tickpolicy=woo + --boot bios.useserial=no,bios.rebootTimeout=60,cmdline=root=/foo,smbios.mode=host,bootmenu.enable=yes,loader_ro=yes,loader.type=rom,loader=/tmp/foo + --memorybacking access.mode=shared,source.type=anonymous,hugepages=on +diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py +index 6d1aaddb..ac2fb38d 100644 +--- a/tests/test_xmlparse.py ++++ b/tests/test_xmlparse.py +@@ -160,6 +160,7 @@ def testAlterGuest(): + check("kvm_hidden", None, True) + check("pvspinlock", None, True) + check("gic_version", None, False) ++ check("ioapic_driver", None, "qemu") + + check = _make_checker(guest.cpu) + check("match", "exact", "strict") +diff --git a/virtinst/cli.py b/virtinst/cli.py +index e1a988f9..dbd4a545 100644 +--- a/virtinst/cli.py ++++ b/virtinst/cli.py +@@ -2777,6 +2777,7 @@ class ParserFeatures(VirtCLIParser): + + cls.add_arg("smm.state", "smm", is_onoff=True) + cls.add_arg("vmcoreinfo.state", "vmcoreinfo", is_onoff=True) ++ cls.add_arg("ioapic.driver", "ioapic_driver") + + + ################### +diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py +index 246839f2..7d32edc0 100644 +--- a/virtinst/domain/features.py ++++ b/virtinst/domain/features.py +@@ -41,6 +41,7 @@ class DomainFeatures(XMLBuilder): + + smm = XMLProperty("./smm/@state", is_onoff=True) + vmcoreinfo = XMLProperty("./vmcoreinfo/@state", is_onoff=True) ++ ioapic_driver = XMLProperty("./ioapic/@driver") + + + ################## +-- +2.34.1 + diff --git a/virt-manager-cli-filesystem-add-binary.sandbox.mode-and-source.socket.patch b/virt-manager-cli-filesystem-add-binary.sandbox.mode-and-source.socket.patch new file mode 100644 index 0000000000000000000000000000000000000000..8f4f917cc63315c846378343052b4847b5766cd0 --- /dev/null +++ b/virt-manager-cli-filesystem-add-binary.sandbox.mode-and-source.socket.patch @@ -0,0 +1,93 @@ +From 5c16353a007fd7f18eb44a7413d0c146b7de1a4c Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Fri, 30 Jul 2021 13:15:29 -0400 +Subject: [PATCH] cli: --filesystem: add binary.sandbox.mode and source.socket + +Signed-off-by: Cole Robinson +(cherry picked from commit 520b3a3b35359ddd07f3a818d6cc3e6740079eff) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045932 + +Signed-off-by: Jonathon Jongsma +--- + tests/data/cli/compare/virt-install-many-devices.xml | 5 ++++- + tests/test_cli.py | 2 +- + virtinst/cli.py | 2 ++ + virtinst/devices/filesystem.py | 2 ++ + 4 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml +index 3bd756b3..417d8db0 100644 +--- a/tests/data/cli/compare/virt-install-many-devices.xml ++++ b/tests/data/cli/compare/virt-install-many-devices.xml +@@ -293,11 +293,14 @@ + + 1234 + 500 +- ++ ++ /tmp/foo.sock ++ + + + + ++ + + + +diff --git a/tests/test_cli.py b/tests/test_cli.py +index 2034d21c..862d19dd 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -686,7 +686,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser + --filesystem type-mount,source.dir=/,target=/ + --filesystem type=template,source.name=foo,target=/ + --filesystem type=file,source.file=foo.img,target=/ +---filesystem type=volume,model=virtio,multidevs=remap,readonly=on,space_hard_limit=1234,space_soft_limit=500,source.pool=pool1,source.volume=vol,driver.name=virtiofs,driver.queue=3,binary.path=/foo/virtiofsd,binary.xattr=off,binary.cache.mode=always,binary.lock.posix=off,binary.lock.flock=on,target.dir=/foo ++--filesystem type=volume,model=virtio,multidevs=remap,readonly=on,space_hard_limit=1234,space_soft_limit=500,source.pool=pool1,source.volume=vol,driver.name=virtiofs,driver.queue=3,binary.path=/foo/virtiofsd,binary.xattr=off,binary.cache.mode=always,binary.lock.posix=off,binary.lock.flock=on,target.dir=/foo,binary.sandbox.mode=chroot,source.socket=/tmp/foo.sock + --filesystem type=block,source.dev=/dev/foo,target.dir=/ + --filesystem type=ram,source.usage=1024,source.units=MiB,target=/ + +diff --git a/virtinst/cli.py b/virtinst/cli.py +index dbd4a545..13782fc8 100644 +--- a/virtinst/cli.py ++++ b/virtinst/cli.py +@@ -4225,6 +4225,7 @@ class ParserFilesystem(VirtCLIParser): + cls.add_arg("source.volume", "source_volume") + cls.add_arg("source.units", "source_units") + cls.add_arg("source.usage", "source_usage") ++ cls.add_arg("source.socket", "source_socket") + + cls.add_arg("target.dir", "target_dir") + +@@ -4233,6 +4234,7 @@ class ParserFilesystem(VirtCLIParser): + cls.add_arg("binary.cache.mode", "binary_cache_mode") + cls.add_arg("binary.lock.posix", "binary_lock_posix", is_onoff=True) + cls.add_arg("binary.lock.flock", "binary_lock_flock", is_onoff=True) ++ cls.add_arg("binary.sandbox.mode", "binary_sandbox_mode") + + cls.add_arg("driver.format", "driver_format") + cls.add_arg("driver.name", "driver_name") +diff --git a/virtinst/devices/filesystem.py b/virtinst/devices/filesystem.py +index 574844b6..02402bac 100644 +--- a/virtinst/devices/filesystem.py ++++ b/virtinst/devices/filesystem.py +@@ -49,12 +49,14 @@ class DeviceFilesystem(Device): + source_units = XMLProperty("./source/@units") + source_pool = XMLProperty("./source/@pool") + source_volume = XMLProperty("./source/@volume") ++ source_socket = XMLProperty("./source/socket") + + binary_path = XMLProperty("./binary/@path") + binary_xattr = XMLProperty("./binary/@xattr", is_onoff=True) + binary_cache_mode = XMLProperty("./binary/cache/@mode") + binary_lock_posix = XMLProperty("./binary/lock/@posix", is_onoff=True) + binary_lock_flock = XMLProperty("./binary/lock/@flock", is_onoff=True) ++ binary_sandbox_mode = XMLProperty("./binary/sandbox/@mode") + + def _type_to_source_prop(self): + if self.type == DeviceFilesystem.TYPE_TEMPLATE: +-- +2.34.1 + diff --git a/virt-manager-cli-introduce-resource-fibrechannel.appid-option.patch b/virt-manager-cli-introduce-resource-fibrechannel.appid-option.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc6a3fdab72ba26f1d6f6048d610e7ad5d46be83 --- /dev/null +++ b/virt-manager-cli-introduce-resource-fibrechannel.appid-option.patch @@ -0,0 +1,71 @@ +From ddedf5e1b34568adbbfed6a052bf96b7d1eda6f1 Mon Sep 17 00:00:00 2001 +From: Pavel Hrdina +Date: Tue, 14 Sep 2021 17:08:35 +0200 +Subject: [PATCH] cli: introduce --resource fibrechannel.appid option + +Signed-off-by: Pavel Hrdina +(cherry picked from commit 0953e1aea1fd16cd1825c03f3b032c7f12f3322f) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2011328 + +Signed-off-by: Jonathon Jongsma +--- + tests/data/cli/compare/virt-install-singleton-config-1.xml | 1 + + tests/test_cli.py | 2 +- + virtinst/cli.py | 1 + + virtinst/domain/resource.py | 3 ++- + 4 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tests/data/cli/compare/virt-install-singleton-config-1.xml b/tests/data/cli/compare/virt-install-singleton-config-1.xml +index 518a0099..b50d806e 100644 +--- a/tests/data/cli/compare/virt-install-singleton-config-1.xml ++++ b/tests/data/cli/compare/virt-install-singleton-config-1.xml +@@ -19,6 +19,7 @@ + + + /virtualmachines/production ++ + + + hvm +diff --git a/tests/test_cli.py b/tests/test_cli.py +index 4b714e3e..aba1fe3c 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -480,7 +480,7 @@ c.add_compare(""" + --memorybacking hugepages=on + --features apic=off + --clock offset=localtime +---resource /virtualmachines/production ++--resource /virtualmachines/production,fibrechannel.appid=myapplication + --events on_crash=restart + --metadata genid_enable=yes + --sysinfo host +diff --git a/virtinst/cli.py b/virtinst/cli.py +index 8e5b13cd..e1a988f9 100644 +--- a/virtinst/cli.py ++++ b/virtinst/cli.py +@@ -1999,6 +1999,7 @@ class ParserResource(VirtCLIParser): + def _init_class(cls, **kwargs): + VirtCLIParser._init_class(**kwargs) + cls.add_arg("partition", "partition") ++ cls.add_arg("fibrechannel.appid", "fibrechannel_appid", can_comma=True) + + + ###################### +diff --git a/virtinst/domain/resource.py b/virtinst/domain/resource.py +index d0962db9..8ad3df54 100644 +--- a/virtinst/domain/resource.py ++++ b/virtinst/domain/resource.py +@@ -14,6 +14,7 @@ class DomainResource(XMLBuilder): + """ + + XML_NAME = "resource" +- _XML_PROP_ORDER = ["partition"] ++ _XML_PROP_ORDER = ["partition", "fibrechannel_appid"] + + partition = XMLProperty("./partition") ++ fibrechannel_appid = XMLProperty("./fibrechannel/@appid") +-- +2.31.1 + diff --git a/virt-manager-hostdev-use-method-get_mdev_uuid.patch b/virt-manager-hostdev-use-method-get_mdev_uuid.patch new file mode 100644 index 0000000000000000000000000000000000000000..aeb588008807d6709502233534827499aef7a8ac --- /dev/null +++ b/virt-manager-hostdev-use-method-get_mdev_uuid.patch @@ -0,0 +1,35 @@ +From 1bba2d4e7de4a921921f2ae5d0d09589a180b70b Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Mon, 31 May 2021 21:54:27 +0200 +Subject: [PATCH] hostdev: use method get_mdev_uuid() + +Use method get_mdev_uuid() to retrieve the UUID of MDEV node device +object. + +Reviewed-by: Cole Robinson +Signed-off-by: Shalini Chellathurai Saroja + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995131 + +(cherry picked from commit f87e96d3d40891f1403601abc389c24800ba1069) +Signed-off-by: Jonathon Jongsma +--- + virtinst/devices/hostdev.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py +index e8d0fae2..b3717430 100644 +--- a/virtinst/devices/hostdev.py ++++ b/virtinst/devices/hostdev.py +@@ -78,7 +78,7 @@ class DeviceHostdev(Device): + _("Don't know how to generate nodedev for mdev type id '%s'") % + nodedev.type_id) + +- self.uuid = nodedev.name[5:].replace('_', '-') ++ self.uuid = nodedev.get_mdev_uuid() + + else: + raise ValueError(_("Unknown node device type %s") % nodedev) +-- +2.31.1 + diff --git a/virt-manager-installer-Prefer-xorrisofs-over-genisoimage-mkisofs.patch b/virt-manager-installer-Prefer-xorrisofs-over-genisoimage-mkisofs.patch new file mode 100644 index 0000000000000000000000000000000000000000..2fbe60b94abad63fd15d74321c7406590908db83 --- /dev/null +++ b/virt-manager-installer-Prefer-xorrisofs-over-genisoimage-mkisofs.patch @@ -0,0 +1,43 @@ +From 89766dae2418fb8fd9d54b7ce1d93a11d5faecdd Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Wed, 7 Apr 2021 09:37:53 -0400 +Subject: [PATCH] installer: Prefer xorrisofs over genisoimage/mkisofs + +Apparently it's the most likely version to exist in distros these +days. Particularly the other options may not be shipped in stock +RHEL9 + +Signed-off-by: Cole Robinson +(cherry picked from commit 3785abc6f0cb07c02ecc55760547a6f425513915) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973236 + +Signed-off-by: Jonathon Jongsma +--- + virtinst/install/installerinject.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/virtinst/install/installerinject.py b/virtinst/install/installerinject.py +index 29150c8e..97742f6a 100644 +--- a/virtinst/install/installerinject.py ++++ b/virtinst/install/installerinject.py +@@ -45,10 +45,12 @@ def _run_initrd_commands(initrd, tempdir): + + + def _run_iso_commands(iso, tempdir, cloudinit=False): +- # Some distros do not link mkisofs to genisoimage (or vice-versa). As a +- # result of this, we have to actually check for both programs and use the +- # most appropriate one. +- programs = ["genisoimage", "mkisofs"] ++ # These three programs all behave similarly for our needs, and ++ # different distros only have some available. xorriso is apparently ++ # the actively maintained variant that should be available everywhere ++ # and without any license issues. Some more info here: ++ # https://wiki.debian.org/genisoimage ++ programs = ["xorrisofs", "genisoimage", "mkisofs"] + for program in programs: + if shutil.which(program): + break +-- +2.31.1 + diff --git a/virt-manager-man-fix-default-value-for-filesystem-accessmode-option.patch b/virt-manager-man-fix-default-value-for-filesystem-accessmode-option.patch new file mode 100644 index 0000000000000000000000000000000000000000..3e3ce5f174d2cd296d64f5bc7bfc5e7503d00323 --- /dev/null +++ b/virt-manager-man-fix-default-value-for-filesystem-accessmode-option.patch @@ -0,0 +1,35 @@ +From 63a722890fa74f1f79346ebc2c4e158882d2bc0f Mon Sep 17 00:00:00 2001 +From: Jonathon Jongsma +Date: Tue, 8 Feb 2022 12:59:11 -0600 +Subject: [PATCH] man: fix default value for filesystem accessmode option + +Commit 85307b9bd2971cfc972c976c78e411f018647861 changed the default +value for 'accessmode' from 'passthrough' to 'mapped', but forgot to +update the documentation in the man page. + +Signed-off-by: Jonathon Jongsma +(cherry picked from commit 17cd4477b8b18051c5bc4d57da5ca611cfd2d372) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045932 + +Signed-off-by: Jonathon Jongsma +--- + man/virt-install.rst | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/virt-install.rst b/man/virt-install.rst +index f75af635..e97a2266 100644 +--- a/man/virt-install.rst ++++ b/man/virt-install.rst +@@ -1197,7 +1197,7 @@ Some example suboptions: + + ``accessmode`` or ``mode`` + The access mode for the source directory from the guest OS. Only used with +- QEMU and type=mount. Valid modes are 'passthrough' (the default), 'mapped', ++ QEMU and type=mount. Valid modes are 'mapped' (the default), 'passthrough', + or 'squash'. See libvirt domain XML documentation for more info. + + ``source`` +-- +2.34.1 + diff --git a/virt-manager-nodedev-Improve-error-with-unknown-address-strings.patch b/virt-manager-nodedev-Improve-error-with-unknown-address-strings.patch new file mode 100644 index 0000000000000000000000000000000000000000..17ca6c40335e329c656427b2335ea0457d50d062 --- /dev/null +++ b/virt-manager-nodedev-Improve-error-with-unknown-address-strings.patch @@ -0,0 +1,32 @@ +From 6cdb34eb04e17315cfc7ee7cf6538bc6370c8d8b Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Tue, 11 Jan 2022 11:39:29 -0500 +Subject: [PATCH] nodedev: Improve error with unknown address strings + +Signed-off-by: Cole Robinson +(cherry picked from commit ed7b8769c4d48c89ed593138171bc8dbb1ead108) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2017840 + +Signed-off-by: Jonathon Jongsma +--- + virtinst/nodedev.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py +index 248723b9..f0bc769b 100644 +--- a/virtinst/nodedev.py ++++ b/virtinst/nodedev.py +@@ -235,7 +235,8 @@ def _AddressStringToHostdev(conn, addrstr): + hostdev.bus = bus + hostdev.device = device + else: +- raise RuntimeError("Unknown address type") ++ raise RuntimeError( ++ "Unknown hostdev address string format '%s'" % addrstr) + except Exception: + log.debug("Error parsing node device string.", exc_info=True) + raise +-- +2.34.1 + diff --git a/virt-manager-tests-verify-MDEV-support.patch b/virt-manager-tests-verify-MDEV-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..21538e4caea1bbf71abcbd98419a30823fe70c75 --- /dev/null +++ b/virt-manager-tests-verify-MDEV-support.patch @@ -0,0 +1,230 @@ +From bbf159da53b34060ae8e5f3023a78a541fec333a Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Mon, 31 May 2021 21:54:28 +0200 +Subject: [PATCH] tests: verify MDEV support + +Add tests to verify add, edit and remove features of mediated +devices. + +Reviewed-by: Cole Robinson +Signed-off-by: Shalini Chellathurai Saroja + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995131 + +(cherry picked from commit 9d4002ee0f7088c490748ffb3144c006f4e39c68) +Signed-off-by: Jonathon Jongsma +--- + .../virt-xml-add-hostdev-mdev-start.xml | 12 +++++++ + .../cli/compare/virt-xml-add-hostdev-mdev.xml | 14 ++++++++ + tests/data/cli/compare/virt-xml-edit-all.xml | 7 ++++ + .../compare/virt-xml-edit-hostdev-mdev.xml | 11 +++++++ + .../compare/virt-xml-edit-simple-redirdev.xml | 2 +- + .../compare/virt-xml-remove-hostdev-mdev.xml | 15 +++++++++ + tests/data/testdriver/testsuite.xml | 32 +++++++++++++++++++ + tests/test_cli.py | 4 +++ + tests/utils.py | 2 +- + 9 files changed, 97 insertions(+), 2 deletions(-) + create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml + create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml + create mode 100644 tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml + create mode 100644 tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml + +diff --git a/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml b/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml +new file mode 100644 +index 00000000..3742d454 +--- /dev/null ++++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml +@@ -0,0 +1,12 @@ ++ ++ ++ +++ +++ +++
+++ +++ ++ ++ ++ ++Domain 'test-state-shutoff' started successfully. +diff --git a/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml +new file mode 100644 +index 00000000..c2acff8f +--- /dev/null ++++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml +@@ -0,0 +1,14 @@ ++ ++ ++ +++ +++ +++
+++ +++ ++ ++ ++ ++ ++Domain 'test-for-virtxml' defined successfully. ++Changes will take effect after the domain is fully powered off. +diff --git a/tests/data/cli/compare/virt-xml-edit-all.xml b/tests/data/cli/compare/virt-xml-edit-all.xml +index ed09effc..5bdee2aa 100644 +--- a/tests/data/cli/compare/virt-xml-edit-all.xml ++++ b/tests/data/cli/compare/virt-xml-edit-all.xml +@@ -8,6 +8,13 @@ +
+ + +++ ++ ++ ++ ++
++ ++
+ + + + +diff --git a/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml +new file mode 100644 +index 00000000..ef5523db +--- /dev/null ++++ b/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml +@@ -0,0 +1,11 @@ ++ ++
++ ++-
+++
++ ++ ++ ++ ++Domain 'test-for-virtxml' defined successfully. ++Changes will take effect after the domain is fully powered off. +diff --git a/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml b/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml +index 52ffddfe..f1a0ff6c 100644 +--- a/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml ++++ b/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml +@@ -1,5 +1,5 @@ + +- ++
+ + - + - +diff --git a/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml +new file mode 100644 +index 00000000..d4c33804 +--- /dev/null ++++ b/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml +@@ -0,0 +1,15 @@ ++ ++ ++ ++- ++- ++-
++- ++-
++- ++ ++ ++ ++ ++Domain 'test-for-virtxml' defined successfully. ++Changes will take effect after the domain is fully powered off. +diff --git a/tests/data/testdriver/testsuite.xml b/tests/data/testdriver/testsuite.xml +index fd255138..a073cbce 100644 +--- a/tests/data/testdriver/testsuite.xml ++++ b/tests/data/testdriver/testsuite.xml +@@ -259,6 +259,12 @@ + + + ++ ++ ++
++ ++
++ + + + +@@ -737,5 +743,31 @@ + + + ++ ++ mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110 ++ /sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110 ++ css_0_0_0023 ++ ++ vfio_mdev ++ ++ ++ ++ ++ ++ ++ ++ ++ mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496 ++ /sys/devices/css0/0.0.0023/b1ae8bf6-38b0-4c81-9d44-78ce3f520496 ++ css_0_0_0023 ++ ++ vfio_mdev ++ ++ ++ ++ ++ ++ ++ + + +diff --git a/tests/test_cli.py b/tests/test_cli.py +index 092e087a..4b714e3e 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -1274,6 +1274,7 @@ c.add_compare("--edit mac=00:11:7f:33:44:55 --network target=nic55", "edit-selec + c.add_compare("--edit target=hda --disk boot_order=1", "edit-select-disk-bootorder") + c.add_compare("--edit path=/dev/null --disk path=,target=fdb,boot_order=12", "edit-disk-unset") # --disk matching, using empty value to unset path + c.add_compare("--edit --memballoon none", "edit-disable-memballoon") ++c.add_compare("--edit address.devno=0x0002 --hostdev address.devno=0x0008", "edit-hostdev-mdev") + + c = vixml.add_category("edit and start selection", "test-state-shutoff --print-diff --start") + c.add_compare("--define --edit target=vda --disk boot_order=1", "start-select-disk-bootorder") +@@ -1308,6 +1309,8 @@ c.add_compare("--remove-device --disk /dev/null", "remove-disk-path") + c.add_compare("--remove-device --video all", "remove-video-all") + c.add_compare("--remove-device --host-device 0x04b3:0x4485", "remove-hostdev-name") + c.add_compare("--remove-device --memballoon all", "remove-memballoon") ++c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev") ++c.add_compare("--remove-device --hostdev mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496", "remove-hostdev-mdev") + + c = vixml.add_category("add/rm devices and start", "test-state-shutoff --print-diff --start") + c.add_invalid("--add-device --pm suspend_to_disk=yes") # --add-device without a device +@@ -1318,6 +1321,7 @@ c.add_compare("--define --add-device --host-device usb_device_4b3_4485_noserial" + c.add_compare("--add-device --disk %(EXISTIMG1)s,bus=virtio,target=vdf", "add-disk-basic-start") + c.add_compare("--add-device --disk %(NEWIMG1)s,size=.01", "add-disk-create-storage-start") + c.add_compare("--remove-device --disk /dev/null", "remove-disk-path-start") ++c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev-start") + + c = vixml.add_category("add/rm devices OS KVM", "--connect %(URI-KVM)s test --print-diff --define") + c.add_compare("--add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS (none) from XML +diff --git a/tests/utils.py b/tests/utils.py +index 16ba26b4..62443ca8 100644 +--- a/tests/utils.py ++++ b/tests/utils.py +@@ -231,7 +231,7 @@ def diff_compare(actual_out, filename=None, expect_out=None): + open(filename, "w").write(actual_out) + expect_out = open(filename).read() + +- diff = xmlutil.diff(expect_out, actual_out, ++ diff = xmlutil.diff(expect_out.rstrip(), actual_out.rstrip(), + filename or '', "Generated output") + if diff: + raise AssertionError("Conversion outputs did not match.\n%s" % diff) +-- +2.31.1 + diff --git a/virt-manager-urlfetcher-Add-xorriso-ISOReader-implementation.patch b/virt-manager-urlfetcher-Add-xorriso-ISOReader-implementation.patch new file mode 100644 index 0000000000000000000000000000000000000000..3521d45dbb3663024301388482c3c0f2d133d21b --- /dev/null +++ b/virt-manager-urlfetcher-Add-xorriso-ISOReader-implementation.patch @@ -0,0 +1,200 @@ +From 2bda38a197a780a85e9ce448ea81a81fe866c981 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Wed, 7 Apr 2021 11:45:00 -0400 +Subject: [PATCH] urlfetcher: Add xorriso ISOReader implementation + +xorisso is the still maintained isoinfo alternative, and may be +the only iso reading tool in RHEL9, so we need to support it. +Make it the default for our spec file and test suite too + +Signed-off-by: Cole Robinson +(cherry picked from commit f793986378f84bb409d2451bdb62ca08fd4cb5b4) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973236 + +Signed-off-by: Jonathon Jongsma +--- + man/virt-install.rst | 2 +- + tests/test_cli.py | 12 ++++----- + virt-manager.spec | 4 +-- + virtinst/install/urldetect.py | 4 +-- + virtinst/install/urlfetcher.py | 48 +++++++++++++++++++++++++--------- + 5 files changed, 47 insertions(+), 23 deletions(-) + +diff --git a/man/virt-install.rst b/man/virt-install.rst +index 963f9564..f75af635 100644 +--- a/man/virt-install.rst ++++ b/man/virt-install.rst +@@ -617,7 +617,7 @@ ftp://host/path + An FTP server location containing an installable distribution image. + + ISO +- Probe the ISO and extract files using 'isoinfo' ++ Extract files directly from the ISO path + + DIRECTORY + Path to a local directory containing an installable distribution image. +diff --git a/tests/test_cli.py b/tests/test_cli.py +index 5e69a135..3534e0e2 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -39,7 +39,7 @@ MEDIA_DIR = os.path.relpath(utils.DATADIR + "/fakemedia", utils.TOPDIR) + UNATTENDED_DIR = XMLDIR + "/unattended" + OLD_OSINFO = utils.has_old_osinfo() + NO_OSINFO_UNATTEND = not unattended.OSInstallScript.have_new_libosinfo() +-HAS_ISOINFO = shutil.which("isoinfo") ++HAS_xorriso = shutil.which("xorriso") + + # We use this check as a surrogate for a released libosinfo with a bug + # fix we need to get full test coverage +@@ -100,9 +100,9 @@ def has_old_osinfo(): + return "osinfo is too old" + + +-def missing_isoinfo(): +- if not HAS_ISOINFO: +- return "isoinfo not installed" ++def missing_xorriso(): ++ if not HAS_xorriso: ++ return "xorriso not installed" + + + def no_osinfo_unattend_cb(): +@@ -995,8 +995,8 @@ c.add_compare("--connect " + utils.URIs.kvm_session + " --disk size=8 --os-varia + c.add_valid("--connect " + utils.URIs.kvm_session + " --install fedora21", prerun_check=has_old_osinfo) # hits some get_search_paths and media_upload code paths + + # misc KVM config tests +-c.add_compare("--disk none --location %(ISO-NO-OS)s,kernel=frib.img,initrd=/frob.img", "location-manual-kernel", prerun_check=missing_isoinfo) # --location with an unknown ISO but manually specified kernel paths +-c.add_compare("--disk %(EXISTIMG1)s --location %(ISOTREE)s --nonetworks", "location-iso", prerun_check=missing_isoinfo) # Using --location iso mounting ++c.add_compare("--disk none --location %(ISO-NO-OS)s,kernel=frib.img,initrd=/frob.img", "location-manual-kernel", prerun_check=missing_xorriso) # --location with an unknown ISO but manually specified kernel paths ++c.add_compare("--disk %(EXISTIMG1)s --location %(ISOTREE)s --nonetworks", "location-iso", prerun_check=missing_xorriso) # Using --location iso mounting + c.add_compare("--disk %(EXISTIMG1)s --cdrom %(ISOLABEL)s", "cdrom-centos-label") # Using --cdrom with centos CD label, should use virtio etc. + c.add_compare("--disk %(EXISTIMG1)s --install bootdev=network --os-variant rhel5.4 --cloud-init none", "kvm-rhel5") # RHEL5 defaults + c.add_compare("--disk %(EXISTIMG1)s --install kernel=%(ISO-WIN7)s,initrd=%(ISOLABEL)s,kernel_args='foo bar' --os-variant rhel6.4 --unattended none", "kvm-rhel6") # RHEL6 defaults. ISO paths are just to point at existing files +diff --git a/virt-manager.spec b/virt-manager.spec +index f523551b..3946c300 100644 +--- a/virt-manager.spec ++++ b/virt-manager.spec +@@ -71,8 +71,8 @@ Requires: python3-requests + Requires: libosinfo >= 0.2.10 + # Required for gobject-introspection infrastructure + Requires: python3-gobject-base +-# Required for pulling files from iso media with isoinfo +-Requires: genisoimage ++# Required for pulling files from iso media ++Requires: xorriso + + %description common + Common files used by the different virt-manager interfaces, as well as +diff --git a/virtinst/install/urldetect.py b/virtinst/install/urldetect.py +index a73b0bf1..f5ed0270 100644 +--- a/virtinst/install/urldetect.py ++++ b/virtinst/install/urldetect.py +@@ -40,9 +40,9 @@ class _DistroCache(object): + if path not in self._filecache: + try: + content = self._fetcher.acquireFileContent(path) +- except ValueError: ++ except ValueError as e: + content = None +- log.debug("Failed to acquire file=%s", path) ++ log.debug("Failed to acquire file=%s: %s", path, e) + self._filecache[path] = content + return self._filecache[path] + +diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py +index 3cacab1a..835c9e40 100644 +--- a/virtinst/install/urlfetcher.py ++++ b/virtinst/install/urlfetcher.py +@@ -26,7 +26,7 @@ class _ISOReader: + def __init__(self, location): + self._location = location + +- def grabFile(self, url): ++ def grabFile(self, url, scratchdir): + raise NotImplementedError() + def hasFile(self, url): + raise NotImplementedError() +@@ -43,20 +43,50 @@ class _ISOinfoReader(_ISOReader): + def _make_file_list(self): + cmd = ["isoinfo", "-J", "-i", self._location, "-f"] + +- log.debug("Running isoinfo: %s", cmd) ++ log.debug("Generating iso filelist: %s", cmd) + output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) + return output.splitlines(False) + +- def grabFile(self, url): ++ def grabFile(self, url, scratchdir): ++ ignore = scratchdir + cmd = ["isoinfo", "-J", "-i", self._location, "-x", url] + +- log.debug("Running isoinfo: %s", cmd) ++ log.debug("Extracting iso file: %s", cmd) + return subprocess.check_output(cmd) + + def hasFile(self, url): + return url.encode("ascii") in self._cache_file_list + + ++class _XorrisoReader(_ISOReader): ++ def __init__(self, location): ++ super().__init__(location) ++ self._cache_file_list = self._make_file_list() ++ ++ def _make_file_list(self): ++ delim = "VIRTINST_BEGINLIST" ++ cmd = ["xorriso", "-indev", self._location, "-print", delim, "-find"] ++ ++ log.debug("Generating iso filelist: %s", cmd) ++ output = subprocess.check_output(cmd, ++ stderr=subprocess.DEVNULL, text=True) ++ return output.split(delim, 1)[1].strip().splitlines() ++ ++ def grabFile(self, url, scratchdir): ++ tmp = tempfile.NamedTemporaryFile( ++ prefix="virtinst-iso", suffix="-" + os.path.basename(url), ++ dir=scratchdir) ++ ++ cmd = ["xorriso", "-osirrox", "on", "-indev", self._location, ++ "-extract", url, tmp.name] ++ log.debug("Extracting iso file: %s", cmd) ++ subprocess.check_output(cmd) ++ return open(tmp.name, "rb").read() ++ ++ def hasFile(self, url): ++ return ("'.%s'" % url) in self._cache_file_list ++ ++ + ########################### + # Fetcher implementations # + ########################### +@@ -349,23 +379,17 @@ class _ISOURLFetcher(_URLFetcher): + + def _get_isoreader(self): + if not self._isoreader: +- self._isoreader = _ISOinfoReader(self.location) ++ self._isoreader = _XorrisoReader(self.location) + return self._isoreader + + def _grabber(self, url): +- """ +- Use isoinfo to grab the file +- """ + if not self._hasFile(url): + raise RuntimeError("iso doesn't have file=%s" % url) + +- output = self._get_isoreader().grabFile(url) ++ output = self._get_isoreader().grabFile(url, self.scratchdir) + return io.BytesIO(output), len(output) + + def _hasFile(self, url): +- """ +- Use isoinfo to list and search for the file +- """ + return self._get_isoreader().hasFile(url) + + +-- +2.31.1 + diff --git a/virt-manager-urlfetcher-Delete-the-isoinfo-ISOReader.patch b/virt-manager-urlfetcher-Delete-the-isoinfo-ISOReader.patch new file mode 100644 index 0000000000000000000000000000000000000000..93fb64c0c95c53a8f0f400f771a6e0f3fcdf2c81 --- /dev/null +++ b/virt-manager-urlfetcher-Delete-the-isoinfo-ISOReader.patch @@ -0,0 +1,78 @@ +From a3017ef3d61139362482d5f3c5d6bf056fe6fb6e Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Sat, 22 May 2021 12:18:22 -0400 +Subject: [PATCH] urlfetcher: Delete the 'isoinfo' ISOReader + +We didn't delete this in the last commit, mostly to make it easier +to revert this commit if it turns out we need to support both isoinfo +and xorriso. Right now I don't know of any reason why that should +be necessary but time will tell. + +If we do go that route it will take more work to teach urlfetcher +to dynamically detect the presence of one or the other, along with +similar tweaks. + +Signed-off-by: Cole Robinson +(cherry picked from commit 08d1a6a2ddd18f88222f9fdffa3f60f42a40bc67) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973236 + +Signed-off-by: Jonathon Jongsma +--- + virtinst/install/urlfetcher.py | 38 +--------------------------------- + 1 file changed, 1 insertion(+), 37 deletions(-) + +diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py +index 835c9e40..838a206a 100644 +--- a/virtinst/install/urlfetcher.py ++++ b/virtinst/install/urlfetcher.py +@@ -22,45 +22,9 @@ from ..logger import log + # isoreader abstraction # + ######################### + +-class _ISOReader: ++class _XorrisoReader(): + def __init__(self, location): + self._location = location +- +- def grabFile(self, url, scratchdir): +- raise NotImplementedError() +- def hasFile(self, url): +- raise NotImplementedError() +- +- +-class _ISOinfoReader(_ISOReader): +- """ +- Handle reading reading files off an iso +- """ +- def __init__(self, location): +- super().__init__(location) +- self._cache_file_list = self._make_file_list() +- +- def _make_file_list(self): +- cmd = ["isoinfo", "-J", "-i", self._location, "-f"] +- +- log.debug("Generating iso filelist: %s", cmd) +- output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) +- return output.splitlines(False) +- +- def grabFile(self, url, scratchdir): +- ignore = scratchdir +- cmd = ["isoinfo", "-J", "-i", self._location, "-x", url] +- +- log.debug("Extracting iso file: %s", cmd) +- return subprocess.check_output(cmd) +- +- def hasFile(self, url): +- return url.encode("ascii") in self._cache_file_list +- +- +-class _XorrisoReader(_ISOReader): +- def __init__(self, location): +- super().__init__(location) + self._cache_file_list = self._make_file_list() + + def _make_file_list(self): +-- +2.31.1 + diff --git a/virt-manager-urlfetcher-Factor-out-ISOReader-class.patch b/virt-manager-urlfetcher-Factor-out-ISOReader-class.patch new file mode 100644 index 0000000000000000000000000000000000000000..c824c07de429ab7ae7e14576b827aab6b7130897 --- /dev/null +++ b/virt-manager-urlfetcher-Factor-out-ISOReader-class.patch @@ -0,0 +1,120 @@ +From dae2f3471a56f3967952e6951f60f523060c89a0 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Wed, 7 Apr 2021 09:51:41 -0400 +Subject: [PATCH] urlfetcher: Factor out ISOReader class + +This contains all the isoinfo command logic. This will be used +to add an xorriso backend as well + +Signed-off-by: Cole Robinson +(cherry picked from commit b13b5e0f5edf8efabae643d28f12693f43f094db) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973236 + +Signed-off-by: Jonathon Jongsma +--- + virtinst/install/urlfetcher.py | 64 +++++++++++++++++++++++++--------- + 1 file changed, 48 insertions(+), 16 deletions(-) + +diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py +index f531fe50..3cacab1a 100644 +--- a/virtinst/install/urlfetcher.py ++++ b/virtinst/install/urlfetcher.py +@@ -18,6 +18,45 @@ import requests + from ..logger import log + + ++######################### ++# isoreader abstraction # ++######################### ++ ++class _ISOReader: ++ def __init__(self, location): ++ self._location = location ++ ++ def grabFile(self, url): ++ raise NotImplementedError() ++ def hasFile(self, url): ++ raise NotImplementedError() ++ ++ ++class _ISOinfoReader(_ISOReader): ++ """ ++ Handle reading reading files off an iso ++ """ ++ def __init__(self, location): ++ super().__init__(location) ++ self._cache_file_list = self._make_file_list() ++ ++ def _make_file_list(self): ++ cmd = ["isoinfo", "-J", "-i", self._location, "-f"] ++ ++ log.debug("Running isoinfo: %s", cmd) ++ output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) ++ return output.splitlines(False) ++ ++ def grabFile(self, url): ++ cmd = ["isoinfo", "-J", "-i", self._location, "-x", url] ++ ++ log.debug("Running isoinfo: %s", cmd) ++ return subprocess.check_output(cmd) ++ ++ def hasFile(self, url): ++ return url.encode("ascii") in self._cache_file_list ++ ++ + ########################### + # Fetcher implementations # + ########################### +@@ -302,39 +341,32 @@ class _LocalURLFetcher(_URLFetcher): + + + class _ISOURLFetcher(_URLFetcher): +- _cache_file_list = None ++ _isoreader = None + _is_iso = True + + def _make_full_url(self, filename): + return os.path.join("/", filename) + ++ def _get_isoreader(self): ++ if not self._isoreader: ++ self._isoreader = _ISOinfoReader(self.location) ++ return self._isoreader ++ + def _grabber(self, url): + """ + Use isoinfo to grab the file + """ + if not self._hasFile(url): +- raise RuntimeError("isoinfo didn't find file=%s" % url) +- +- cmd = ["isoinfo", "-J", "-i", self.location, "-x", url] +- +- log.debug("Running isoinfo: %s", cmd) +- output = subprocess.check_output(cmd) ++ raise RuntimeError("iso doesn't have file=%s" % url) + ++ output = self._get_isoreader().grabFile(url) + return io.BytesIO(output), len(output) + + def _hasFile(self, url): + """ + Use isoinfo to list and search for the file + """ +- if not self._cache_file_list: +- cmd = ["isoinfo", "-J", "-i", self.location, "-f"] +- +- log.debug("Running isoinfo: %s", cmd) +- output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) +- +- self._cache_file_list = output.splitlines(False) +- +- return url.encode("ascii") in self._cache_file_list ++ return self._get_isoreader().hasFile(url) + + + class DirectFetcher(_URLFetcher): +-- +2.31.1 + diff --git a/virt-manager-urlfetcher-Silence-xorisso-stderr-output.patch b/virt-manager-urlfetcher-Silence-xorisso-stderr-output.patch new file mode 100644 index 0000000000000000000000000000000000000000..362db10f0d1effe9e995189922c0770292c5aa92 --- /dev/null +++ b/virt-manager-urlfetcher-Silence-xorisso-stderr-output.patch @@ -0,0 +1,31 @@ +From 900413f1fccc3a4f64f66066d851e3a03b821156 Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Fri, 30 Jul 2021 10:45:07 -0400 +Subject: [PATCH] urlfetcher: Silence xorisso stderr output + +Signed-off-by: Cole Robinson +(cherry picked from commit 8754a59d9228caacf43bcb1af6ad307da7217b09) + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973236 + +Signed-off-by: Jonathon Jongsma +--- + virtinst/install/urlfetcher.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py +index 838a206a..67a68002 100644 +--- a/virtinst/install/urlfetcher.py ++++ b/virtinst/install/urlfetcher.py +@@ -44,7 +44,7 @@ class _XorrisoReader(): + cmd = ["xorriso", "-osirrox", "on", "-indev", self._location, + "-extract", url, tmp.name] + log.debug("Extracting iso file: %s", cmd) +- subprocess.check_output(cmd) ++ subprocess.check_output(cmd, stderr=subprocess.DEVNULL) + return open(tmp.name, "rb").read() + + def hasFile(self, url): +-- +2.31.1 + diff --git a/virt-manager-virt-install-add-mediated-device.patch b/virt-manager-virt-install-add-mediated-device.patch new file mode 100644 index 0000000000000000000000000000000000000000..1b7c408ab5efa740e3ab55fe5ceedb766c748a7d --- /dev/null +++ b/virt-manager-virt-install-add-mediated-device.patch @@ -0,0 +1,256 @@ +From 06f12e246c206311bc5d7fcbd24ac02df1e3fff9 Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Wed, 14 Apr 2021 17:18:55 +0200 +Subject: [PATCH] virt-install: add mediated device + +Add support to install a virtual server with passed-through mediated +device. Mediated device can be created using vGPU attached to +vfio_pci driver or DASD attached to vfio_ccw driver or APQNs attached +to vfio_ap driver. + +Reviewed-by: Cole Robinson +Signed-off-by: Shalini Chellathurai Saroja + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995131 + +(cherry picked from commit 965480e8bc85caf8a4f36b4a2f07963067b63cf6) +Signed-off-by: Jonathon Jongsma +--- + .../cli/compare/virt-install-many-devices.xml | 19 +++++++++ + tests/data/testdriver/testdriver.xml | 40 +++++++++++++++++++ + tests/test_cli.py | 3 ++ + tests/test_nodedev.py | 30 ++++++++++++++ + virtinst/devices/hostdev.py | 36 ++++++++++++++++- + virtinst/nodedev.py | 4 ++ + 6 files changed, 131 insertions(+), 1 deletion(-) + +diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml +index 49e9dcc7..3bd756b3 100644 +--- a/tests/data/cli/compare/virt-install-many-devices.xml ++++ b/tests/data/cli/compare/virt-install-many-devices.xml +@@ -592,6 +592,25 @@ + /dev/pty7 + + ++ ++
++ ++
++ ++ ++ ++ ++
++ ++ ++ ++
++ ++
++ ++
++ ++ + + + +diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml +index ea90f0f7..b8d67bac 100644 +--- a/tests/data/testdriver/testdriver.xml ++++ b/tests/data/testdriver/testdriver.xml +@@ -3645,5 +3645,45 @@ ba + + + ++ ++ mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110 ++ /sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110 ++ css_0_0_0023 ++ ++ vfio_mdev ++ ++ ++ ++ ++ ++ ++ ++ ++ mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9 ++ /sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9 ++ ap_matrix ++ ++ vfio_mdev ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ mdev_4b20d080_1b54_4048_85b3_a6a62d165c01 ++ /sys/devices/pci0000:00/0000:00:02.0/4b20d080-1b54-4048-85b3-a6a62d165c01 ++ pci_0000_06_00_0 ++ ++ vfio_mdev ++ ++ ++ ++ ++ ++ + + +diff --git a/tests/test_cli.py b/tests/test_cli.py +index 3534e0e2..092e087a 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -675,6 +675,9 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser + --hostdev wlan0,type=net + --hostdev /dev/vdz,type=storage + --hostdev /dev/pty7,type=misc ++--hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110,address.type=ccw,address.cssid=0xfe,address.ssid=0x1,address.devno=0x0008 ++--hostdev mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9 ++--hostdev mdev_4b20d080_1b54_4048_85b3_a6a62d165c01,address.type=pci,address.domain=0x0000,address.bus=0x01,address.slot=0x01,address.function=0x0,address.zpci.uid=0x0001,address.zpci.fid=0x00000001 + + + --filesystem /source,/target,alias.name=testfsalias,driver.ats=on,driver.iommu=off,driver.packed=on +diff --git a/tests/test_nodedev.py b/tests/test_nodedev.py +index 406e321f..79678bc8 100644 +--- a/tests/test_nodedev.py ++++ b/tests/test_nodedev.py +@@ -126,6 +126,36 @@ def testDRMDevice(): + assert dev.get_devnode("frob") + + ++def testDASDMdev(): ++ conn = utils.URIs.open_testdriver_cached() ++ devname = "mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110" ++ dev = _nodeDevFromName(conn, devname) ++ assert dev.name == devname ++ assert dev.parent == "css_0_0_0023" ++ assert dev.device_type == "mdev" ++ assert dev.type_id == "vfio_ccw-io" ++ ++ ++def testAPQNMdev(): ++ conn = utils.URIs.open_testdriver_cached() ++ devname = "mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9" ++ dev = _nodeDevFromName(conn, devname) ++ assert dev.name == devname ++ assert dev.parent == "ap_matrix" ++ assert dev.device_type == "mdev" ++ assert dev.type_id == "vfio_ap-passthrough" ++ ++ ++def testPCIMdev(): ++ conn = utils.URIs.open_testdriver_cached() ++ devname = "mdev_4b20d080_1b54_4048_85b3_a6a62d165c01" ++ dev = _nodeDevFromName(conn, devname) ++ assert dev.name == devname ++ assert dev.parent == "pci_0000_06_00_0" ++ assert dev.device_type == "mdev" ++ assert dev.type_id == "nvidia-11" ++ ++ + # NodeDevice 2 Device XML tests + + def testNodeDev2USB1(): +diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py +index 3e9de2ad..e8d0fae2 100644 +--- a/virtinst/devices/hostdev.py ++++ b/virtinst/devices/hostdev.py +@@ -4,6 +4,8 @@ + # This work is licensed under the GNU GPLv2 or later. + # See the COPYING file in the top-level directory. + ++import re ++ + from .device import Device + from ..nodedev import NodeDevice + from ..xmlbuilder import XMLProperty +@@ -53,16 +55,45 @@ class DeviceHostdev(Device): + self.scsi_unit = nodedev.lun + self.managed = False + ++ elif nodedev.device_type == nodedev.CAPABILITY_TYPE_MDEV: ++ self.type = "mdev" ++ ++ if nodedev.type_id == "vfio_ccw-io": ++ self.model = "vfio-ccw" ++ self.managed = "no" ++ ++ elif nodedev.type_id == "vfio_ap-passthrough": ++ self.model = "vfio-ap" ++ self.managed = "no" ++ ++ elif (re.match("^nvidia-[0-9]{2}", nodedev.type_id) or ++ re.match("^i915-GVTg_V[0-9]_[0-9]", nodedev.type_id)): ++ self.model = "vfio-pci" ++ self.managed = "yes" ++ self.display = "off" ++ self.ramfb = "off" ++ ++ else: ++ raise ValueError( # pragma: no cover ++ _("Don't know how to generate nodedev for mdev type id '%s'") % ++ nodedev.type_id) ++ ++ self.uuid = nodedev.name[5:].replace('_', '-') ++ + else: + raise ValueError(_("Unknown node device type %s") % nodedev) + + + _XML_PROP_ORDER = ["mode", "type", "managed", "vendor", "product", +- "domain", "bus", "slot", "function"] ++ "domain", "bus", "slot", "function", "model", ++ "display", "ramfb"] + + mode = XMLProperty("./@mode") + type = XMLProperty("./@type") + managed = XMLProperty("./@managed", is_yesno=True) ++ model = XMLProperty("./@model") ++ display = XMLProperty("./@display") ++ ramfb = XMLProperty("./@ramfb") + + vendor = XMLProperty("./source/vendor/@id") + product = XMLProperty("./source/product/@id") +@@ -92,6 +123,9 @@ class DeviceHostdev(Device): + # type=misc handling + storage_block = XMLProperty("./source/block") + ++ # type=mdev ++ uuid = XMLProperty("./source/address/@uuid") ++ + + ################## + # Default config # +diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py +index 9d2c8f10..97841794 100644 +--- a/virtinst/nodedev.py ++++ b/virtinst/nodedev.py +@@ -40,6 +40,7 @@ class NodeDevice(XMLBuilder): + CAPABILITY_TYPE_SCSIBUS = "scsi_host" + CAPABILITY_TYPE_SCSIDEV = "scsi" + CAPABILITY_TYPE_DRM = "drm" ++ CAPABILITY_TYPE_MDEV = "mdev" + + @staticmethod + def lookupNodedevFromString(conn, idstring): +@@ -168,6 +169,9 @@ class NodeDevice(XMLBuilder): + if len(self.devnodes) > 0: + return self.devnodes[0] + ++ # type='mdev' options ++ type_id = XMLProperty("./capability/type/@id") ++ + + def _AddressStringToHostdev(conn, addrstr): + from .devices import DeviceHostdev +-- +2.31.1 + diff --git a/virt-manager-virt-manager-enable-MDEV-support.patch b/virt-manager-virt-manager-enable-MDEV-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..02de13c9608e2d8c2fe4cdbe8dafb40bf79139c7 --- /dev/null +++ b/virt-manager-virt-manager-enable-MDEV-support.patch @@ -0,0 +1,164 @@ +From fe341d97aee2666dc378f89de4a957bc8ae35a21 Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Mon, 7 Jun 2021 11:34:21 +0200 +Subject: [PATCH] virt-manager: enable MDEV support + +Enable virt-manager GUI to support add, edit, remove, hot-plug and +hot-unplug of mediated devices (like DASDs, APQNs and PCIs) in virtual +server. + +It is not possible to edit MDEV when a virtual server is in +running state, as this is not supported by libvirt. + +Reviewed-by: Cole Robinson +Signed-off-by: Shalini Chellathurai Saroja + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995131 + +(cherry picked from commit 0e15cd51dfbdaa09f7d34ed1edce2f5416130361) +Signed-off-by: Jonathon Jongsma +--- + tests/data/testdriver/testdriver.xml | 39 ++++++++++++++++++++++++++++ + tests/uitests/test_addhardware.py | 6 +++++ + virtManager/addhardware.py | 19 +++++++++++++- + 3 files changed, 63 insertions(+), 1 deletion(-) + +diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml +index b8d67bac..5875732a 100644 +--- a/tests/data/testdriver/testdriver.xml ++++ b/tests/data/testdriver/testdriver.xml +@@ -3645,6 +3645,27 @@ ba + + + ++ ++ css_0_0_0023 ++ /sys/devices/css0/0.0.0023 ++ computer ++ ++ vfio_ccw ++ ++ ++ 0x0 ++ 0x0 ++ 0x0023 ++ ++ ++ I/O subchannel (Non-QDIO) ++ vfio-ccw ++ 0 ++ ++ ++ ++ ++ + + mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110 + /sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110 +@@ -3658,6 +3679,24 @@ ba + + + ++ ++ ap_matrix ++ /sys/devices/vfio_ap/matrix ++ computer ++ ++ vfio_ap ++ ++ ++ ++ ++ VFIO AP Passthrough Device ++ vfio-ap ++ 65536 ++ ++ ++ ++ ++ + + mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9 + /sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9 +diff --git a/tests/uitests/test_addhardware.py b/tests/uitests/test_addhardware.py +index ce3da57c..56acc2fa 100644 +--- a/tests/uitests/test_addhardware.py ++++ b/tests/uitests/test_addhardware.py +@@ -459,6 +459,12 @@ def testAddHosts(app): + app.click_alert_button("device is already in use by", "Yes") + lib.utils.check(lambda: details.active) + ++ # Add MDEV device ++ _open_addhw(app, details) ++ tab = _select_hw(addhw, "MDEV Host Device", "host-tab") ++ tab.find_fuzzy("mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", ++ "table cell").click() ++ _finish(addhw, check=details) + + + def testAddChars(app): +diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py +index cbf19f58..13b899c3 100644 +--- a/virtManager/addhardware.py ++++ b/virtManager/addhardware.py +@@ -249,6 +249,10 @@ class vmmAddHardware(vmmGObjectUI): + add_hw_option(_("PCI Host Device"), "system-run", PAGE_HOSTDEV, + nodedev_enabled, nodedev_errstr, "pci") + ++ add_hw_option(_("MDEV Host Device"), "system-run", PAGE_HOSTDEV, ++ self.conn.support.conn_nodedev(), ++ _("Connection does not support host device enumeration"), ++ "mdev") + add_hw_option(_("Video"), "video-display", PAGE_VIDEO, True, + _("Libvirt version does not support video devices.")) + add_hw_option(_("Watchdog"), "device_pci", PAGE_WATCHDOG, +@@ -656,6 +660,9 @@ class vmmAddHardware(vmmGObjectUI): + (dehex(hostdev.domain), dehex(hostdev.bus), + dehex(hostdev.slot), dehex(hostdev.function))) + ++ elif hostdev.uuid: ++ label += " %s" % (str(hostdev.uuid)) ++ + return label + + +@@ -775,6 +782,12 @@ class vmmAddHardware(vmmGObjectUI): + if dev.xmlobj.name == subdev.xmlobj.parent: + prettyname += " (%s)" % subdev.pretty_name() + ++ if devtype == "mdev": ++ for parentdev in self.conn.list_nodedevs(): ++ if dev.xmlobj.parent == parentdev.xmlobj.name: ++ prettyname = "%s %s" % ( ++ parentdev.pretty_name(), prettyname) ++ + model.append([dev.xmlobj, prettyname]) + + if len(model) == 0: +@@ -981,11 +994,13 @@ class vmmAddHardware(vmmGObjectUI): + + if page == PAGE_HOSTDEV: + # Need to do this here, since we share the hostdev page +- # between two different HW options ++ # between different HW options + row = self._get_hw_selection() + devtype = "usb_device" + if row and row[5] == "pci": + devtype = "pci" ++ if row and row[5] == "mdev": ++ devtype = "mdev" + self._populate_hostdev_model(devtype) + + if page == PAGE_CONTROLLER: +@@ -1036,6 +1051,8 @@ class vmmAddHardware(vmmGObjectUI): + row = self._get_hw_selection() + if row and row[5] == "pci": + return _("PCI Device") ++ if row and row[5] == "mdev": ++ return _("MDEV Device") + return _("USB Device") + + raise RuntimeError("Unknown page %s" % page) # pragma: no cover +-- +2.31.1 + diff --git a/virt-manager-virt-xml-add-support-for-mediated-devices.patch b/virt-manager-virt-xml-add-support-for-mediated-devices.patch new file mode 100644 index 0000000000000000000000000000000000000000..7ef886db0eaf437b174a5416d6c0f7e7940e52db --- /dev/null +++ b/virt-manager-virt-xml-add-support-for-mediated-devices.patch @@ -0,0 +1,77 @@ +From d4a11d8f8a0b7990c9d349da2306c7f4103a43e0 Mon Sep 17 00:00:00 2001 +From: Shalini Chellathurai Saroja +Date: Mon, 31 May 2021 21:54:26 +0200 +Subject: [PATCH] virt-xml: add support for mediated devices + +Provide support to add/remove MDEV in a guest domain, which is in +shut-off or running state (hotplug/unplug). Also support update of +already existing MDEV device, when the guest domain is in shut-off +state. Please note that libvirt does not support update of MDEV +device, when the guest domain is in running state. + +Reviewed-by: Cole Robinson +Signed-off-by: Shalini Chellathurai Saroja + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995131 + +(cherry picked from commit 9363e1e692bb0d01184ecc7991d61c95542f690b) +Signed-off-by: Jonathon Jongsma +--- + virtinst/nodedev.py | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py +index 97841794..f54a311c 100644 +--- a/virtinst/nodedev.py ++++ b/virtinst/nodedev.py +@@ -5,6 +5,7 @@ + # See the COPYING file in the top-level directory. + + import os ++import uuid + + from .logger import log + from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty +@@ -25,6 +26,16 @@ def _compare_int(nodedev_val, hostdev_val): + return (nodedev_val == hostdev_val or hostdev_val == -1) + + ++def _compare_uuid(nodedev_val, hostdev_val): ++ try: ++ nodedev_val = uuid.UUID(nodedev_val) ++ hostdev_val = uuid.UUID(hostdev_val) ++ except Exception: # pragma: no cover ++ return -1 ++ ++ return (nodedev_val == hostdev_val) ++ ++ + class DevNode(XMLBuilder): + XML_NAME = "devnode" + +@@ -82,6 +93,9 @@ class NodeDevice(XMLBuilder): + parent = XMLProperty("./parent") + device_type = XMLProperty("./capability/@type") + ++ def get_mdev_uuid(self): ++ return self.name[5:].replace('_', '-') ++ + def compare_to_hostdev(self, hostdev): + if self.device_type == "pci": + if hostdev.type != "pci": +@@ -101,6 +115,12 @@ class NodeDevice(XMLBuilder): + _compare_int(self.bus, hostdev.bus) and + _compare_int(self.device, hostdev.device)) + ++ if self.device_type == "mdev": ++ if hostdev.type != "mdev": ++ return False ++ ++ return _compare_uuid(self.get_mdev_uuid(), hostdev.uuid) ++ + return False + + +-- +2.31.1 + diff --git a/virt-manager.spec b/virt-manager.spec index 4bbf0ff265b7a0517508c8fb79b82ca717a0bc56..78b7acf9a00ee4dff70fb561923631d96950d49c 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,19 +1,38 @@ %global __python %{__python3} + Name: virt-manager -Version: 2.1.0 -Release: 6 +Version: 3.2.0 +Release: 1 Summary: The manage virtual machines tool which via libvirt. License: GPLv2+ BuildArch: noarch URL: https://virt-manager.org/ Source0: https://virt-manager.org/download/sources/virt-manager/virt-manager-%{version}.tar.gz -Patch0001: 0001-initrdinject-Use-full-option-versions-for-cpio.patch -Patch0002: 0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch -Patch0003: 0003-Improve-simplified-Chinese-translation.patch + +Patch1: 0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch +Patch2: virt-manager-installer-Prefer-xorrisofs-over-genisoimage-mkisofs.patch +Patch3: virt-manager-urlfetcher-Factor-out-ISOReader-class.patch +Patch4: virt-manager-urlfetcher-Add-xorriso-ISOReader-implementation.patch +Patch5: virt-manager-urlfetcher-Delete-the-isoinfo-ISOReader.patch +Patch6: virt-manager-urlfetcher-Silence-xorisso-stderr-output.patch +Patch7: virt-manager-virt-install-add-mediated-device.patch +Patch8: virt-manager-virt-xml-add-support-for-mediated-devices.patch +Patch9: virt-manager-hostdev-use-method-get_mdev_uuid.patch +Patch10: virt-manager-tests-verify-MDEV-support.patch +Patch11: virt-manager-virt-manager-enable-MDEV-support.patch +Patch12: virt-manager-cli-introduce-resource-fibrechannel.appid-option.patch +Patch13: virt-manager-Handle-new-nodedev-name-for-mediated-devices.patch +Patch14: virt-manager-cli-add-ioapic.driver-to-features.patch +Patch15: virt-manager-cli-filesystem-add-binary.sandbox.mode-and-source.socket.patch +Patch16: virt-manager-nodedev-Improve-error-with-unknown-address-strings.patch +Patch17: virt-manager-man-fix-default-value-for-filesystem-accessmode-option.patch + Requires: virt-manager-common = %{version}-%{release} python3-gobject gtk3 libvirt-glib >= 0.0.9 -Requires: gtk-vnc2 spice-gtk3 dconf vte291 +Requires: gtk-vnc2 dconf vte291 gtksourceview4 Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu) libvirt-daemon-config-network -BuildRequires: intltool /usr/bin/pod2man python3-devel +BuildRequires: git gettext python3-devel python3-docutils +Suggests: python3-libguestfs + %description The virtual machine management tool uses libvirt as the management API and provides @@ -24,7 +43,7 @@ resource usage and provide it to the virtual machine. %package common Summary: Files used for Virtual Machine Manager interfaces Requires: python3-argcomplete python3-libvirt python3-libxml2 python3-requests -Requires: libosinfo >= 0.2.10 python3-gobject-base genisoimage +Requires: libosinfo >= 0.2.10 python3-gobject-base xorriso %description common The files used by virt-manager interfaces, as virt-install related tools. @@ -32,7 +51,7 @@ The files used by virt-manager interfaces, as virt-install related tools. %package -n virt-install Summary: Utilities for installing virtual machines Requires: virt-manager-common = %{version}-%{release} libvirt-client -Provides: virt-install virt-clone virt-convert virt-xml +Provides: virt-install virt-clone virt-xml %description -n virt-install Package provides several command line utilities, including virt-clone (clone an @@ -49,7 +68,7 @@ Documentation for user of virt-manager. %autosetup -n virt-manager-%{version} -p1 %build -./setup.py configure --default-hvs "qemu,xen,lxc" +./setup.py configure --default-hvs "qemu,xen,lxc" --default-graphics=vnc %install ./setup.py --no-update-icon-cache --no-compile-schemas install -O1 --root=%{buildroot} @@ -64,16 +83,15 @@ done %{_datadir}/virt-manager/ui/*.ui %{_datadir}/virt-manager/{virt-manager,virtManager,icons} %{_datadir}/icons/hicolor/*/apps/* -%{_datadir}/appdata/virt-manager.appdata.xml %{_datadir}/applications/virt-manager.desktop %{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml +%{_datadir}/metainfo/virt-manager.appdata.xml %files common -f virt-manager.lang %dir %{_datadir}/virt-manager %{_datadir}/virt-manager/{virtcli,virtconv,virtinst} %files -n virt-install -%{_datadir}/virt-manager/{virt-install,virt-clone,virt-convert,virt-xml} %{_datadir}/bash-completion/completions/{virt-install,virt-clone,virt-convert,virt-xml} %{_bindir}/{virt-install,virt-clone,virt-convert,virt-xml} @@ -82,6 +100,9 @@ done %{_mandir}/man1/{virt-install.1*,virt-clone.1*,virt-convert.1*,virt-xml.1*} %changelog +* Mon May 30 2022 jiangxinyu - 3.2.0-1 +- Upgrade to 3.2.0 + * Thu Feb 17 2022 liuxingxiang - 2.1.0-6 - Improve simplified Chinese translation