Re: [Libguestfs] [PATCH libguestfs 2/2] lib: Return correct osinfo field for Windows 11

2022-12-02 Thread Laszlo Ersek
On 12/01/22 12:20, Richard W.M. Jones wrote: > On Thu, Dec 01, 2022 at 10:34:09AM +, Richard W.M. Jones wrote: >> For Windows Client, we can only distinguish between Windows 10 and >> Windows 11 using the build ID. The product name in both cases is >> "Windows 10 ", apparently intentionally. >

Re: [Libguestfs] [PATCH v2v] rhv: Use osinfo to distinguish Windows >= 10 variants

2022-12-02 Thread Laszlo Ersek
On 12/01/22 12:14, Richard W.M. Jones wrote: > Windows versions >= 10 no longer use the NT major.minor numbering > scheme (it is fixed at 10.0). Libguestfs >= 1.49.8 can distinguish > these versions and it sets correctly, so use that instead. > > After this change the OVF will contain: > > Wi

Re: [Libguestfs] [PATCH v2v] convert: windows: Copy drivers for Windows 11, Windows 2019 & Windows 2022

2022-12-02 Thread Laszlo Ersek
On 12/01/22 13:49, Richard W.M. Jones wrote: > If the virtio-win ISO contains drivers for Windows 11, Windows 2019 or > Windows 2022, and the guest matches these, then copy in the right > drivers. For this to work you will need libguestfs >= 1.49.8 which > allows osinfo to be used to detect Window

Re: [Libguestfs] [PATCH guestfs-tools] inspector: Display the new build ID field

2022-12-02 Thread Laszlo Ersek
On 12/01/22 11:34, Richard W.M. Jones wrote: > libguestfs 1.49.8 adds a new API to read the build ID from guests > (especially for Windows). If the new API is available and if it > returns a string other than "unknown", then print it in virt-inspector > output. > --- > inspector/inspector.c

Re: [Libguestfs] [PATCH libguestfs 2/2] lib: Return correct osinfo field for Windows 11

2022-12-02 Thread Richard W.M. Jones
On Fri, Dec 02, 2022 at 10:11:32AM +0100, Laszlo Ersek wrote: > On 12/01/22 12:20, Richard W.M. Jones wrote: > > On Thu, Dec 01, 2022 at 10:34:09AM +, Richard W.M. Jones wrote: > >> For Windows Client, we can only distinguish between Windows 10 and > >> Windows 11 using the build ID. The produ

Re: [Libguestfs] [PATCH v2v] convert: windows: Copy drivers for Windows 11, Windows 2019 & Windows 2022

2022-12-02 Thread Richard W.M. Jones
On Fri, Dec 02, 2022 at 10:16:53AM +0100, Laszlo Ersek wrote: > On 12/01/22 13:49, Richard W.M. Jones wrote: > > If the virtio-win ISO contains drivers for Windows 11, Windows 2019 or > > Windows 2022, and the guest matches these, then copy in the right > > drivers. For this to work you will need

[Libguestfs] [v2v PATCH 1/2] convert_linux.get_uefi_arch_suffix: move to Utils

2022-12-02 Thread Laszlo Ersek
So that Windows conversion can use the same function. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2149629 Signed-off-by: Laszlo Ersek --- lib/utils.mli| 5 + convert/convert_linux.ml | 6 -- lib/utils.ml | 5 + 3 files changed, 10 insertions(+), 6 de

[Libguestfs] [v2v PATCH 2/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Laszlo Ersek
The "fallback" (or "default") boot behavior is described at great length here: https://blog.uncooperative.org/uefi/linux/shim/efi%20system%20partition/2014/02/06/the-efi-system-partition.html The gist of it applies to all UEFI OSes, including Windows. For the fallback boot behavior to work, the \

[Libguestfs] [v2v PATCH 0/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Laszlo Ersek
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2149629 The second patch is the interesting one; the first patch is just a trivial refactoring. Laszlo Ersek (2): convert_linux.get_uefi_arch_suffix: move to Utils convert_windows: fix up the UEFI fallback boot loader if broken lib/utils

Re: [Libguestfs] [v2v PATCH 1/2] convert_linux.get_uefi_arch_suffix: move to Utils

2022-12-02 Thread Richard W.M. Jones
On Fri, Dec 02, 2022 at 01:44:08PM +0100, Laszlo Ersek wrote: > So that Windows conversion can use the same function. > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2149629 > Signed-off-by: Laszlo Ersek > --- > lib/utils.mli| 5 + > convert/convert_linux.ml | 6 --

Re: [Libguestfs] [v2v PATCH 2/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Richard W.M. Jones
On Fri, Dec 02, 2022 at 01:44:09PM +0100, Laszlo Ersek wrote: > The "fallback" (or "default") boot behavior is described at great length > here: > > https://blog.uncooperative.org/uefi/linux/shim/efi%20system%20partition/2014/02/06/the-efi-system-partition.html > > The gist of it applies to all U

Re: [Libguestfs] [v2v PATCH 2/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Laszlo Ersek
On 12/02/22 13:58, Richard W.M. Jones wrote: > On Fri, Dec 02, 2022 at 01:44:09PM +0100, Laszlo Ersek wrote: >> The "fallback" (or "default") boot behavior is described at great length >> here: >> >> https://blog.uncooperative.org/uefi/linux/shim/efi%20system%20partition/2014/02/06/the-efi-system-p

Re: [Libguestfs] [v2v PATCH 2/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Laszlo Ersek
On 12/02/22 13:58, Richard W.M. Jones wrote: > If you can push this (optionally changed/fixed as you see fit) in the > next hour then I can put it into C9S, since I'm doing a build today > anyway. Commit range 7b49177e2b0c..9d4b58dcecc4. Cheers Laszlo

Re: [Libguestfs] [v2v PATCH 2/2] convert_windows: fix up the UEFI fallback boot loader if broken

2022-12-02 Thread Richard W.M. Jones
On Fri, Dec 02, 2022 at 02:25:53PM +0100, Laszlo Ersek wrote: > On 12/02/22 13:58, Richard W.M. Jones wrote: > > On Fri, Dec 02, 2022 at 01:44:09PM +0100, Laszlo Ersek wrote: > >> + info (f_"Fixing UEFI bootloader."); > >> + g#rm_rf bootdir; > >> + g#mkdir_p bootdir; > >

Re: [Libguestfs] [PATCH libguestfs 2/2] lib: Return correct osinfo field for Windows 11

2022-12-02 Thread Eric Blake
On Fri, Dec 02, 2022 at 09:59:57AM +, Richard W.M. Jones wrote: > > > > In addition, please replace sscanf() with strtol(). The behavior of the > > former is undefined when the subject sequence forms a valid decimal > > string, but the numeric value does not fit into an "int". And, this is > >