github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-machine-init.1.md (about)

     1  % podman-machine-init(1)
     2  
     3  ## NAME
     4  podman\-machine\-init - Initialize a new virtual machine
     5  
     6  ## SYNOPSIS
     7  **podman machine init** [*options*] [*name*]
     8  
     9  ## DESCRIPTION
    10  
    11  Initialize a new virtual machine for Podman.
    12  
    13  Podman on macOS requires a virtual machine. This is because containers are Linux -
    14  containers do not run on any other OS because containers' core functionality are
    15  tied to the Linux kernel.
    16  
    17  **podman machine init** initializes a new Linux virtual machine where containers are run.
    18  SSH keys are automatically generated to access the VM, and system connections to the root account
    19  and a user account inside the VM are added.
    20  
    21  By default, the VM distribution is [Fedora CoreOS](https://getfedora.org/en/coreos?stream=testing).
    22  Fedora CoreOS upgrades come out every 14 days and are detected and installed automatically. The VM will be rebooted during the upgrade.
    23  For more information on updates and advanced configuration, please see the FCOS update docs [here](https://docs.fedoraproject.org/en-US/fedora-coreos/auto-updates/) and [here](https://coreos.github.io/zincati/usage/updates-strategy/).
    24  
    25  ## OPTIONS
    26  
    27  #### **--cpus**=*number*
    28  
    29  Number of CPUs.
    30  
    31  #### **--disk-size**=*number*
    32  
    33  Size of the disk for the guest VM in GB.
    34  
    35  #### **--help**
    36  
    37  Print usage statement.
    38  
    39  #### **--ignition-path**
    40  
    41  Fully qualified path of the ignition file.
    42  
    43  If an ignition file is provided, the file
    44  will be copied into the user's CONF_DIR and renamed.  Additionally, no SSH keys will
    45  be generated nor will a system connection be made.  It is assumed that the user will
    46  do these things manually or handle otherwise.
    47  
    48  #### **--image-path**
    49  
    50  Fully qualified path or URL to the VM image.
    51  Can also be set to `testing`, `next`, or `stable` to pull down default image.
    52  Defaults to `testing`.
    53  
    54  #### **--memory**, **-m**=*number*
    55  
    56  Memory (in MB).
    57  
    58  #### **--now**
    59  
    60  Start the virtual machine immediately after it has been initialized.
    61  
    62  #### **--rootful**=*true|false*
    63  
    64  Whether this machine should prefer rootful (`true`) or rootless (`false`)
    65  container execution. This option will also determine the remote connection default
    66  if there is no existing remote connection configurations.
    67  
    68  API forwarding, if available, will follow this setting.
    69  
    70  #### **--timezone**
    71  
    72  Set the timezone for the machine and containers.  Valid values are `local` or
    73  a `timezone` such as `America/Chicago`.  A value of `local`, which is the default,
    74  means to use the timezone of the machine host.
    75  
    76  #### **--volume**, **-v**=*source:target*
    77  
    78  Mounts a volume from source to target.
    79  
    80  Create a mount. If /host-dir:/machine-dir is specified as the `*source:target*`,
    81  Podman mounts _host-dir_ in the host to _machine-dir_ in the Podman machine.
    82  
    83  The root filesystem is mounted read-only in the default operating system,
    84  so mounts must be created under the /mnt directory.
    85  
    86  Default volume mounts are defined in *containers.conf*.  Unless changed, the default values
    87  is `$HOME:$HOME`.
    88  
    89  #### **--volume-driver**
    90  
    91  Driver to use for mounting volumes from the host, such as `virtfs`.
    92  
    93  ## EXAMPLES
    94  
    95  ```
    96  $ podman machine init
    97  $ podman machine init myvm
    98  $ podman machine init --rootful
    99  $ podman machine init --disk-size 50
   100  $ podman machine init --memory=1024 myvm
   101  $ podman machine init -v /Users:/mnt/Users
   102  ```
   103  
   104  ## SEE ALSO
   105  **[podman(1)](podman.1.md)**, **[podman-machine(1)](podman-machine.1.md)**
   106  
   107  ## HISTORY
   108  March 2021, Originally compiled by Ashley Cui <acui@redhat.com>