podman-machine-init - Initialize a new virtual machine
podman machine init [options] [name]
Initialize a new virtual machine for Podman.
Podman on macOS requires a virtual machine. This is because containers are Linux - containers do not run on any other OS because containers’ core functionality are tied to the Linux kernel.
podman machine init initializes a new Linux virtual machine where containers are run. SSH keys are automatically generated to access the VM, and system connections to the root account and a user account inside the VM are added.
By default, the VM distribution is Fedora CoreOS. Fedora CoreOS upgrades come out every 14 days and are detected and installed automatically. The VM will be rebooted during the upgrade. For more information on updates and advanced configuration, please see the FCOS update docs here and here.
Number of CPUs.
Size of the disk for the guest VM in GB.
Print usage statement.
Fully qualified path of the ignition file.
If an ignition file is provided, the file will be copied into the user’s CONF_DIR and renamed. Additionally, no SSH keys will be generated nor will a system connection be made. It is assumed that the user will do these things manually or handle otherwise.
Fully qualified path or URL to the VM image.
Can also be set to
stable to pull down default image.
Memory (in MB).
Start the virtual machine immediately after it has been initialized.
Whether this machine should prefer rootful (
true) or rootless (
container execution. This option will also determine the remote connection default
if there is no existing remote connection configurations.
API forwarding, if available, will follow this setting.
Set the timezone for the machine and containers. Valid values are
timezone such as
America/Chicago. A value of
local, which is the default,
means to use the timezone of the machine host.
Mounts a volume from source to target.
Create a mount. If /host-dir:/machine-dir is specified as the
Podman mounts host-dir in the host to machine-dir in the Podman machine.
The root filesystem is mounted read-only in the default operating system, so mounts must be created under the /mnt directory.
Default volume mounts are defined in containers.conf. Unless changed, the default values
Driver to use for mounting volumes from the host, such as
$ podman machine init $ podman machine init myvm $ podman machine init --rootful $ podman machine init --disk-size 50 $ podman machine init --memory=1024 myvm $ podman machine init -v /Users:/mnt/Users
March 2021, Originally compiled by Ashley Cui firstname.lastname@example.org