Chapter 2. Install Podman
On Windows, running the Podman container engine requires a Linux distribution to run in a virtual machine. You can use Windows Subsystem for Linux version 2 (WSL 2) or Hyper-V as the machine provider.
During Podman installation, ensure that you have administrator privileges to enable the WSL or Hyper-V feature and to create the Podman machine.
2.1. Use WSL 2 as the machine provider Copy linkLink copied to clipboard!
Red Hat build of Podman Desktop helps you to create a Windows Subsystem for Linux version 2 (WSL 2) virtual machine, also known as the Podman machine. The major benefits include ease of use and native WSL 2 virtualization performance.
However, you must enable the WSL feature. This is required by Red Hat build of Podman Desktop to create the default wsl Podman machine.
Prerequisites
Before using WSL 2 as the machine provider, ensure that your environment meets the following requirements:
- 6 GB of RAM for the Podman machine.
Required WSL 2 prerequisites:
- Administrator privileges for the Windows user.
- A Windows 11 (64-bit) machine.
- Enable nested virtualization on a virtual machine.
Procedure
Run the following commands to enable the WSL feature without installing the default Ubuntu distribution of Linux:
> wsl --update > wsl --install --no-distribution- Restart your machine.
Verification
-
Run the
wsl --statuscommand in the CLI to check that WSL 2 is available.
2.2. Use Hyper-V as the machine provider Copy linkLink copied to clipboard!
As an administrator, you can set up a Podman machine using Hyper-V as the provider. Hyper-V on Windows helps you to run multiple operating systems on a single machine. This speeds up deployment, isolates environments for better security, and simplifies management through native Windows tools and PowerShell.
You must enable the Hyper-V feature. This is required by Red Hat build of Podman Desktop to create the Hyperv Podman machine.
Prerequisites
Before using Hyper-V as the machine provider, ensure that your environment meets the following requirements:
- 6 GB of RAM for the Podman machine.
Required Hyper-V prerequisites:
- Administrator privileges for the Windows user.
- A Windows 11 (64-bit) machine.
- Enable nested virtualization on a virtual machine.
Procedure
Run the following command to enable the Hyper-V feature:
Using command prompt
> DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-VUsing PowerShell
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All- Restart your machine.
Verification
Check that Hyper-V is active.
Using command prompt
> systeminfoUsing PowerShell
> Get-Service vmcompute
2.3. Install Red Hat build of Podman Desktop dependencies Copy linkLink copied to clipboard!
Once Red Hat build of Podman Desktop is installed, install the required dependencies to begin using the application.
After installation, the Get started with Red Hat build of Podman Desktop screen helps you to start the onboarding process. You can skip this setup and complete it later using one of the following ways:
- Use the Set up button in the notification on the Dashboard page.
- Use the Setup Podman button on the Podman tile, located on the Settings > Resources page.
Procedure
On the Get started with Red Hat build of Podman Desktop screen, click Start Onboarding.
ImportantThe onboarding setup opens automatically when you first launch the application. However, you can skip this setup manually, or your administrator can disable it.
Perform the following steps to install Podman:
- Click Next. A confirmation notification opens.
- Click Yes. The Podman Setup screen opens with the default WSLv2 virtualization provider selected.
- Optional: If you want to use the Windows Hyper-V provider, select the other option.
- Click Install. A notification stating Installation Successfully Completed appears on the screen.
- Click Close. A page notifying that Podman is set up correctly opens.
Perform the following steps to create a Podman machine:
- Click Next. A page notifying you to create a Podman machine opens.
Click Next, and then click Create.
NoteYou can also create additional Podman machines of any provider type later. For more details, refer to Configure a Podman machine.
-
Click Next, and follow the instructions on the screen to install the
kubectlandcomposeCLIs. - After installing the CLIs, click Next to go to the Dashboard page.
Verification
- Go to the Settings > Resources page, and view the running Podman machine on the Podman tile.
You are ready to use the application.