From 91e4f6918a294ed40a1031bb431c8a8908c749fe Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Fri, 7 Feb 2025 16:10:50 +0100 Subject: [PATCH] Remove the option to install WSL/HyperV The Windows installer was able to automatically enable the Windows features for WSL or HyperV when they were not already enabled. This PR removes this capability. Having the installer to automatically install the right prerequiste (WSL or HyperV) was helpful as users won't have to do it manually to use Podman after the installation. But it also made the code of installer more complicated as it needed to manage the installation of these OS features and a reboot. And we weren't able to automatically test these scenarios that required a reboot. In other words the Windows installer, that merely just extracted some files in a folder, required, to support the installation of WSL and HyperV, an advanced knowledge of WiX toolkit and of the Windows Installer SDK, plus contributors-time to manually test the scenarios that require a reboot. We decided to remove this capability based on the following reasons: - We had a couple of regressions in the last month that were hard to analyse and fix (#24624 and #24735) - Podman maintainers currently have a scarce knowledge of the Windows Installer and there is no plan to invest in that - Manually installing WSL or HyperV is not hard (e.g. run `wsl --install`) and are features that admins can manage on their fleet of Windows machines - Competitors such as Docker Desktop don't automatically install these components - Podman `machine init` currently verifies if WSL and HyperV are installed and guide the user to install them when they are not Signed-off-by: Mario Loriedo --- build_windows.md | 15 +++----- contrib/win-installer/burn.wxs | 5 --- contrib/win-installer/podman-theme.wxl | 4 +-- contrib/win-installer/podman-theme.xml | 2 -- contrib/win-installer/podman.wxs | 36 ++----------------- contrib/win-installer/test-installer.ps1 | 9 +---- contrib/win-installer/welcome-install-dlg.wxs | 3 -- 7 files changed, 9 insertions(+), 65 deletions(-) diff --git a/build_windows.md b/build_windows.md index 9785dcbe63..2cabe079ce 100644 --- a/build_windows.md +++ b/build_windows.md @@ -356,15 +356,12 @@ which include detailed installation information, in the current directory. Run it in `quiet` mode to automate the installation and avoid interacting with the GUI. Open the terminal **as an administrator**, add the `/quiet` option, and -set the bundle variables `MachineProvider` (`wsl` or `hyperv`), `WSLCheckbox` -(`1` to install WSL as part of the installation, `0` otherwise), and -`HyperVCheckbox` (`1` to install Hyper-V as part of the installation, `0` -otherwise): +set the bundle variable `MachineProvider` (`wsl` or `hyperv`): ```pwsh contrib\win-installer\podman-5.1.0-dev-setup.exe /install ` /log podman-setup.log /quiet ` - MachineProvider=wsl WSLCheckbox=0 HyperVCheckbox=0 + MachineProvider=wsl ``` :information_source: If uninstallation fails, the installer may end up in an @@ -418,13 +415,11 @@ msiexec /package contrib\win-installer\en-US\podman.msi /l*v podman-msi.log ``` To run it in quiet, non-interactive mode, open the terminal **as an -administrator**, add the `/quiet` option, and set the MSI properties -`MACHINE_PROVIDER` (`wsl` or `hyperv`), `WITH_WSL` (`1` to install WSL as part -of the installation, `0` otherwise) and `WITH_HYPERV` (`1` to install Hyper-V as -part of the installation, `0` otherwise): +administrator**, add the `/quiet` option, and set the MSI property +`MACHINE_PROVIDER` (`wsl` or `hyperv`): ```pwsh -msiexec /package contrib\win-installer\en-US\podman.msi /l*v podman-msi.log /quiet MACHINE_PROVIDER=wsl WITH_WSL=0 WITH_HYPERV=0 +msiexec /package contrib\win-installer\en-US\podman.msi /l*v podman-msi.log /quiet MACHINE_PROVIDER=wsl ``` :information_source: `podman.msi` GUI dialogs, defined in the file diff --git a/contrib/win-installer/burn.wxs b/contrib/win-installer/burn.wxs index 0c077eee16..b46b254e53 100644 --- a/contrib/win-installer/burn.wxs +++ b/contrib/win-installer/burn.wxs @@ -9,8 +9,6 @@ - - @@ -31,11 +29,8 @@ - - - diff --git a/contrib/win-installer/podman-theme.wxl b/contrib/win-installer/podman-theme.wxl index b5666fd67c..7211aa10b2 100644 --- a/contrib/win-installer/podman-theme.wxl +++ b/contrib/win-installer/podman-theme.wxl @@ -9,7 +9,7 @@ @@ -27,8 +27,6 @@ Finally, click install to continue, or Close to abort the installation." /> - - diff --git a/contrib/win-installer/podman-theme.xml b/contrib/win-installer/podman-theme.xml index fd681e67d9..6efd11e378 100644 --- a/contrib/win-installer/podman-theme.xml +++ b/contrib/win-installer/podman-theme.xml @@ -39,8 +39,6 @@ #(loc.InstallLicenseLinkText) - #(loc.InstallWSLCheckbox) - #(loc.InstallHypervCheckbox)