Installing Podman Desktop and Podman on Windows
Installing Podman Desktop
To install Podman Desktop:
-
To start the Podman Desktop installer, open the downloaded file.
Alternate installation methods:
- Silent Windows installer
- Chocolatey
- Scoop
- Winget
Silent Windows installer
-
To install without user interaction, run the Windows installer with the silent flag
/S
from the Command Prompt:> podman-desktop-1.6.4-setup-x64.exe /S
Chocolatey
-
Install the Chocolatey package manager.
-
Install from the terminal:
> choco install podman-desktop
Scoop package manager for Windows
-
Install from the terminal:
> scoop bucket add extras
> scoop install podman-desktop
Winget
-
Install from the terminal:
> winget install -e --id RedHat.Podman-Desktop
Installing Podman
On Windows, running the Podman container engine requires running a Linux distribution on a virtual machine.
Use WSL2 as machine provider
Podman Desktop creates a Windows Subsystem for Linux version 2 (WSL 2) virtual machine: the Podman Machine.
Main benefits are:
- Ease of use.
- WSL 2 native virtualization performance.
Check that your environment has:
- 6 GB RAM for the Podman Machine.
- Windows Subsystem for Linux version 2 (WSL 2) prerequisites. See Enabling WSL 2, WSL basic commands, and Troubleshooting WSL 2:
- The Windows user has administrator privileges.
- Windows 64bit.
- Windows 10 Build 19043 or greater, or Windows 11.
- On a virtual machine: Nested Virtualization enabled.
To install the Podman Machine:
-
To prepare your system, enable the WSL feature, without installing the default Ubuntu distribution of Linux.
Open the Command Prompt, and run:.
> wsl --update
> wsl --install --no-distributionnoteIf you run the Podman Desktop setup on a Windows 10 LTSC version, you require to install a specific WSL distribution. See Troubleshooting Podman on Windows
-
Restart your computer.
-
The Dashboard screen displays: Podman needs to be set up.
-
Click the Set up button.
-
Review and validate all confirmation screens to set up the Podman machine.
-
When necessary, follow the instructions to install system prerequisites.
To verify that Podman is set up:
-
In the Dashboard, the Podman tile displays Podman is running.
Use Hyper-V as machine provider
Before creating a Podman machine, you can use one of the following ways to enable it to use Hyper-V:
Configuring an environment variable
-
Perform one of the following steps:
-
As a normal user, set the following variable at session level:
> $env:CONTAINERS_MACHINE_PROVIDER = 'hyperv'
-
As an admin user, set the following variable at system level:
# [System.Environment]::SetEnvironmentVariable('CONTAINERS_MACHINE_PROVIDER','hyperv')
-
-
Create and start a Podman machine using the UI.
Configuring the containers.conf
file
-
Open the
containers.conf
file on your machine. The file is usually placed atC:\Users\myuser\AppData\Roaming\containers\
. -
Add the
provider
attribute and set its value tohyperv
in the file....
[machine]
provider = "hyperv"
... -
Create and start a Podman machine using the UI.
Verification
After configuration, you can confirm whether you are using a Podman machine with Hyper-V virtualization provider.
-
Go to Settings > Resources.
-
Click the Podman details icon in the Podman tile.
-
Select the Logs tab to view the following notification message:
time="2023-05-09T21:16:08+03:00" level=debug msg="Using Podman machine with `hyperv` virtualization provider"