Skip to content

Commit

Permalink
docs(website): edited the doc to provide clarity in using the libkrun…
Browse files Browse the repository at this point in the history
…… (#10111)

* docs(website): edited the doc to provide clarity in using the libkrun provider type

Signed-off-by: Shipra Singh <[email protected]>

* docs(website): edited the content

Signed-off-by: Shipra Singh <[email protected]>

* docs(website): fixed a typo

Signed-off-by: Shipra Singh <[email protected]>

* docs(website): fixed SME comments

Signed-off-by: Shipra Singh <[email protected]>

---------

Signed-off-by: Shipra Singh <[email protected]>
  • Loading branch information
shipsing authored Dec 9, 2024
1 parent 455637a commit 46457b5
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 5 deletions.
32 changes: 32 additions & 0 deletions website/docs/installation/macos-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,38 @@ Podman Desktop requires [Podman Engine](https://docs.podman.io/en/latest/index.h

After the command is executed, you can find the Podman Desktop Application within the `Applications` directory of the MacOS.

## Using `libkrun` as machine provider

By default, Podman uses the `Apple HyperVisor` provider type. If you are already running an `Apple HyperVisor` Podman machine and want to create a `GPU enabled (LibKrun)` machine, reset the Podman machine to avoid any port conflicts:
- Using the UI: Click the **Troubleshooting** icon in the status bar and then **Cleanup / Purge data**.
- Using the CLI: Run the `podman machine reset` command.

To use `podman machine` CLI commands with the `libkrun` provider type, configure the machine provider manually using one of the following ways:

**_Configuring an environment variable_**

1. Set the following variable:

```shell-session
export CONTAINERS_MACHINE_PROVIDER=libkrun
```

1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using the UI.

**_Configuring the `containers.conf` file_**

1. Open the `containers.conf` file, which is placed in the `$HOME/.config/containers` directory.
1. Add the `provider` attribute and set its value to `libkrun` in the file.

```vim
...
[machine]
provider = "libkrun"
...
```

1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using the UI.

## Getting Started

Learn more on how to get started with Podman Desktop by clicking [here](/docs/containers).
4 changes: 2 additions & 2 deletions website/docs/installation/windows-install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Before creating a Podman machine, you can use one of the following ways to enabl
# [System.Environment]::SetEnvironmentVariable('CONTAINERS_MACHINE_PROVIDER','hyperv')
```
1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using UI.
1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using the UI.
**_Configuring the `containers.conf` file_**
Expand All @@ -159,7 +159,7 @@ Before creating a Podman machine, you can use one of the following ways to enabl
...
```

1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using UI.
1. [Create and start a Podman machine](/docs/podman/creating-a-podman-machine) using the UI.

#### Verification
After configuration, you can confirm whether you are using a Podman machine with Hyper-V virtualization provider.
Expand Down
6 changes: 3 additions & 3 deletions website/docs/podman/creating-a-podman-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Consider creating a custom Podman machine to:
1. **Machine with root privileges**:
Enable to use the rootful connection by default.
Required to use Kind on Windows.
1. (On Windows) **User mode networking (traffic relayed by a user process)**:
Enable to route the traffic through the network connection from your Windows session.
Required to access resources behind your VPN connection.
1. Additional settings based on your operating system:
- (On Windows) **User mode networking (traffic relayed by a user process)**: Enable to route the traffic through the network connection from your Windows session. This setting is required to access resources behind your VPN connection.
- (On macOS) **Provider Type**: The default value is `Apple HyperVisor`. Before switching to `GPU enabled (LibKrun)`, ensure that you have [configured the machine provider](/docs/installation/macos-install#using-libkrun-as-machine-provider) manually.
1. Click **Create**.

![Create a Podman machine](img/create-a-podman-machine.png)
26 changes: 26 additions & 0 deletions website/docs/troubleshooting/troubleshooting-podman-on-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,29 @@ For M3 processors:
#### Additional resources

- [Issue #20776](https://github.com/containers/podman/issues/20776)

## `podman machine` CLI commands do not work with `libkrun` provider type without manual configuration

When you create a Podman machine with the `GPU enabled (LibKrun)` provider type, all the `podman machine` CLI commands stop working.

**_Podman machine is not listed_**
```shell-session
$ podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
```

**_Error: interacting with the default Podman machine_**
```shell-session
$ podman machine ssh
Error: vm podman-machine-default not found: podman-machine-default: VM does not exist
```

#### Workaround

- Prefix each `podman machine` command with
`CONTAINERS_MACHINE_PROVIDER=libkrun`. For example, `CONTAINERS_MACHINE_PROVIDER=libkrun podman machine ls`.
- Manually configure the `containers.conf` file or the `CONTAINERS_MACHINE_PROVIDER` environment variable. See [Using `libkrun` as machine provider](/docs/installation/macos-install#using-libkrun-as-machine-provider).

#### Additional resources

- [Issue #9860](https://github.com/podman-desktop/podman-desktop/issues/9860)
4 changes: 4 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ const config = {
to: '/docs/kubernetes',
from: '/docs/onboarding-for-kubernetes',
},
{
to: '/docs/kubernetes/deploying-a-pod-to-kubernetes',
from: '/docs/kubernetes/deploying-a-container-to-kubernetes',
},
{
to: '/docs/containers/onboarding',
from: ['/docs/onboarding-for-containers', '/docs/onboarding', '/docs/onboarding/containers'],
Expand Down

0 comments on commit 46457b5

Please sign in to comment.