On Tue, Mar 08, 2022 at 03:30:59PM +0100, Laszlo Ersek wrote:
> The windows converter installs the firstboot scripts in this order:
> 
>   do_convert
>     configure_firstboot
>       configure_wait_pnp
>         add_firstboot_script
>       configure_vmdp
>         add_firstboot_script
>       configure_qemu_ga
>         add_firstboot_script
>       unconfigure_xenpv
>         add_firstboot_script
>       unconfigure_prltools
>         add_firstboot_script
>       unconfigure_vmwaretools
>         add_firstboot_script
>     configure_network_interfaces
>       install_firstboot_powershell "v2vnetcf.ps1"
>         add_firstboot_script
>           -> the script that polls for "netkvm.sys" with Get-NetAdapter,
>              then calls New-NetIPAddress
> 
> Because of this, if the guest is supposed to have static IP address(es),
> they are set by the "v2vnetcf.ps1" firstboot script quite late during
> first boot.
> 
> It's more comfortable for users if the network is usable from an earlier
> point of the first boot, so register "v2vnetcf.ps1" in priority group 2500
> (the default is 5000), moving the script to the front.
> 
> Suggested-by: Richard W.M. Jones <[email protected]>
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1788823
> Signed-off-by: Laszlo Ersek <[email protected]>
> ---
>  convert/convert_windows.ml | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
> index fa2eae28a768..b53312a9aba4 100644
> --- a/convert/convert_windows.ml
> +++ b/convert/convert_windows.ml
> @@ -739,8 +739,12 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
>            add ""
>        ) static_ips;
>  
> -      (* Install the Powershell script to run at firstboot. *)
> -      Windows.install_firstboot_powershell g inspect psh_filename !psh
> +      (* Install the Powershell script to run at firstboot.
> +       *
> +       * Place it first among the firstboot scripts (RHBZ#1788823).
> +       *)
> +      Windows.install_firstboot_powershell g inspect ~prio:2500 psh_filename
> +        !psh
>      ) (* static_ips <> [] *)

ACK

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to