virt-v2v fails to convert guests with e2fsck errors

resolves: RHEL-97600
This commit is contained in:
Richard W.M. Jones 2025-06-19 09:52:16 +01:00
parent 07ef6f05f1
commit 8f11161a77
14 changed files with 67 additions and 27 deletions

View File

@ -0,0 +1,37 @@
From 7266bd42f43817e090b15cb3b7abef06a1124bf4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 19 Jun 2025 08:58:35 +0100
Subject: [PATCH] convert: Replay dirty log for ext4 filesystems before running
e2fsck
As in commit 2e7c03b967 ("convert: Replay dirty log for XFS
filesystems before running xfs_repair"), we can repair dirty logs
which otherwise cause e2fsck to fail, by simply mounting and
unmounting the filesystem first.
e2fsck is supposed to be able to replay the dirty log, but apparently
it cannot, or cannot in all circumstances.
Reported-by: Ming Xie
Fixes: https://issues.redhat.com/browse/RHEL-97600
Fixes: commit 78ffb68d4f1ef8af776c24537feaf832fd3ec7e9
---
convert/convert.ml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/convert/convert.ml b/convert/convert.ml
index ad0b82b1..f8953dd7 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -258,6 +258,11 @@ and do_fsck ?(before=false) g =
);
| dev, "ext4" ->
+ if before then (
+ (* Replay and hence repair a dirty log (RHEL-97600) *)
+ Fun.protect ~finally:g#umount_all (fun () -> g#mount_ro dev "/");
+ );
+
g#e2fsck ~forceno:true dev
| dev, "xfs" ->

View File

@ -1,4 +1,4 @@
From b0bb9e507dbe07520ad0b2cd044a2f89469d5ad1 Mon Sep 17 00:00:00 2001
From a9cf6bac4934b50e706c953ca3b01537b8aa2bac Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 30 Aug 2015 03:21:57 -0400
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.
@ -19,7 +19,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1
7 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index ad0b82b1..6e14524f 100644
index f8953dd7..de207849 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -53,6 +53,7 @@ let rec convert input_disks options source =

View File

@ -1,4 +1,4 @@
From 123a4bd07bd63f33eb4ec91fa4ebde8973dfb149 Mon Sep 17 00:00:00 2001
From 6c9466c351ca8ac2360f467584f37a6c2057f738 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 28 Sep 2014 19:14:43 +0100
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode

View File

@ -1,4 +1,4 @@
From 86cfbc0abf57acd93ba3e5c7791322d30e320de0 Mon Sep 17 00:00:00 2001
From 7b79a043edb3df4569ece2d6c52e3f4d46835c67 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 30 Sep 2014 10:50:27 +0100
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option

View File

@ -1,4 +1,4 @@
From f648c3d8d70e8a91462ccc901bc63798196e9d14 Mon Sep 17 00:00:00 2001
From 69a712214ac449d2a5668c1ffa12e212f0e7d054 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Apr 2015 09:45:41 -0400
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu

View File

@ -1,4 +1,4 @@
From 08f16bebe9734aa3d5ebf4a6ea1cfb952777a40a Mon Sep 17 00:00:00 2001
From 253fb648d9f95e9c603c5032f0a0eb5c81d82ce8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 14:21:37 +0100
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)

View File

@ -1,4 +1,4 @@
From 95d248631071a22ad1d362b02202371b502aaa3f Mon Sep 17 00:00:00 2001
From b470480a45a055c69debf2ee39b2c8f3ad54d30b Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Tue, 26 Mar 2019 09:42:25 +0100
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests

View File

@ -1,4 +1,4 @@
From 632b140043f51126fcc52dd2a432eb27924a0e1e Mon Sep 17 00:00:00 2001
From 7dcb7bdfd889caa204f62c2e66b8ad2f12f8860f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 8 Jul 2024 09:35:54 +0100
Subject: [PATCH] RHEL: Remove input from Xen

View File

@ -1,4 +1,4 @@
From 44b8d14f356d9ba4e0e8a6c17b0b64f98394dada Mon Sep 17 00:00:00 2001
From 8f9d1822ea5b563cf43709e524a453103515bbee Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Jun 2021 11:15:52 +0100
Subject: [PATCH] RHEL: Remove -o glance

View File

@ -1,4 +1,4 @@
From 1d69b1369e2e90555511f95f67590970d2e24cb5 Mon Sep 17 00:00:00 2001
From e3d28c1c97771b8a4d6d08cd26c0c501f6785b54 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:58:09 +0100
Subject: [PATCH] RHEL: tests: Remove btrfs test

View File

@ -1,4 +1,4 @@
From 469b53b4f6451f21d31e162cd0c0d8afaff1930e Mon Sep 17 00:00:00 2001
From 111dceeee6c937797b7a2f73181cb5815b01f5ad Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 28 Apr 2023 12:28:19 +0100
Subject: [PATCH] RHEL: Remove --block-driver option

View File

@ -1,4 +1,4 @@
From 7442dc3c13348410ad56f2d9a90f0c3948e22119 Mon Sep 17 00:00:00 2001
From fdc8e7213c661be7afb41563397ab9ef8c637181 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 8 Jul 2024 09:56:54 +0100
Subject: [PATCH] RHEL: Remove -o ovirt, -o ovirt-upload and -o vdsm modes

View File

@ -1,4 +1,4 @@
From eb22fe315be71bcd836bdeb64253f0ea6477a690 Mon Sep 17 00:00:00 2001
From cc4a8129a2af033ce492303d3ca9dcb229aaff7e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 9 Jul 2024 11:30:09 +0100
Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported

View File

@ -7,7 +7,7 @@
Name: virt-v2v
Epoch: 1
Version: 2.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -27,18 +27,19 @@ Source3: copy-patches.sh
# https://github.com/libguestfs/virt-v2v/commits/rhel-10.1
# Patches.
Patch0001: 0001-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0002: 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0003: 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0004: 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0006: 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0007: 0007-RHEL-Remove-input-from-Xen.patch
Patch0008: 0008-RHEL-Remove-o-glance.patch
Patch0009: 0009-RHEL-tests-Remove-btrfs-test.patch
Patch0010: 0010-RHEL-Remove-block-driver-option.patch
Patch0011: 0011-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch
Patch0012: 0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0001: 0001-convert-Replay-dirty-log-for-ext4-filesystems-before.patch
Patch0002: 0002-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0003: 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0004: 0004-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0005: 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0008: 0008-RHEL-Remove-input-from-Xen.patch
Patch0009: 0009-RHEL-Remove-o-glance.patch
Patch0010: 0010-RHEL-tests-Remove-btrfs-test.patch
Patch0011: 0011-RHEL-Remove-block-driver-option.patch
Patch0012: 0012-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch
Patch0013: 0013-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
%if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no
@ -329,7 +330,7 @@ done
%changelog
* Thu Jun 12 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.8.0-1
* Thu Jun 19 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.8.0-2
- Rebase to virt-v2v 2.8.0
related: RHEL-81735
- Fix virt-v2v -v --install dnf5 error
@ -356,6 +357,8 @@ done
resolves: RHEL-91931
- virt-v2v fails to convert XFS guest with dirty filesystem
resolves: RHEL-95365
- virt-v2v fails to convert guests with e2fsck errors
resolves: RHEL-97600
* Tue Feb 11 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-4
- Rebase to virt-v2v 2.7.1