mirror of https://github.com/containers/podman.git
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 <mario.loriedo@gmail.com> |
||
|---|---|---|
| .. | ||
| podman-msihooks | ||
| resources | ||
| README.md | ||
| build-hooks.ps1 | ||
| build.ps1 | ||
| burn.wxs | ||
| check.ps1 | ||
| podman-setup.wixproj | ||
| podman-theme.wxl | ||
| podman-theme.xml | ||
| podman-ui.wxs | ||
| podman.sln | ||
| podman.wixproj | ||
| podman.wxs | ||
| process-release.ps1 | ||
| test-installer.ps1 | ||
| utils.ps1 | ||
| welcome-install-dlg.wxs | ||
README.md
Windows Installer Build
Instructions [have moved here](Build and test the Podman Windows installer](#build-and-test-the-podman-windows-installer)).
How to run a full tests scenarios
Manual tests to validate changes the wxs files or a WiX upgrade.
Preparation
- checkout previous release tag (e.g. 5.3.0)
git fetch --all --tags --prune && git tag --list v5.* && git checkout tags/v5.3.0 - make the installer
./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer - checkout tag
v5.3.1make the installer./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer - get the
v5.3.1msi product id (with superorca) - checkout the main branch and change the product id on
podman.wxsto matchv5.3.1product id - set
$env:V531_SETUP_EXE_PATHand make current and next installer$env:V531_SETUP_EXE_PATH=<path> && ./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer && ./winmake installer 9.9.9 - patch installertest to make sure it doesn't download the setup.exe from internet but uses the one just built
Run the tests
- Uninstall the virtualization providers (WSL and Hyper-V) using the "Windows Features" app
- Run installtest for both
wslandhyperv(as an admin)
.\contrib\win-installer\test-installer.ps1 `
-scenario all `
-setupExePath ".\contrib\win-installer\podman-5.4.0-dev-setup.exe" `
-previousSetupExePath ".\contrib\win-installer\podman-5.3.0-dev-setup.exe" `
-nextSetupExePath ".\contrib\win-installer\podman-9.9.9-dev-setup.exe" `
-v531SetupExePath ".\contrib\win-installer\podman-5.3.1-dev-setup.exe" `
-provider hyperv
- Manually test the upgrade "from v5.3.1 to current to next"
contrib\win-installer\podman-5.3.1-dev-setup.exe /install /log contrib\win-installer\podman-setup-531.log
contrib\win-installer\podman-5.4.0-dev-setup.exe /install /log contrib\win-installer\podman-setup-540.log
contrib\win-installer\podman-9.9.9-dev-setup.exe /install /log contrib\win-installer\podman-setup-999.log
contrib\win-installer\podman-9.9.9-dev-setup.exe /x /log contrib\win-installer\podman-uninstall-999.log
- manually run the current installer with the option to install wsl and confirm it reboots and install both podman and wsl
- manually run the current installer with the option to install hyperv and confirm it reboots and install both podman and wsl
- run installtest for both wsl and hyperv
- manually run the current installer with the option to install wsl and confirm it doesn't reboot
- manually run the current installer with the option to install hyperv and confirm it doesn't reboot
retrieve installed podman msi package information
$Installer = New-Object -ComObject WindowsInstaller.Installer;
$InstallerProducts = $Installer.ProductsEx("", "", 7);
$InstalledProducts = ForEach($Product in $InstallerProducts){
[PSCustomObject]@{ProductCode = $Product.ProductCode();
LocalPackage = $Product.InstallProperty("LocalPackage");
VersionString = $Product.InstallProperty("VersionString");
ProductName = $Product.InstallProperty("ProductName")
}
};
$InstalledProducts | Where-Object {$_.ProductName -match "podman"}
and uninstall it with msiexec /x "{<product-code>}"