Andrey Drobyshev
2022-Dec-09 21:15 UTC
[Libguestfs] [v2v PATCH] convert_linux: add Rocky Linux to supported distros
Libguestfs commit 631962c0e88 ("Add detection support for Rocky Linux (CentOS/RHEL-like)") introduced Rocky support, so now inspector returns "rocky" in its i_distro field instead of just "redhat-based". virt-v2v knows nothing about it, so when converting a Rocky guest we get en error: virt-v2v-in-place: error: virt-v2v is unable to convert this guest type (linux/rocky) Let's fix that by adding "rocky" as an acceptable value. Signed-off-by: Andrey Drobyshev <andrey.drobyshev at virtuozzo.com> --- convert/convert.ml | 2 +- convert/convert_linux.ml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/convert/convert.ml b/convert/convert.ml index 17a75e3f..8d62f6d4 100644 --- a/convert/convert.ml +++ b/convert/convert.ml @@ -228,7 +228,7 @@ and do_convert g source inspect keep_serial_console interfaces | { i_type = "linux"; i_distro = ("fedora" | "rhel" | "centos" | "scientificlinux" | "redhat-based" - | "oraclelinux" + | "oraclelinux" | "rocky" | "sles" | "suse-based" | "opensuse" | "altlinux" | "debian" | "ubuntu" | "linuxmint" | "kalilinux") } -> diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml index cde3b037..41767e62 100644 --- a/convert/convert_linux.ml +++ b/convert/convert_linux.ml @@ -50,7 +50,7 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ match inspect.i_distro with | "fedora" | "rhel" | "centos" | "scientificlinux" | "redhat-based" - | "oraclelinux" -> `RHEL_family + | "oraclelinux" | "rocky" -> `RHEL_family | "altlinux" -> `ALT_family | "sles" | "suse-based" | "opensuse" -> `SUSE_family | "debian" | "ubuntu" | "linuxmint" | "kalilinux" -> `Debian_family @@ -69,7 +69,7 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ let qga_svc_start_cmd family distro major match family, distro, major with | `RHEL_family, ( "rhel" | "centos" | "scientificlinux" | "redhat-based" | - "oraclelinux" ), 6 -> + "oraclelinux" | "rocky" ), 6 -> (* https://bugzilla.redhat.com/show_bug.cgi?id=2028764#c52 *) Some "service qemu-ga start" @@ -184,8 +184,8 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ *) (match inspect.i_distro, inspect.i_major_version with | "fedora", _ -> Q35 - | ("rhel"|"centos"|"scientificlinux"|"redhat-based"|"oraclelinux"), - major -> + | ("rhel"|"centos"|"scientificlinux"|"redhat-based"|"oraclelinux"| + "rocky"), major -> if major <= 4 then I440FX else Q35 | ("sles"|"suse-based"|"opensuse"), major -> if major < 10 then I440FX else Q35 -- 2.31.1
Richard W.M. Jones
2022-Dec-09 22:00 UTC
[Libguestfs] [v2v PATCH] convert_linux: add Rocky Linux to supported distros
Thanks, that is upstream in commit db831c167b. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW