On 1/5/23 11:08, Richard W.M. Jones wrote: > On Sun, Jan 01, 2023 at 03:09:26PM +0100, Laszlo Ersek wrote: >> Reflect commit 38b35f3b7e5c ("rhv: Use osinfo to distinguish Windows >= 10 >> variants", 2022-12-02) to the "ovirt:id" field in the OVF as well. Take >> the values from "packaging/conf/osinfo-defaults.properties" in the >> ovirt-engine tree, as the comment on "get_ovirt_osid" explains. >> >> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2152465 >> Signed-off-by: Laszlo Ersek <ler...@redhat.com> >> --- >> lib/create_ovf.ml | 21 +++++++++++++++------ >> 1 file changed, 15 insertions(+), 6 deletions(-) >> >> diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml >> index 8aff3d8f0b53..79b3285766c9 100644 >> --- a/lib/create_ovf.ml >> +++ b/lib/create_ovf.ml >> @@ -437,13 +437,22 @@ and get_ovirt_osid = function >> i_arch = "i386" } -> >> 26 >> >> + (* For Windows NT 10.0 always use the <osinfo> field since the >> + * other fields will not accurately reflect the version. >> + *) >> | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; >> - i_arch = "x86_64"; i_product_variant = "Client" } -> >> - 27 >> - >> - | { i_type = "windows"; i_major_version = 10; i_minor_version = 0; >> - i_arch = "x86_64" } -> >> - 29 >> + i_arch = "x86_64"; i_osinfo = osinfo; i_product_name = product } -> >> + (match osinfo with >> + | "win10" -> (* windows_10x64 *) 27 >> + | "win11" -> (* windows_11 *) 36 >> + | "win2k16" -> (* windows_2016x64 *) 29 >> + | "win2k19" -> (* windows_2019x64 *) 31 >> + | "win2k22" -> (* windows_2022 *) 37 >> + | _ -> >> + warning (f_"unknown Windows 10 variant: %s (%s)") >> + osinfo product; >> + (* windows_2022 *) 37 >> + ) >> >> | { i_type = typ; i_distro = distro; >> i_major_version = major; i_minor_version = minor; i_arch = arch; > > ACK > > ... although you might extend the outer match so it matches on > the extra field.
I'll stick with it as posted, for two reasons: - this change mirrors your change in 38b35f3b7e5c verbatim, - Vera Wu tested this version, which took a few days (personally I had no means to do it at all), and now Virt-Tools QE are in a hurry to get the rebase, and we should include this in the rebase. So, I've pushed it as commit fcd787573bc7. > I'm going to try and write up the release notes for the new stable > branch of virt-v2v this week, with the aim of releasing it on Monday > next week. And I'll attempt to review everything outstanding today. Thanks! Laszlo _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs