Machine init --provider

Add the ability for users to override the default provider when creating mahcines.  The new flag is `--provider` and allows you to specifiy a valid vmtype for the platform.  This PR also removes the previous list test where we tested listing all providers.  I added a PR for testing --provider which includes a standard `machine ls` which defaults now to showing all providers.

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2025-10-03 14:01:49 -05:00
parent 386c8f3fe9
commit 5e1c2f8d7d
17 changed files with 162 additions and 119 deletions

View File

@@ -96,6 +96,12 @@ Add the provided Ansible playbook to the machine and execute it after the first
Note: The playbook will be executed with the same privileges given to the user in the virtual machine. The playbook provided cannot include other files from the host system, as they will not be copied.
Use of the `--playbook` flag will require the image to include Ansible. The default image provided will have Ansible included.
#### **--provider**
Specify the provider for the machine to be created. This allows users to override the default provider on platforms
that have multiple providers.
#### **--rootful**
Whether this machine prefers rootful (`true`) or rootless (`false`)
@@ -237,6 +243,11 @@ Initialize the default Podman machine with a usb device passthrough with specifi
$ podman machine init --usb bus=1,devnum=3
```
Initialize a machine on different provider than the default
```
$ podman machine init --provider applehv
```
## SEE ALSO
**[podman(1)](podman.1.md)**, **[podman-machine(1)](podman-machine.1.md)**, **containers.conf(5)**

View File

@@ -22,6 +22,17 @@ environment variable while the machines are running can lead to unexpected behav
Podman machine behaviour can be modified via the [machine] section in the containers.conf(5) file.
Podman is based on virtual machine providers. The following table describes which providers are
supported by platform. The asterisk denotes the default provider for the platform.
| Platform | Provider |
| -------- |----------|
| Linux | qemu* |
| MacOS | libkrun* |
| MacOS | applehv |
| Windows | wsl* |
| Windows | hyperv |
## SUBCOMMANDS
| Command | Man Page | Description |