1podman-machine-init(1)      General Commands Manual     podman-machine-init(1)
2
3
4

NAME

6       podman-machine-init - Initialize a new virtual machine
7
8

SYNOPSIS

10       podman machine init [options] [name]
11
12

DESCRIPTION

14       Initialize a new virtual machine for Podman.
15
16
17       Rootless only.
18
19
20       Podman on MacOS and Windows requires a virtual machine. This is because
21       containers are Linux - containers do not run on any  other  OS  because
22       containers' core functionality are tied to the Linux kernel. Podman ma‐
23       chine must be used to manage MacOS and Windows machines, but can be op‐
24       tionally used on Linux.
25
26
27       podman  machine init initializes a new Linux virtual machine where con‐
28       tainers are run.  SSH keys are automatically generated  to  access  the
29       VM,  and  system connections to the root account and a user account in‐
30       side the VM are added.
31
32
33       By default, the VM distribution is Fedora CoreOS.   Fedora  CoreOS  up‐
34       grades  come out every 14 days and are detected and installed automati‐
35       cally. The VM will be rebooted during the upgrade.  For  more  informa‐
36       tion  on updates and advanced configuration, please see the FCOS update
37       docs here and here.
38
39

OPTIONS

41   --cpus=number
42       Number of CPUs.
43
44
45   --disk-size=number
46       Size of the disk for the guest VM in GB.
47
48
49   --help
50       Print usage statement.
51
52
53   --ignition-path
54       Fully qualified path of the ignition file.
55
56
57       If an ignition file is provided, the  file  will  be  copied  into  the
58       user's  CONF_DIR and renamed.  Additionally, no SSH keys will be gener‐
59       ated nor will a system connection be made.  It is assumed that the user
60       will do these things manually or handle otherwise.
61
62
63   --image-path
64       Fully  qualified path or URL to the VM image.  Can also be set to test‐
65       ing, next, or stable to pull down default image.  Defaults to testing.
66
67
68   --memory, -m=number
69       Memory (in MB).
70
71
72   --now
73       Start the virtual machine immediately after it has been initialized.
74
75
76   --rootful
77       Whether this machine should prefer rootful (true) or  rootless  (false)
78       container execution. This option will also determine the remote connec‐
79       tion default if there is no existing remote connection configurations.
80
81
82       API forwarding, if available, will follow this setting.
83
84
85   --timezone
86       Set the timezone for the machine and containers.  Valid values are  lo‐
87       cal  or a timezone such as America/Chicago.  A value of local, which is
88       the default, means to use the timezone of the machine host.
89
90
91   --username
92       Username to use for executing commands in remote VM. Default  value  is
93       core  for  FCOS  and user for Fedora (default on Windows hosts). Should
94       match the one used inside the resulting VM image.
95
96
97   --volume, -v=source:target[:options]
98       Mounts a volume from source to target.
99
100
101       Create  a  mount.  If  /host-dir:/machine-dir  is  specified   as   the
102       *source:target*,  Podman  mounts host-dir in the host to machine-dir in
103       the Podman machine.
104
105
106       Additional options may be specified as a comma-separated string. Recog‐
107       nized  options  are:  *  ro:  mount volume read-only * rw: mount volume
108       read/write (default)  *  security_model=[model]:  specify  9p  security
109       model (see below)
110
111
112       The  9p  security  model  [determines] https://wiki.qemu.org/Documenta
113       tion/9psetup#Starting_the_Guest_directly if and how the  9p  filesystem
114       translates  some  filesystem  operations  before  actual storage on the
115       host. The default value of mapped-xattr specifies that  9p  store  sym‐
116       links and some file attributes as extended attributes on the host. This
117       is suitable when the host and the guest do not need to interoperate  on
118       the  shared  filesystem,  but has caveats for actual shared access; no‐
119       tably, symlinks on the host are not usable on the guest and vice versa.
120       If  interoperability is required, then choose none instead, but keep in
121       mind that the guest will not be able to do things that the user running
122       the virtual machine cannot do, e.g. create files owned by another user.
123       Using none is almost certainly the best choice for read-only volumes.
124
125
126       Example: -v "$HOME/git:$HOME/git:ro,security_model=none"
127
128
129       Default volume mounts are defined in containers.conf.  Unless  changed,
130       the default values is $HOME:$HOME.
131
132
133   --volume-driver
134       Driver to use for mounting volumes from the host, such as virtfs.
135
136

EXAMPLES

138              $ podman machine init
139              $ podman machine init myvm
140              $ podman machine init --rootful
141              $ podman machine init --disk-size 50
142              $ podman machine init --memory=1024 myvm
143              $ podman machine init -v /Users:/mnt/Users
144
145
146

SEE ALSO

148       podman(1), podman-machine(1)
149
150

HISTORY

152       March   2021,   Originally   compiled  by  Ashley  Cui  acui@redhat.com
153       ⟨mailto:acui@redhat.com⟩
154
155
156
157                                                        podman-machine-init(1)
Impressum