1podman-machine-set(1) General Commands Manual podman-machine-set(1)
2
3
4
6 podman-machine-set - Set a virtual machine setting
7
8
10 podman machine set [options] [name]
11
12
14 Change a machine setting.
15
16
17 The default machine name is podman-machine-default. If a machine name
18 is not specified as an argument, then the settings will be applied to
19 podman-machine-default.
20
21
22 Rootless only.
23
24
26 --cpus=number
27 Number of CPUs. Only supported for QEMU machines.
28
29
30 --disk-size=number
31 Size of the disk for the guest VM in GB. Can only be increased. Only
32 supported for QEMU machines.
33
34
35 --help
36 Print usage statement.
37
38
39 --memory, -m=number
40 Memory (in MB). Only supported for QEMU machines.
41
42
43 --rootful
44 Whether this machine prefers rootful (true) or rootless (false) con‐
45 tainer execution. This option updates the current podman remote connec‐
46 tion default if it is currently pointing at the specified machine name
47 (or podman-machine-default if no name is specified).
48
49
50 Unlike [podman system connection default] this option makes the API
51 socket, if available, forward to the rootful/rootless socket in the VM.
52
53
54 Note that changing this option means that all the existing contain‐
55 ers/images/volumes, etc... are no longer visible with the default con‐
56 nection/socket. This is because the root and rootless users in the VM
57 are completely separated and do not share any storage. The data however
58 is not lost and you can always change this option back or use the other
59 connection to access it.
60
61
62 --usb=bus=number,devnum=number or vendor=hexadecimal,product=hexadecimal or
63 ""
64 Assign a USB device from the host to the VM. Only supported for QEMU
65 Machines.
66
67
68 The device needs to be present when the VM starts. The device needs to
69 have proper permissions in order to be assign to podman machine.
70
71
72 Use an empty string to remove all previously set USB devices.
73
74
75 Note that using bus and device number are simpler but the values can
76 change every boot or when the device is unplugged. Using vendor and
77 product might lead to collision in the case of multiple devices with
78 the same vendor product value, the first available device is assigned.
79
80
81 --user-mode-networking
82 Indicates that this machine relays traffic from the guest through a
83 user-space process running on the host. In some VPN configurations the
84 VPN may drop traffic from alternate network interfaces, including VM
85 network devices. By enabling user-mode networking (a setting of true),
86 VPNs observe all podman machine traffic as coming from the host, by‐
87 passing the problem.
88
89
90 When the qemu backend is used (Linux, Mac), user-mode networking is
91 mandatory and the only allowed value is true. In contrast, The Win‐
92 dows/WSL backend defaults to false, and follows the standard WSL net‐
93 work setup. Changing this setting to true on Windows/WSL informs Pod‐
94 man to replace the WSL networking setup on start of this machine in‐
95 stance with a user-mode networking distribution. Since WSL shares the
96 same kernel across distributions, all other running distributions
97 reuses this network. Likewise, when the last machine instance with a
98 true setting stops, the original networking setup is restored.
99
100
102 To switch the default VM podman-machine-default from rootless to root‐
103 ful:
104
105 $ podman machine set --rootful
106
107
108
109 or more explicitly:
110
111 $ podman machine set --rootful=true
112
113
114
115 To switch the default VM podman-machine-default from rootful to root‐
116 less:
117
118 $ podman machine set --rootful=false
119
120
121
122 To switch the VM myvm from rootless to rootful:
123
124 $ podman machine set --rootful myvm
125
126
127
129 podman(1), podman-machine(1)
130
131
133 February 2022, Originally compiled by Jason Greene jason.greene@red‐
134 hat.com ⟨mailto:jason.greene@redhat.com⟩
135
136
137
138 podman-machine-set(1)