]> git.proxmox.com Git - pve-docs.git/blame - qm.1-synopsis.adoc
qm: slightly reposition mapping screenshots
[pve-docs.git] / qm.1-synopsis.adoc
CommitLineData
1f554f76
DM
1*qm* `<COMMAND> [ARGS] [OPTIONS]`
2
4d47f125 3*qm agent*
32d876b5 4
4d47f125 5An alias for 'qm guest cmd'.
32d876b5 6
e2d681b3
TL
7*qm cleanup* `<vmid> <clean-shutdown> <guest-requested>`
8
9Cleans up resources like tap devices, vgpus, etc. Called after a vm shuts
10down, crashes, etc.
11
8dd66e12 12`<vmid>`: `<integer> (100 - 999999999)` ::
e2d681b3
TL
13
14The (unique) ID of the VM.
15
16`<clean-shutdown>`: `<boolean>` ::
17
18Indicates if qemu shutdown cleanly.
19
20`<guest-requested>`: `<boolean>` ::
21
22Indicates if the shutdown was requested by the guest or via qmp.
23
1f554f76
DM
24*qm clone* `<vmid> <newid>` `[OPTIONS]`
25
26Create a copy of virtual machine/template.
27
8dd66e12 28`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
29
30The (unique) ID of the VM.
31
8dd66e12 32`<newid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
33
34VMID for the clone.
35
95895385
TL
36`--bwlimit` `<integer> (0 - N)` ('default =' `clone limit from datacenter or storage config`)::
37
38Override I/O bandwidth limit (in KiB/s).
39
2489d6df 40`--description` `<string>` ::
1f554f76
DM
41
42Description for the new VM.
43
2489d6df 44`--format` `<qcow2 | raw | vmdk>` ::
1f554f76 45
27a7acb2 46Target format for file storage. Only valid for full clone.
1f554f76 47
27a7acb2 48`--full` `<boolean>` ::
1f554f76 49
27a7acb2 50Create a full copy of all disks. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.
1f554f76 51
2489d6df 52`--name` `<string>` ::
1f554f76
DM
53
54Set a name for the new VM.
55
2489d6df 56`--pool` `<string>` ::
1f554f76
DM
57
58Add the new VM to the specified pool.
59
2489d6df 60`--snapname` `<string>` ::
1f554f76
DM
61
62The name of the snapshot.
63
2489d6df 64`--storage` `<string>` ::
1f554f76
DM
65
66Target storage for full clone.
1f554f76 67
2489d6df 68`--target` `<string>` ::
1f554f76
DM
69
70Target node. Only allowed if the original VM is on shared storage.
71
1e3f8156
TL
72*qm cloudinit dump* `<vmid> <type>`
73
74Get automatically generated cloudinit config.
75
8dd66e12 76`<vmid>`: `<integer> (100 - 999999999)` ::
1e3f8156
TL
77
78The (unique) ID of the VM.
79
80`<type>`: `<meta | network | user>` ::
81
82Config type.
83
4e7f60c2
TL
84*qm cloudinit pending* `<vmid>`
85
86Get the cloudinit configuration with both current and pending values.
87
8dd66e12 88`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
89
90The (unique) ID of the VM.
91
92*qm cloudinit update* `<vmid>`
93
94Regenerate and change cloudinit config drive.
95
8dd66e12 96`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
97
98The (unique) ID of the VM.
99
1f554f76
DM
100*qm config* `<vmid>` `[OPTIONS]`
101
e9cd3bd4
TL
102Get the virtual machine configuration with pending configuration changes
103applied. Set the 'current' parameter to get the current configuration
104instead.
1f554f76 105
8dd66e12 106`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
107
108The (unique) ID of the VM.
109
2489d6df 110`--current` `<boolean>` ('default =' `0`)::
1f554f76
DM
111
112Get current values (instead of pending values).
113
5f26e15b
TL
114`--snapshot` `<string>` ::
115
116Fetch config values from given snapshot.
117
1f554f76
DM
118*qm create* `<vmid>` `[OPTIONS]`
119
120Create or restore a virtual machine.
121
8dd66e12 122`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
123
124The (unique) ID of the VM.
125
2489d6df 126`--acpi` `<boolean>` ('default =' `1`)::
1f554f76
DM
127
128Enable/disable ACPI.
129
4e7f60c2
TL
130`--affinity` `<string>` ::
131
81a3384d 132List of host cores used to execute guest processes, for example: 0,5,8-11
4e7f60c2 133
9d2e98ed 134`--agent` `[enabled=]<1|0> [,freeze-fs-on-backup=<1|0>] [,fstrim_cloned_disks=<1|0>] [,type=<virtio|isa>]` ::
1f554f76 135
9d2e98ed 136Enable/disable communication with the QEMU Guest Agent and its properties.
1f554f76 137
e2d681b3
TL
138`--arch` `<aarch64 | x86_64>` ::
139
140Virtual processor architecture. Defaults to the host.
141
2489d6df 142`--archive` `<string>` ::
1f554f76 143
c5aa7e14 144The backup archive. Either the file system path to a .tar or .vma file (use '-' to pipe data from stdin) or a proxmox storage backup volume identifier.
1f554f76 145
2489d6df 146`--args` `<string>` ::
1f554f76 147
c2993fe5 148Arbitrary arguments passed to kvm.
1f554f76 149
d2656385 150`--audio0` `device=<ich9-intel-hda|intel-hda|AC97> [,driver=<spice|none>]` ::
1c532546
TL
151
152Configure a audio device, useful in combination with QXL/Spice.
153
2489d6df 154`--autostart` `<boolean>` ('default =' `0`)::
1f554f76
DM
155
156Automatic restart after crash (currently ignored).
157
2489d6df 158`--balloon` `<integer> (0 - N)` ::
1f554f76 159
9d2e98ed 160Amount of target RAM for the VM in MiB. Using zero disables the ballon driver.
1f554f76 161
2489d6df 162`--bios` `<ovmf | seabios>` ('default =' `seabios`)::
1f554f76
DM
163
164Select BIOS implementation.
165
4772952b 166`--boot` `[[legacy=]<[acdn]{1,4}>] [,order=<device[;device...]>]` ::
1f554f76 167
5370fa8c 168Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.
1f554f76 169
2489d6df 170`--bootdisk` `(ide|sata|scsi|virtio)\d+` ::
1f554f76 171
4772952b 172Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.
1f554f76 173
95895385 174`--bwlimit` `<integer> (0 - N)` ('default =' `restore limit from datacenter or storage config`)::
27a7acb2 175
95895385 176Override I/O bandwidth limit (in KiB/s).
27a7acb2 177
2489d6df 178`--cdrom` `<volume>` ::
1f554f76
DM
179
180This is an alias for option -ide2
181
5370fa8c 182`--cicustom` `[meta=<volume>] [,network=<volume>] [,user=<volume>] [,vendor=<volume>]` ::
95895385
TL
183
184cloud-init: Specify custom files to replace the automatically generated ones at start.
185
27a7acb2
DM
186`--cipassword` `<password>` ::
187
188cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.
189
d2656385 190`--citype` `<configdrive2 | nocloud | opennebula>` ::
27a7acb2
DM
191
192Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.
193
159464a9
TL
194`--ciupgrade` `<boolean>` ::
195
196cloud-init: do an automatic package upgrade after the first boot.
197
27a7acb2
DM
198`--ciuser` `<string>` ::
199
200cloud-init: User name to change ssh keys and password for instead of the image's configured default user.
201
2489d6df 202`--cores` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
203
204The number of cores per socket.
205
04d22a9f 206`--cpu` `[[cputype=]<string>] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>] [,hv-vendor-id=<vendor-id>] [,phys-bits=<8-64|host>] [,reported-model=<enum>]` ::
1f554f76
DM
207
208Emulated CPU type.
209
2489d6df 210`--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 211
9b3e4991 212Limit of CPU usage.
1f554f76 213
7af2edf9 214`--cpuunits` `<integer> (1 - 262144)` ('default =' `cgroup v1: 1024, cgroup v2: 100`)::
1f554f76 215
5370fa8c 216CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.
1f554f76 217
2489d6df 218`--description` `<string>` ::
1f554f76 219
8f4d9c87 220Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.
1f554f76 221
7af2edf9 222`--efidisk0` `[file=]<volume> [,efitype=<2m|4m>] [,format=<enum>] [,import-from=<source volume>] [,pre-enrolled-keys=<1|0>] [,size=<DiskSize>]` ::
2c0dde61 223
9d2e98ed 224Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
2c0dde61 225
2489d6df 226`--force` `<boolean>` ::
1f554f76
DM
227
228Allow to overwrite existing VM.
229+
230NOTE: Requires option(s): `archive`
231
2489d6df 232`--freeze` `<boolean>` ::
1f554f76
DM
233
234Freeze CPU at startup (use 'c' monitor command to start execution).
235
5f26e15b
TL
236`--hookscript` `<string>` ::
237
238Script that will be executed during various steps in the vms lifetime.
239
499c9b7f 240`--hostpci[n]` `[[host=]<HOSTPCIID[;HOSTPCIID2...]>] [,device-id=<hex id>] [,legacy-igd=<1|0>] [,mapping=<mapping-id>] [,mdev=<string>] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=<string>] [,sub-device-id=<hex id>] [,sub-vendor-id=<hex id>] [,vendor-id=<hex id>] [,x-vga=<1|0>]` ::
1f554f76 241
c2993fe5 242Map host PCI devices into guest.
1f554f76 243
2489d6df 244`--hotplug` `<string>` ('default =' `network,disk,usb`)::
1f554f76 245
4e7f60c2 246Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory', 'usb' and 'cloudinit'. Use '0' to disable hotplug completely. Using '1' as value is an alias for the default `network,disk,usb`. USB hotplugging is possible for guests with machine version >= 7.1 and ostype l26 or windows > 7.
1f554f76 247
2489d6df 248`--hugepages` `<1024 | 2 | any>` ::
2c0dde61
DM
249
250Enable/disable hugepages memory.
251
7af2edf9 252`--ide[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,model=<model>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 253
7af2edf9 254Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 255
27a7acb2
DM
256`--ipconfig[n]` `[gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>]` ::
257
258cloud-init: Specify IP addresses and gateways for the corresponding interface.
259+
260IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.
261+
4772952b
TL
262The special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit
263gateway should be provided.
d2656385
TL
264For IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires
265cloud-init 19.4 or newer.
27a7acb2 266+
4772952b
TL
267If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using
268dhcp on IPv4.
27a7acb2 269
95895385
TL
270`--ivshmem` `size=<integer> [,name=<string>]` ::
271
272Inter-VM shared memory. Useful for direct communication between VMs, or to the host.
273
4772952b
TL
274`--keephugepages` `<boolean>` ('default =' `0`)::
275
276Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.
277
35a75dd3 278`--keyboard` `<da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr>` ::
1f554f76 279
7af2edf9 280Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.
1f554f76 281
2489d6df 282`--kvm` `<boolean>` ('default =' `1`)::
1f554f76
DM
283
284Enable/disable KVM hardware virtualization.
285
d2656385
TL
286`--live-restore` `<boolean>` ::
287
288Start the VM immediately from the backup and restore in background. PBS only.
289+
290NOTE: Requires option(s): `archive`
291
2489d6df 292`--localtime` `<boolean>` ::
1f554f76 293
5370fa8c 294Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.
1f554f76 295
95895385 296`--lock` `<backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending>` ::
1f554f76
DM
297
298Lock/unlock the VM.
299
5c1699e5 300`--machine` `(pc|pc(-i440fx)?-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|virt(?:-\d+(\.\d+)+)?(\+pve\d+)?)` ::
1f554f76 301
9d2e98ed 302Specifies the QEMU machine type.
1f554f76 303
2489d6df 304`--memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76 305
9d2e98ed 306Amount of RAM for the VM in MiB. This is the maximum available memory when you use the balloon device.
1f554f76 307
2489d6df 308`--migrate_downtime` `<number> (0 - N)` ('default =' `0.1`)::
1f554f76
DM
309
310Set maximum tolerated downtime (in seconds) for migrations.
311
2489d6df 312`--migrate_speed` `<integer> (0 - N)` ('default =' `0`)::
1f554f76
DM
313
314Set maximum speed (in MB/s) for migrations. Value 0 is no limit.
315
2489d6df 316`--name` `<string>` ::
1f554f76
DM
317
318Set a name for the VM. Only used on the configuration web interface.
319
27a7acb2
DM
320`--nameserver` `<string>` ::
321
de786b48 322cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
27a7acb2 323
ac70d7d1 324`--net[n]` `[model=]<enum> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,mtu=<integer>] [,queues=<integer>] [,rate=<number>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]` ::
1f554f76
DM
325
326Specify network devices.
1f554f76 327
2489d6df 328`--numa` `<boolean>` ('default =' `0`)::
1f554f76 329
9b3e4991 330Enable/disable NUMA.
1f554f76 331
2489d6df 332`--numa[n]` `cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]` ::
1f554f76 333
c2993fe5 334NUMA topology.
1f554f76 335
2489d6df 336`--onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
337
338Specifies whether a VM will be started during system bootup.
339
5370fa8c 340`--ostype` `<l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp>` ::
1f554f76 341
c2993fe5 342Specify guest operating system.
1f554f76 343
2489d6df 344`--parallel[n]` `/dev/parport\d+|/dev/usb/lp\d+` ::
1f554f76
DM
345
346Map host parallel devices (n is 0 to 2).
1f554f76 347
2489d6df 348`--pool` `<string>` ::
1f554f76
DM
349
350Add the VM to the specified pool.
351
2489d6df 352`--protection` `<boolean>` ('default =' `0`)::
1f554f76 353
c2993fe5 354Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.
1f554f76 355
2489d6df 356`--reboot` `<boolean>` ('default =' `1`)::
1f554f76
DM
357
358Allow reboot. If set to '0' the VM exit on reboot.
359
c5aa7e14
TL
360`--rng0` `[source=]</dev/urandom|/dev/random|/dev/hwrng> [,max_bytes=<integer>] [,period=<integer>]` ::
361
362Configure a VirtIO-based Random Number Generator.
363
7af2edf9 364`--sata[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 365
7af2edf9 366Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 367
7af2edf9 368`--scsi[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,queues=<integer>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,ro=<1|0>] [,scsiblock=<1|0>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 369
7af2edf9 370Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 371
2489d6df 372`--scsihw` `<lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single>` ('default =' `lsi`)::
1f554f76 373
c2993fe5 374SCSI controller model
1f554f76 375
27a7acb2
DM
376`--searchdomain` `<string>` ::
377
de786b48 378cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
27a7acb2 379
2489d6df 380`--serial[n]` `(/dev/.+|socket)` ::
1f554f76 381
c2993fe5 382Create a serial device inside the VM (n is 0 to 3)
1f554f76 383
2489d6df 384`--shares` `<integer> (0 - 50000)` ('default =' `1000`)::
1f554f76 385
5da3d723 386Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd.
1f554f76 387
1e3f8156 388`--smbios1` `[base64=<1|0>] [,family=<Base64 encoded string>] [,manufacturer=<Base64 encoded string>] [,product=<Base64 encoded string>] [,serial=<Base64 encoded string>] [,sku=<Base64 encoded string>] [,uuid=<UUID>] [,version=<Base64 encoded string>]` ::
1f554f76
DM
389
390Specify SMBIOS type 1 fields.
391
2489d6df 392`--smp` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
393
394The number of CPUs. Please use option -sockets instead.
395
2489d6df 396`--sockets` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
397
398The number of CPU sockets.
399
1c532546
TL
400`--spice_enhancements` `[foldersharing=<1|0>] [,videostreaming=<off|all|filter>]` ::
401
402Configure additional enhancements for SPICE.
403
27a7acb2
DM
404`--sshkeys` `<filepath>` ::
405
406cloud-init: Setup public SSH keys (one key per line, OpenSSH format).
407
5da3d723
TL
408`--start` `<boolean>` ('default =' `0`)::
409
410Start VM after it was created successfully.
411
2489d6df 412`--startdate` `(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)` ('default =' `now`)::
1f554f76 413
4772952b 414Set the initial date of the real time clock. Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'.
1f554f76 415
2489d6df 416`--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
1f554f76 417
c2993fe5 418Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
1f554f76 419
2489d6df 420`--storage` `<string>` ::
1f554f76
DM
421
422Default storage.
423
2489d6df 424`--tablet` `<boolean>` ('default =' `1`)::
1f554f76 425
c2993fe5 426Enable/disable the USB tablet device.
1f554f76 427
5c1699e5
TL
428`--tags` `<string>` ::
429
430Tags of the VM. This is only meta information.
431
2489d6df 432`--tdf` `<boolean>` ('default =' `0`)::
1f554f76
DM
433
434Enable/disable time drift fix.
435
2489d6df 436`--template` `<boolean>` ('default =' `0`)::
1f554f76
DM
437
438Enable/disable Template.
439
7af2edf9 440`--tpmstate0` `[file=]<volume> [,import-from=<source volume>] [,size=<DiskSize>] [,version=<v1.2|v2.0>]` ::
5370fa8c 441
7af2edf9 442Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
5370fa8c 443
2489d6df 444`--unique` `<boolean>` ::
1f554f76
DM
445
446Assign a unique random ethernet address.
447+
448NOTE: Requires option(s): `archive`
449
c5aa7e14 450`--unused[n]` `[file=]<volume>` ::
1f554f76 451
c2993fe5 452Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76 453
499c9b7f 454`--usb[n]` `[[host=]<HOSTUSBDEVICE|spice>] [,mapping=<mapping-id>] [,usb3=<1|0>]` ::
1f554f76 455
4e7f60c2 456Configure an USB device (n is 0 to 4, for machine version >= 7.1 and ostype l26 or windows > 7, n can be up to 14).
1f554f76 457
2489d6df 458`--vcpus` `<integer> (1 - N)` ('default =' `0`)::
1f554f76
DM
459
460Number of hotplugged vcpus.
461
e2d681b3 462`--vga` `[[type=]<enum>] [,memory=<integer>]` ::
1f554f76 463
e2d681b3 464Configure the VGA hardware.
1f554f76 465
7af2edf9 466`--virtio[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,ro=<1|0>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>]` ::
1f554f76 467
7af2edf9 468Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 469
4d47f125
TL
470`--vmgenid` `<UUID>` ('default =' `1 (autogenerated)`)::
471
472Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.
473
2489d6df
WB
474`--vmstatestorage` `<string>` ::
475
476Default storage for VM state volumes/files.
477
478`--watchdog` `[[model=]<i6300esb|ib700>] [,action=<enum>]` ::
1f554f76 479
c2993fe5 480Create a virtual hardware watchdog device.
1f554f76 481
1f554f76
DM
482*qm delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
483
484Delete a VM snapshot.
485
8dd66e12 486`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
487
488The (unique) ID of the VM.
489
013dc89f 490`<snapname>`: `<string>` ::
1f554f76
DM
491
492The name of the snapshot.
493
2489d6df 494`--force` `<boolean>` ::
1f554f76
DM
495
496For removal from config file, even if removing disk snapshots fails.
497
1f554f76
DM
498*qm destroy* `<vmid>` `[OPTIONS]`
499
d2656385
TL
500Destroy the VM and all used/owned volumes. Removes any VM specific
501permissions and firewall rules
1f554f76 502
8dd66e12 503`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
504
505The (unique) ID of the VM.
506
8f4d9c87 507`--destroy-unreferenced-disks` `<boolean>` ('default =' `0`)::
d2656385
TL
508
509If set, destroy additionally all disks not referenced in the config but with a matching VMID from all enabled storages.
510
1c532546
TL
511`--purge` `<boolean>` ::
512
d2656385 513Remove VMID from configurations, like backup & replication jobs and HA.
1c532546 514
2489d6df 515`--skiplock` `<boolean>` ::
1f554f76
DM
516
517Ignore locks - only root is allowed to use this option.
518
4e7f60c2
TL
519*qm disk import* `<vmid> <source> <storage>` `[OPTIONS]`
520
521Import an external disk image as an unused disk in a VM. The
522 image format has to be supported by qemu-img(1).
523
8dd66e12 524`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
525
526The (unique) ID of the VM.
527
528`<source>`: `<string>` ::
529
530Path to the disk image to import
531
532`<storage>`: `<string>` ::
533
534Target storage ID
535
536`--format` `<qcow2 | raw | vmdk>` ::
537
538Target format
539
540*qm disk move* `<vmid> <disk> [<storage>]` `[OPTIONS]`
541
542Move volume to different storage or to a different VM.
543
8dd66e12 544`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
545
546The (unique) ID of the VM.
547
548`<disk>`: `<efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | unused0 | unused1 | unused10 | unused100 | unused101 | unused102 | unused103 | unused104 | unused105 | unused106 | unused107 | unused108 | unused109 | unused11 | unused110 | unused111 | unused112 | unused113 | unused114 | unused115 | unused116 | unused117 | unused118 | unused119 | unused12 | unused120 | unused121 | unused122 | unused123 | unused124 | unused125 | unused126 | unused127 | unused128 | unused129 | unused13 | unused130 | unused131 | unused132 | unused133 | unused134 | unused135 | unused136 | unused137 | unused138 | unused139 | unused14 | unused140 | unused141 | unused142 | unused143 | unused144 | unused145 | unused146 | unused147 | unused148 | unused149 | unused15 | unused150 | unused151 | unused152 | unused153 | unused154 | unused155 | unused156 | unused157 | unused158 | unused159 | unused16 | unused160 | unused161 | unused162 | unused163 | unused164 | unused165 | unused166 | unused167 | unused168 | unused169 | unused17 | unused170 | unused171 | unused172 | unused173 | unused174 | unused175 | unused176 | unused177 | unused178 | unused179 | unused18 | unused180 | unused181 | unused182 | unused183 | unused184 | unused185 | unused186 | unused187 | unused188 | unused189 | unused19 | unused190 | unused191 | unused192 | unused193 | unused194 | unused195 | unused196 | unused197 | unused198 | unused199 | unused2 | unused20 | unused200 | unused201 | unused202 | unused203 | unused204 | unused205 | unused206 | unused207 | unused208 | unused209 | unused21 | unused210 | unused211 | unused212 | unused213 | unused214 | unused215 | unused216 | unused217 | unused218 | unused219 | unused22 | unused220 | unused221 | unused222 | unused223 | unused224 | unused225 | unused226 | unused227 | unused228 | unused229 | unused23 | unused230 | unused231 | unused232 | unused233 | unused234 | unused235 | unused236 | unused237 | unused238 | unused239 | unused24 | unused240 | unused241 | unused242 | unused243 | unused244 | unused245 | unused246 | unused247 | unused248 | unused249 | unused25 | unused250 | unused251 | unused252 | unused253 | unused254 | unused255 | unused26 | unused27 | unused28 | unused29 | unused3 | unused30 | unused31 | unused32 | unused33 | unused34 | unused35 | unused36 | unused37 | unused38 | unused39 | unused4 | unused40 | unused41 | unused42 | unused43 | unused44 | unused45 | unused46 | unused47 | unused48 | unused49 | unused5 | unused50 | unused51 | unused52 | unused53 | unused54 | unused55 | unused56 | unused57 | unused58 | unused59 | unused6 | unused60 | unused61 | unused62 | unused63 | unused64 | unused65 | unused66 | unused67 | unused68 | unused69 | unused7 | unused70 | unused71 | unused72 | unused73 | unused74 | unused75 | unused76 | unused77 | unused78 | unused79 | unused8 | unused80 | unused81 | unused82 | unused83 | unused84 | unused85 | unused86 | unused87 | unused88 | unused89 | unused9 | unused90 | unused91 | unused92 | unused93 | unused94 | unused95 | unused96 | unused97 | unused98 | unused99 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9>` ::
549
550The disk you want to move.
551
552`<storage>`: `<string>` ::
553
554Target storage.
555
556`--bwlimit` `<integer> (0 - N)` ('default =' `move limit from datacenter or storage config`)::
557
558Override I/O bandwidth limit (in KiB/s).
559
560`--delete` `<boolean>` ('default =' `0`)::
561
562Delete the original disk after successful copy. By default the original disk is kept as unused disk.
563
564`--digest` `<string>` ::
565
566Prevent changes if current configuration file has different SHA1"
567 ." digest. This can be used to prevent concurrent modifications.
568
569`--format` `<qcow2 | raw | vmdk>` ::
570
571Target Format.
572
573`--target-digest` `<string>` ::
574
575Prevent changes if the current config file of the target VM has a"
576 ." different SHA1 digest. This can be used to detect concurrent modifications.
577
578`--target-disk` `<efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | unused0 | unused1 | unused10 | unused100 | unused101 | unused102 | unused103 | unused104 | unused105 | unused106 | unused107 | unused108 | unused109 | unused11 | unused110 | unused111 | unused112 | unused113 | unused114 | unused115 | unused116 | unused117 | unused118 | unused119 | unused12 | unused120 | unused121 | unused122 | unused123 | unused124 | unused125 | unused126 | unused127 | unused128 | unused129 | unused13 | unused130 | unused131 | unused132 | unused133 | unused134 | unused135 | unused136 | unused137 | unused138 | unused139 | unused14 | unused140 | unused141 | unused142 | unused143 | unused144 | unused145 | unused146 | unused147 | unused148 | unused149 | unused15 | unused150 | unused151 | unused152 | unused153 | unused154 | unused155 | unused156 | unused157 | unused158 | unused159 | unused16 | unused160 | unused161 | unused162 | unused163 | unused164 | unused165 | unused166 | unused167 | unused168 | unused169 | unused17 | unused170 | unused171 | unused172 | unused173 | unused174 | unused175 | unused176 | unused177 | unused178 | unused179 | unused18 | unused180 | unused181 | unused182 | unused183 | unused184 | unused185 | unused186 | unused187 | unused188 | unused189 | unused19 | unused190 | unused191 | unused192 | unused193 | unused194 | unused195 | unused196 | unused197 | unused198 | unused199 | unused2 | unused20 | unused200 | unused201 | unused202 | unused203 | unused204 | unused205 | unused206 | unused207 | unused208 | unused209 | unused21 | unused210 | unused211 | unused212 | unused213 | unused214 | unused215 | unused216 | unused217 | unused218 | unused219 | unused22 | unused220 | unused221 | unused222 | unused223 | unused224 | unused225 | unused226 | unused227 | unused228 | unused229 | unused23 | unused230 | unused231 | unused232 | unused233 | unused234 | unused235 | unused236 | unused237 | unused238 | unused239 | unused24 | unused240 | unused241 | unused242 | unused243 | unused244 | unused245 | unused246 | unused247 | unused248 | unused249 | unused25 | unused250 | unused251 | unused252 | unused253 | unused254 | unused255 | unused26 | unused27 | unused28 | unused29 | unused3 | unused30 | unused31 | unused32 | unused33 | unused34 | unused35 | unused36 | unused37 | unused38 | unused39 | unused4 | unused40 | unused41 | unused42 | unused43 | unused44 | unused45 | unused46 | unused47 | unused48 | unused49 | unused5 | unused50 | unused51 | unused52 | unused53 | unused54 | unused55 | unused56 | unused57 | unused58 | unused59 | unused6 | unused60 | unused61 | unused62 | unused63 | unused64 | unused65 | unused66 | unused67 | unused68 | unused69 | unused7 | unused70 | unused71 | unused72 | unused73 | unused74 | unused75 | unused76 | unused77 | unused78 | unused79 | unused8 | unused80 | unused81 | unused82 | unused83 | unused84 | unused85 | unused86 | unused87 | unused88 | unused89 | unused9 | unused90 | unused91 | unused92 | unused93 | unused94 | unused95 | unused96 | unused97 | unused98 | unused99 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9>` ::
579
580The config key the disk will be moved to on the target VM (for example, ide0 or scsi1). Default is the source disk key.
581
8dd66e12 582`--target-vmid` `<integer> (100 - 999999999)` ::
4e7f60c2
TL
583
584The (unique) ID of the VM.
585
586*qm disk rescan* `[OPTIONS]`
587
588Rescan all storages and update disk sizes and unused disk images.
589
590`--dryrun` `<boolean>` ('default =' `0`)::
591
592Do not actually write changes out to VM config(s).
593
8dd66e12 594`--vmid` `<integer> (100 - 999999999)` ::
4e7f60c2
TL
595
596The (unique) ID of the VM.
597
598*qm disk resize* `<vmid> <disk> <size>` `[OPTIONS]`
599
600Extend volume size.
601
8dd66e12 602`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
603
604The (unique) ID of the VM.
605
606`<disk>`: `<efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9>` ::
607
608The disk you want to resize.
609
610`<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
611
612The new size. With the `+` sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.
613
614`--digest` `<string>` ::
615
616Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
617
618`--skiplock` `<boolean>` ::
619
620Ignore locks - only root is allowed to use this option.
621
622*qm disk unlink* `<vmid> --idlist <string>` `[OPTIONS]`
623
624Unlink/delete disk images.
625
8dd66e12 626`<vmid>`: `<integer> (100 - 999999999)` ::
4e7f60c2
TL
627
628The (unique) ID of the VM.
629
630`--force` `<boolean>` ::
631
632Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.
633
634`--idlist` `<string>` ::
635
636A list of disk IDs you want to delete.
637
4d47f125
TL
638*qm guest cmd* `<vmid> <command>`
639
9d2e98ed 640Execute QEMU Guest Agent commands.
4d47f125 641
8dd66e12 642`<vmid>`: `<integer> (100 - 999999999)` ::
4d47f125
TL
643
644The (unique) ID of the VM.
645
646`<command>`: `<fsfreeze-freeze | fsfreeze-status | fsfreeze-thaw | fstrim | get-fsinfo | get-host-name | get-memory-block-info | get-memory-blocks | get-osinfo | get-time | get-timezone | get-users | get-vcpus | info | network-get-interfaces | ping | shutdown | suspend-disk | suspend-hybrid | suspend-ram>` ::
647
648The QGA command.
649
650*qm guest exec* `<vmid> [<extra-args>]` `[OPTIONS]`
651
652Executes the given command via the guest agent
653
8dd66e12 654`<vmid>`: `<integer> (100 - 999999999)` ::
4d47f125
TL
655
656The (unique) ID of the VM.
657
658`<extra-args>`: `<array>` ::
659
660Extra arguments as array
661
c5aa7e14
TL
662`--pass-stdin` `<boolean>` ('default =' `0`)::
663
664When set, read STDIN until EOF and forward to guest agent via 'input-data' (usually treated as STDIN to process launched by guest agent). Allows maximal 1 MiB.
665
4d47f125
TL
666`--synchronous` `<boolean>` ('default =' `1`)::
667
668If set to off, returns the pid immediately instead of waiting for the commmand to finish or the timeout.
669
670`--timeout` `<integer> (0 - N)` ('default =' `30`)::
671
672The maximum time to wait synchronously for the command to finish. If reached, the pid gets returned. Set to 0 to deactivate
673
674*qm guest exec-status* `<vmid> <pid>`
675
676Gets the status of the given pid started by the guest-agent
677
8dd66e12 678`<vmid>`: `<integer> (100 - 999999999)` ::
4d47f125
TL
679
680The (unique) ID of the VM.
681
682`<pid>`: `<integer>` ::
683
684The PID to query
685
686*qm guest passwd* `<vmid> <username>` `[OPTIONS]`
687
688Sets the password for the given user to the given password
689
8dd66e12 690`<vmid>`: `<integer> (100 - 999999999)` ::
4d47f125
TL
691
692The (unique) ID of the VM.
693
694`<username>`: `<string>` ::
695
696The user to set the password for.
697
698`--crypted` `<boolean>` ('default =' `0`)::
699
700set to 1 if the password has already been passed through crypt()
701
35a75dd3 702*qm help* `[OPTIONS]`
1f554f76
DM
703
704Get help about specified command.
705
35a75dd3 706`--extra-args` `<array>` ::
1f554f76 707
35a75dd3 708Shows help for a specific command
1f554f76 709
2489d6df 710`--verbose` `<boolean>` ::
1f554f76
DM
711
712Verbose output format.
713
4e7f60c2 714*qm importdisk*
5d9c884c 715
4e7f60c2 716An alias for 'qm disk import'.
2489d6df 717
2489d6df
WB
718*qm importovf* `<vmid> <manifest> <storage>` `[OPTIONS]`
719
720Create a new VM using parameters read from an OVF manifest
721
8dd66e12 722`<vmid>`: `<integer> (100 - 999999999)` ::
2489d6df
WB
723
724The (unique) ID of the VM.
725
726`<manifest>`: `<string>` ::
727
728path to the ovf file
729
730`<storage>`: `<string>` ::
731
732Target storage ID
733
734`--dryrun` `<boolean>` ::
735
736Print a parsed representation of the extracted OVF parameters, but do not create a VM
737
738`--format` `<qcow2 | raw | vmdk>` ::
5d9c884c
DM
739
740Target format
741
9b3e4991 742*qm list* `[OPTIONS]`
1f554f76
DM
743
744Virtual machine index (per node).
745
2489d6df 746`--full` `<boolean>` ::
9b3e4991
DM
747
748Determine the full status of active VMs.
749
de0983cb
DM
750*qm listsnapshot* `<vmid>`
751
752List all snapshots.
753
8dd66e12 754`<vmid>`: `<integer> (100 - 999999999)` ::
de0983cb
DM
755
756The (unique) ID of the VM.
757
1f554f76
DM
758*qm migrate* `<vmid> <target>` `[OPTIONS]`
759
760Migrate virtual machine. Creates a new migration task.
761
8dd66e12 762`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
763
764The (unique) ID of the VM.
765
013dc89f 766`<target>`: `<string>` ::
1f554f76
DM
767
768Target node.
769
95895385
TL
770`--bwlimit` `<integer> (0 - N)` ('default =' `migrate limit from datacenter or storage config`)::
771
772Override I/O bandwidth limit (in KiB/s).
773
2489d6df 774`--force` `<boolean>` ::
1f554f76 775
c2993fe5 776Allow to migrate VMs which use local devices. Only root may use this option.
1f554f76 777
2489d6df 778`--migration_network` `<string>` ::
de0983cb
DM
779
780CIDR of the (sub) network that is used for migration.
781
2489d6df 782`--migration_type` `<insecure | secure>` ::
de0983cb
DM
783
784Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.
785
2489d6df 786`--online` `<boolean>` ::
1f554f76 787
1c532546 788Use online/live migration if VM is running. Ignored if VM is stopped.
1f554f76 789
2489d6df 790`--targetstorage` `<string>` ::
52e44c50 791
c5aa7e14 792Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.
52e44c50 793
2489d6df 794`--with-local-disks` `<boolean>` ::
52e44c50
FG
795
796Enable live storage migration for local disk
797
1f554f76
DM
798*qm monitor* `<vmid>`
799
9d2e98ed 800Enter QEMU Monitor interface.
1f554f76 801
8dd66e12 802`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
803
804The (unique) ID of the VM.
805
4e7f60c2 806*qm move-disk*
5370fa8c 807
4e7f60c2 808An alias for 'qm disk move'.
5370fa8c
TL
809
810*qm move_disk*
811
4e7f60c2 812An alias for 'qm disk move'.
5370fa8c 813
1f554f76
DM
814*qm mtunnel*
815
816Used by qmigrate - do not use manually.
817
52e44c50
FG
818*qm nbdstop* `<vmid>`
819
820Stop embedded nbd server.
821
8dd66e12 822`<vmid>`: `<integer> (100 - 999999999)` ::
52e44c50
FG
823
824The (unique) ID of the VM.
825
1f554f76
DM
826*qm pending* `<vmid>`
827
e9cd3bd4 828Get the virtual machine configuration with both current and pending values.
1f554f76 829
8dd66e12 830`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
831
832The (unique) ID of the VM.
833
1c532546
TL
834*qm reboot* `<vmid>` `[OPTIONS]`
835
836Reboot the VM by shutting it down, and starting it again. Applies pending
837changes.
838
8dd66e12 839`<vmid>`: `<integer> (100 - 999999999)` ::
1c532546
TL
840
841The (unique) ID of the VM.
842
843`--timeout` `<integer> (0 - N)` ::
844
845Wait maximal timeout seconds for the shutdown.
846
81a3384d
TL
847*qm remote-migrate* `<vmid> [<target-vmid>] <target-endpoint> --target-bridge <string> --target-storage <string>` `[OPTIONS]`
848
849Migrate virtual machine to a remote cluster. Creates a new migration task.
850EXPERIMENTAL feature!
851
8dd66e12 852`<vmid>`: `<integer> (100 - 999999999)` ::
81a3384d
TL
853
854The (unique) ID of the VM.
855
8dd66e12 856`<target-vmid>`: `<integer> (100 - 999999999)` ::
81a3384d
TL
857
858The (unique) ID of the VM.
859
860`<target-endpoint>`: `apitoken=<A full Proxmox API token including the secret value.> ,host=<Remote Proxmox hostname or IP> [,fingerprint=<Remote host's certificate fingerprint, if not trusted by system store.>] [,port=<integer>]` ::
861
862Remote target endpoint
863
864`--bwlimit` `<integer> (0 - N)` ('default =' `migrate limit from datacenter or storage config`)::
865
866Override I/O bandwidth limit (in KiB/s).
867
868`--delete` `<boolean>` ('default =' `0`)::
869
870Delete the original VM and related data after successful migration. By default the original VM is kept on the source cluster in a stopped state.
871
872`--online` `<boolean>` ::
873
874Use online/live migration if VM is running. Ignored if VM is stopped.
875
876`--target-bridge` `<string>` ::
877
878Mapping from source to target bridges. Providing only a single bridge ID maps all source bridges to that bridge. Providing the special value '1' will map each source bridge to itself.
879
880`--target-storage` `<string>` ::
881
882Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.
883
4e7f60c2 884*qm rescan*
1f554f76 885
4e7f60c2 886An alias for 'qm disk rescan'.
1f554f76 887
1f554f76
DM
888*qm reset* `<vmid>` `[OPTIONS]`
889
890Reset virtual machine.
891
8dd66e12 892`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
893
894The (unique) ID of the VM.
895
2489d6df 896`--skiplock` `<boolean>` ::
1f554f76
DM
897
898Ignore locks - only root is allowed to use this option.
899
4e7f60c2 900*qm resize*
1f554f76 901
4e7f60c2 902An alias for 'qm disk resize'.
1f554f76 903
1f554f76
DM
904*qm resume* `<vmid>` `[OPTIONS]`
905
906Resume virtual machine.
907
8dd66e12 908`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
909
910The (unique) ID of the VM.
911
2489d6df 912`--nocheck` `<boolean>` ::
1f554f76
DM
913
914no description available
915
2489d6df 916`--skiplock` `<boolean>` ::
1f554f76
DM
917
918Ignore locks - only root is allowed to use this option.
919
4e7f60c2 920*qm rollback* `<vmid> <snapname>` `[OPTIONS]`
1f554f76
DM
921
922Rollback VM state to specified snapshot.
923
8dd66e12 924`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
925
926The (unique) ID of the VM.
927
013dc89f 928`<snapname>`: `<string>` ::
1f554f76
DM
929
930The name of the snapshot.
931
4e7f60c2
TL
932`--start` `<boolean>` ('default =' `0`)::
933
9d2e98ed 934Whether the VM should get started after rolling back successfully. (Note: VMs will be automatically started if the snapshot includes RAM.)
4e7f60c2 935
1f554f76
DM
936*qm sendkey* `<vmid> <key>` `[OPTIONS]`
937
938Send key event to virtual machine.
939
8dd66e12 940`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
941
942The (unique) ID of the VM.
943
013dc89f 944`<key>`: `<string>` ::
1f554f76
DM
945
946The key (qemu monitor encoding).
947
2489d6df 948`--skiplock` `<boolean>` ::
1f554f76
DM
949
950Ignore locks - only root is allowed to use this option.
951
1f554f76
DM
952*qm set* `<vmid>` `[OPTIONS]`
953
954Set virtual machine options (synchrounous API) - You should consider using
955the POST method instead for any actions involving hotplug or storage
956allocation.
957
8dd66e12 958`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
959
960The (unique) ID of the VM.
961
2489d6df 962`--acpi` `<boolean>` ('default =' `1`)::
1f554f76
DM
963
964Enable/disable ACPI.
965
4e7f60c2
TL
966`--affinity` `<string>` ::
967
81a3384d 968List of host cores used to execute guest processes, for example: 0,5,8-11
4e7f60c2 969
9d2e98ed 970`--agent` `[enabled=]<1|0> [,freeze-fs-on-backup=<1|0>] [,fstrim_cloned_disks=<1|0>] [,type=<virtio|isa>]` ::
1f554f76 971
9d2e98ed 972Enable/disable communication with the QEMU Guest Agent and its properties.
1f554f76 973
e2d681b3
TL
974`--arch` `<aarch64 | x86_64>` ::
975
976Virtual processor architecture. Defaults to the host.
977
2489d6df 978`--args` `<string>` ::
1f554f76 979
c2993fe5 980Arbitrary arguments passed to kvm.
1f554f76 981
d2656385 982`--audio0` `device=<ich9-intel-hda|intel-hda|AC97> [,driver=<spice|none>]` ::
1c532546
TL
983
984Configure a audio device, useful in combination with QXL/Spice.
985
2489d6df 986`--autostart` `<boolean>` ('default =' `0`)::
1f554f76
DM
987
988Automatic restart after crash (currently ignored).
989
2489d6df 990`--balloon` `<integer> (0 - N)` ::
1f554f76 991
9d2e98ed 992Amount of target RAM for the VM in MiB. Using zero disables the ballon driver.
1f554f76 993
2489d6df 994`--bios` `<ovmf | seabios>` ('default =' `seabios`)::
1f554f76
DM
995
996Select BIOS implementation.
997
4772952b 998`--boot` `[[legacy=]<[acdn]{1,4}>] [,order=<device[;device...]>]` ::
1f554f76 999
5370fa8c 1000Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.
1f554f76 1001
2489d6df 1002`--bootdisk` `(ide|sata|scsi|virtio)\d+` ::
1f554f76 1003
4772952b 1004Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.
1f554f76 1005
2489d6df 1006`--cdrom` `<volume>` ::
1f554f76
DM
1007
1008This is an alias for option -ide2
1009
5370fa8c 1010`--cicustom` `[meta=<volume>] [,network=<volume>] [,user=<volume>] [,vendor=<volume>]` ::
95895385
TL
1011
1012cloud-init: Specify custom files to replace the automatically generated ones at start.
1013
27a7acb2
DM
1014`--cipassword` `<password>` ::
1015
1016cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.
1017
d2656385 1018`--citype` `<configdrive2 | nocloud | opennebula>` ::
27a7acb2
DM
1019
1020Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.
1021
159464a9
TL
1022`--ciupgrade` `<boolean>` ::
1023
1024cloud-init: do an automatic package upgrade after the first boot.
1025
27a7acb2
DM
1026`--ciuser` `<string>` ::
1027
1028cloud-init: User name to change ssh keys and password for instead of the image's configured default user.
1029
2489d6df 1030`--cores` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
1031
1032The number of cores per socket.
1033
04d22a9f 1034`--cpu` `[[cputype=]<string>] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>] [,hv-vendor-id=<vendor-id>] [,phys-bits=<8-64|host>] [,reported-model=<enum>]` ::
1f554f76
DM
1035
1036Emulated CPU type.
1037
2489d6df 1038`--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
1f554f76 1039
9b3e4991 1040Limit of CPU usage.
1f554f76 1041
7af2edf9 1042`--cpuunits` `<integer> (1 - 262144)` ('default =' `cgroup v1: 1024, cgroup v2: 100`)::
1f554f76 1043
5370fa8c 1044CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.
1f554f76 1045
2489d6df 1046`--delete` `<string>` ::
1f554f76
DM
1047
1048A list of settings you want to delete.
1049
2489d6df 1050`--description` `<string>` ::
1f554f76 1051
8f4d9c87 1052Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.
1f554f76 1053
2489d6df 1054`--digest` `<string>` ::
1f554f76 1055
c2993fe5 1056Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
1f554f76 1057
7af2edf9 1058`--efidisk0` `[file=]<volume> [,efitype=<2m|4m>] [,format=<enum>] [,import-from=<source volume>] [,pre-enrolled-keys=<1|0>] [,size=<DiskSize>]` ::
2c0dde61 1059
9d2e98ed 1060Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
2c0dde61 1061
2489d6df 1062`--force` `<boolean>` ::
1f554f76 1063
c2993fe5 1064Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.
1f554f76
DM
1065+
1066NOTE: Requires option(s): `delete`
1067
2489d6df 1068`--freeze` `<boolean>` ::
1f554f76
DM
1069
1070Freeze CPU at startup (use 'c' monitor command to start execution).
1071
5f26e15b
TL
1072`--hookscript` `<string>` ::
1073
1074Script that will be executed during various steps in the vms lifetime.
1075
499c9b7f 1076`--hostpci[n]` `[[host=]<HOSTPCIID[;HOSTPCIID2...]>] [,device-id=<hex id>] [,legacy-igd=<1|0>] [,mapping=<mapping-id>] [,mdev=<string>] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=<string>] [,sub-device-id=<hex id>] [,sub-vendor-id=<hex id>] [,vendor-id=<hex id>] [,x-vga=<1|0>]` ::
1f554f76 1077
c2993fe5 1078Map host PCI devices into guest.
1f554f76 1079
2489d6df 1080`--hotplug` `<string>` ('default =' `network,disk,usb`)::
1f554f76 1081
4e7f60c2 1082Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory', 'usb' and 'cloudinit'. Use '0' to disable hotplug completely. Using '1' as value is an alias for the default `network,disk,usb`. USB hotplugging is possible for guests with machine version >= 7.1 and ostype l26 or windows > 7.
1f554f76 1083
2489d6df 1084`--hugepages` `<1024 | 2 | any>` ::
2c0dde61
DM
1085
1086Enable/disable hugepages memory.
1087
7af2edf9 1088`--ide[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,model=<model>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 1089
7af2edf9 1090Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 1091
27a7acb2
DM
1092`--ipconfig[n]` `[gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>]` ::
1093
1094cloud-init: Specify IP addresses and gateways for the corresponding interface.
1095+
1096IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.
1097+
4772952b
TL
1098The special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit
1099gateway should be provided.
d2656385
TL
1100For IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires
1101cloud-init 19.4 or newer.
27a7acb2 1102+
4772952b
TL
1103If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using
1104dhcp on IPv4.
27a7acb2 1105
95895385
TL
1106`--ivshmem` `size=<integer> [,name=<string>]` ::
1107
1108Inter-VM shared memory. Useful for direct communication between VMs, or to the host.
1109
4772952b
TL
1110`--keephugepages` `<boolean>` ('default =' `0`)::
1111
1112Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.
1113
35a75dd3 1114`--keyboard` `<da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr>` ::
1f554f76 1115
7af2edf9 1116Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.
1f554f76 1117
2489d6df 1118`--kvm` `<boolean>` ('default =' `1`)::
1f554f76
DM
1119
1120Enable/disable KVM hardware virtualization.
1121
2489d6df 1122`--localtime` `<boolean>` ::
1f554f76 1123
5370fa8c 1124Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.
1f554f76 1125
95895385 1126`--lock` `<backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending>` ::
1f554f76
DM
1127
1128Lock/unlock the VM.
1129
5c1699e5 1130`--machine` `(pc|pc(-i440fx)?-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|virt(?:-\d+(\.\d+)+)?(\+pve\d+)?)` ::
1f554f76 1131
9d2e98ed 1132Specifies the QEMU machine type.
1f554f76 1133
2489d6df 1134`--memory` `<integer> (16 - N)` ('default =' `512`)::
1f554f76 1135
9d2e98ed 1136Amount of RAM for the VM in MiB. This is the maximum available memory when you use the balloon device.
1f554f76 1137
2489d6df 1138`--migrate_downtime` `<number> (0 - N)` ('default =' `0.1`)::
1f554f76
DM
1139
1140Set maximum tolerated downtime (in seconds) for migrations.
1141
2489d6df 1142`--migrate_speed` `<integer> (0 - N)` ('default =' `0`)::
1f554f76
DM
1143
1144Set maximum speed (in MB/s) for migrations. Value 0 is no limit.
1145
2489d6df 1146`--name` `<string>` ::
1f554f76
DM
1147
1148Set a name for the VM. Only used on the configuration web interface.
1149
27a7acb2
DM
1150`--nameserver` `<string>` ::
1151
de786b48 1152cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
27a7acb2 1153
ac70d7d1 1154`--net[n]` `[model=]<enum> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,mtu=<integer>] [,queues=<integer>] [,rate=<number>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]` ::
1f554f76
DM
1155
1156Specify network devices.
1f554f76 1157
2489d6df 1158`--numa` `<boolean>` ('default =' `0`)::
1f554f76 1159
9b3e4991 1160Enable/disable NUMA.
1f554f76 1161
2489d6df 1162`--numa[n]` `cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]` ::
1f554f76 1163
c2993fe5 1164NUMA topology.
1f554f76 1165
2489d6df 1166`--onboot` `<boolean>` ('default =' `0`)::
1f554f76
DM
1167
1168Specifies whether a VM will be started during system bootup.
1169
5370fa8c 1170`--ostype` `<l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp>` ::
1f554f76 1171
c2993fe5 1172Specify guest operating system.
1f554f76 1173
2489d6df 1174`--parallel[n]` `/dev/parport\d+|/dev/usb/lp\d+` ::
1f554f76
DM
1175
1176Map host parallel devices (n is 0 to 2).
1f554f76 1177
2489d6df 1178`--protection` `<boolean>` ('default =' `0`)::
1f554f76 1179
c2993fe5 1180Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.
1f554f76 1181
2489d6df 1182`--reboot` `<boolean>` ('default =' `1`)::
1f554f76
DM
1183
1184Allow reboot. If set to '0' the VM exit on reboot.
1185
2489d6df 1186`--revert` `<string>` ::
1f554f76
DM
1187
1188Revert a pending change.
1189
c5aa7e14
TL
1190`--rng0` `[source=]</dev/urandom|/dev/random|/dev/hwrng> [,max_bytes=<integer>] [,period=<integer>]` ::
1191
1192Configure a VirtIO-based Random Number Generator.
1193
7af2edf9 1194`--sata[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 1195
7af2edf9 1196Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 1197
7af2edf9 1198`--scsi[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,queues=<integer>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,ro=<1|0>] [,scsiblock=<1|0>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>] [,wwn=<wwn>]` ::
1f554f76 1199
7af2edf9 1200Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 1201
2489d6df 1202`--scsihw` `<lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single>` ('default =' `lsi`)::
1f554f76 1203
c2993fe5 1204SCSI controller model
1f554f76 1205
27a7acb2
DM
1206`--searchdomain` `<string>` ::
1207
de786b48 1208cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
27a7acb2 1209
2489d6df 1210`--serial[n]` `(/dev/.+|socket)` ::
1f554f76 1211
c2993fe5 1212Create a serial device inside the VM (n is 0 to 3)
1f554f76 1213
2489d6df 1214`--shares` `<integer> (0 - 50000)` ('default =' `1000`)::
1f554f76 1215
5da3d723 1216Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd.
1f554f76 1217
2489d6df 1218`--skiplock` `<boolean>` ::
1f554f76
DM
1219
1220Ignore locks - only root is allowed to use this option.
1221
1e3f8156 1222`--smbios1` `[base64=<1|0>] [,family=<Base64 encoded string>] [,manufacturer=<Base64 encoded string>] [,product=<Base64 encoded string>] [,serial=<Base64 encoded string>] [,sku=<Base64 encoded string>] [,uuid=<UUID>] [,version=<Base64 encoded string>]` ::
1f554f76
DM
1223
1224Specify SMBIOS type 1 fields.
1225
2489d6df 1226`--smp` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
1227
1228The number of CPUs. Please use option -sockets instead.
1229
2489d6df 1230`--sockets` `<integer> (1 - N)` ('default =' `1`)::
1f554f76
DM
1231
1232The number of CPU sockets.
1233
1c532546
TL
1234`--spice_enhancements` `[foldersharing=<1|0>] [,videostreaming=<off|all|filter>]` ::
1235
1236Configure additional enhancements for SPICE.
1237
27a7acb2
DM
1238`--sshkeys` `<filepath>` ::
1239
1240cloud-init: Setup public SSH keys (one key per line, OpenSSH format).
1241
2489d6df 1242`--startdate` `(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)` ('default =' `now`)::
1f554f76 1243
4772952b 1244Set the initial date of the real time clock. Valid format for date are:'now' or '2006-06-17T16:01:21' or '2006-06-17'.
1f554f76 1245
2489d6df 1246`--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
1f554f76 1247
c2993fe5 1248Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
1f554f76 1249
2489d6df 1250`--tablet` `<boolean>` ('default =' `1`)::
1f554f76 1251
c2993fe5 1252Enable/disable the USB tablet device.
1f554f76 1253
5c1699e5
TL
1254`--tags` `<string>` ::
1255
1256Tags of the VM. This is only meta information.
1257
2489d6df 1258`--tdf` `<boolean>` ('default =' `0`)::
1f554f76
DM
1259
1260Enable/disable time drift fix.
1261
2489d6df 1262`--template` `<boolean>` ('default =' `0`)::
1f554f76
DM
1263
1264Enable/disable Template.
1265
7af2edf9 1266`--tpmstate0` `[file=]<volume> [,import-from=<source volume>] [,size=<DiskSize>] [,version=<v1.2|v2.0>]` ::
5370fa8c 1267
7af2edf9 1268Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
5370fa8c 1269
c5aa7e14 1270`--unused[n]` `[file=]<volume>` ::
1f554f76 1271
c2993fe5 1272Reference to unused volumes. This is used internally, and should not be modified manually.
1f554f76 1273
499c9b7f 1274`--usb[n]` `[[host=]<HOSTUSBDEVICE|spice>] [,mapping=<mapping-id>] [,usb3=<1|0>]` ::
1f554f76 1275
4e7f60c2 1276Configure an USB device (n is 0 to 4, for machine version >= 7.1 and ostype l26 or windows > 7, n can be up to 14).
1f554f76 1277
2489d6df 1278`--vcpus` `<integer> (1 - N)` ('default =' `0`)::
1f554f76
DM
1279
1280Number of hotplugged vcpus.
1281
e2d681b3 1282`--vga` `[[type=]<enum>] [,memory=<integer>]` ::
1f554f76 1283
e2d681b3 1284Configure the VGA hardware.
1f554f76 1285
7af2edf9 1286`--virtio[n]` `[file=]<volume> [,aio=<native|threads|io_uring>] [,backup=<1|0>] [,bps=<bps>] [,bps_max_length=<seconds>] [,bps_rd=<bps>] [,bps_rd_max_length=<seconds>] [,bps_wr=<bps>] [,bps_wr_max_length=<seconds>] [,cache=<enum>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<enum>] [,heads=<integer>] [,import-from=<source volume>] [,iops=<iops>] [,iops_max=<iops>] [,iops_max_length=<seconds>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_rd_max_length=<seconds>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iops_wr_max_length=<seconds>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,replicate=<1|0>] [,rerror=<ignore|report|stop>] [,ro=<1|0>] [,secs=<integer>] [,serial=<serial>] [,shared=<1|0>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enum>]` ::
1f554f76 1287
7af2edf9 1288Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
1f554f76 1289
4d47f125
TL
1290`--vmgenid` `<UUID>` ('default =' `1 (autogenerated)`)::
1291
1292Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.
1293
2489d6df
WB
1294`--vmstatestorage` `<string>` ::
1295
1296Default storage for VM state volumes/files.
1297
1298`--watchdog` `[[model=]<i6300esb|ib700>] [,action=<enum>]` ::
1f554f76 1299
c2993fe5 1300Create a virtual hardware watchdog device.
1f554f76 1301
35a75dd3 1302*qm showcmd* `<vmid>` `[OPTIONS]`
1f554f76
DM
1303
1304Show command line which is used to start the VM (debug info).
1305
8dd66e12 1306`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1307
1308The (unique) ID of the VM.
1309
35a75dd3 1310`--pretty` `<boolean>` ('default =' `0`)::
1f554f76 1311
35a75dd3 1312Puts each option on a new line to enhance human readability
1f554f76 1313
5f26e15b
TL
1314`--snapshot` `<string>` ::
1315
1316Fetch config values from given snapshot.
1317
1f554f76
DM
1318*qm shutdown* `<vmid>` `[OPTIONS]`
1319
9b3e4991
DM
1320Shutdown virtual machine. This is similar to pressing the power button on a
1321physical machine.This will send an ACPI event for the guest OS, which
1322should then proceed to a clean shutdown.
1f554f76 1323
8dd66e12 1324`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1325
1326The (unique) ID of the VM.
1327
2489d6df 1328`--forceStop` `<boolean>` ('default =' `0`)::
1f554f76
DM
1329
1330Make sure the VM stops.
1331
2489d6df 1332`--keepActive` `<boolean>` ('default =' `0`)::
1f554f76 1333
de0983cb 1334Do not deactivate storage volumes.
1f554f76 1335
2489d6df 1336`--skiplock` `<boolean>` ::
1f554f76
DM
1337
1338Ignore locks - only root is allowed to use this option.
1339
2489d6df 1340`--timeout` `<integer> (0 - N)` ::
1f554f76
DM
1341
1342Wait maximal timeout seconds.
1343
1f554f76
DM
1344*qm snapshot* `<vmid> <snapname>` `[OPTIONS]`
1345
1346Snapshot a VM.
1347
8dd66e12 1348`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1349
1350The (unique) ID of the VM.
1351
013dc89f 1352`<snapname>`: `<string>` ::
1f554f76
DM
1353
1354The name of the snapshot.
1355
2489d6df 1356`--description` `<string>` ::
1f554f76
DM
1357
1358A textual description or comment.
1359
2489d6df 1360`--vmstate` `<boolean>` ::
1f554f76
DM
1361
1362Save the vmstate
1363
1f554f76
DM
1364*qm start* `<vmid>` `[OPTIONS]`
1365
1366Start virtual machine.
1367
8dd66e12 1368`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1369
1370The (unique) ID of the VM.
1371
c5aa7e14
TL
1372`--force-cpu` `<string>` ::
1373
1374Override QEMU's -cpu argument with the given string.
1375
5c1699e5 1376`--machine` `(pc|pc(-i440fx)?-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|virt(?:-\d+(\.\d+)+)?(\+pve\d+)?)` ::
1f554f76 1377
9d2e98ed 1378Specifies the QEMU machine type.
1f554f76 1379
2489d6df 1380`--migratedfrom` `<string>` ::
1f554f76
DM
1381
1382The cluster node name.
1383
2489d6df 1384`--migration_network` `<string>` ::
de0983cb
DM
1385
1386CIDR of the (sub) network that is used for migration.
1387
2489d6df 1388`--migration_type` `<insecure | secure>` ::
de0983cb
DM
1389
1390Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.
1391
2489d6df 1392`--skiplock` `<boolean>` ::
1f554f76
DM
1393
1394Ignore locks - only root is allowed to use this option.
1395
2489d6df 1396`--stateuri` `<string>` ::
1f554f76
DM
1397
1398Some command save/restore state from this location.
1399
2489d6df 1400`--targetstorage` `<string>` ::
52e44c50 1401
c5aa7e14 1402Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.
52e44c50 1403
e9cd3bd4
TL
1404`--timeout` `<integer> (0 - N)` ('default =' `max(30, vm memory in GiB)`)::
1405
1406Wait maximal timeout seconds.
1407
1f554f76
DM
1408*qm status* `<vmid>` `[OPTIONS]`
1409
1410Show VM status.
1411
8dd66e12 1412`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1413
1414The (unique) ID of the VM.
1415
2489d6df 1416`--verbose` `<boolean>` ::
1f554f76
DM
1417
1418Verbose output format
1419
1f554f76
DM
1420*qm stop* `<vmid>` `[OPTIONS]`
1421
9b3e4991
DM
1422Stop virtual machine. The qemu process will exit immediately. Thisis akin
1423to pulling the power plug of a running computer and may damage the VM data
1f554f76 1424
8dd66e12 1425`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1426
1427The (unique) ID of the VM.
1428
2489d6df 1429`--keepActive` `<boolean>` ('default =' `0`)::
1f554f76 1430
de0983cb 1431Do not deactivate storage volumes.
1f554f76 1432
2489d6df 1433`--migratedfrom` `<string>` ::
1f554f76
DM
1434
1435The cluster node name.
1436
2489d6df 1437`--skiplock` `<boolean>` ::
1f554f76
DM
1438
1439Ignore locks - only root is allowed to use this option.
1440
2489d6df 1441`--timeout` `<integer> (0 - N)` ::
1f554f76
DM
1442
1443Wait maximal timeout seconds.
1444
1f554f76
DM
1445*qm suspend* `<vmid>` `[OPTIONS]`
1446
1447Suspend virtual machine.
1448
8dd66e12 1449`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1450
1451The (unique) ID of the VM.
1452
2489d6df 1453`--skiplock` `<boolean>` ::
1f554f76
DM
1454
1455Ignore locks - only root is allowed to use this option.
1456
95895385
TL
1457`--statestorage` `<string>` ::
1458
1459The storage for the VM state
1460+
1461NOTE: Requires option(s): `todisk`
1462
1463`--todisk` `<boolean>` ('default =' `0`)::
1464
1465If set, suspends the VM to disk. Will be resumed on next VM start.
1466
1f554f76
DM
1467*qm template* `<vmid>` `[OPTIONS]`
1468
1469Create a Template.
1470
8dd66e12 1471`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1472
1473The (unique) ID of the VM.
1474
5370fa8c 1475`--disk` `<efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9>` ::
1f554f76
DM
1476
1477If you want to convert only 1 disk to base image.
1478
1f554f76
DM
1479*qm terminal* `<vmid>` `[OPTIONS]`
1480
1481Open a terminal using a serial device (The VM need to have a serial device
1482configured, for example 'serial0: socket')
1483
8dd66e12 1484`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1485
1486The (unique) ID of the VM.
1487
35a75dd3 1488`--escape` `<string>` ('default =' `^O`)::
1f554f76 1489
35a75dd3 1490Escape character.
1f554f76 1491
35a75dd3 1492`--iface` `<serial0 | serial1 | serial2 | serial3>` ::
1f554f76 1493
35a75dd3 1494Select the serial device. By default we simply use the first suitable device.
1f554f76 1495
4e7f60c2 1496*qm unlink*
1f554f76 1497
4e7f60c2 1498An alias for 'qm disk unlink'.
1f554f76 1499
1f554f76
DM
1500*qm unlock* `<vmid>`
1501
1502Unlock the VM.
1503
8dd66e12 1504`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1505
1506The (unique) ID of the VM.
1507
1f554f76
DM
1508*qm vncproxy* `<vmid>`
1509
1510Proxy VM VNC traffic to stdin/stdout
1511
8dd66e12 1512`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1513
1514The (unique) ID of the VM.
1515
1f554f76
DM
1516*qm wait* `<vmid>` `[OPTIONS]`
1517
1518Wait until the VM is stopped.
1519
8dd66e12 1520`<vmid>`: `<integer> (100 - 999999999)` ::
1f554f76
DM
1521
1522The (unique) ID of the VM.
1523
2489d6df 1524`--timeout` `<integer> (1 - N)` ::
1f554f76
DM
1525
1526Timeout in seconds. Default is to wait forever.
1527
1528