mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 16:15:36 +02:00
qm*: add aliases (#17367)
This commit is contained in:
parent
a0fead3bfc
commit
c547e2e903
34 changed files with 73 additions and 73 deletions
|
@ -6,4 +6,4 @@
|
|||
|
||||
- Clean up resources:
|
||||
|
||||
`qm cleanup {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
`qm {{[cl|cleanup]}} {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Generate a cloudinit file for a specific configuration type:
|
||||
|
||||
`qm cloudinit dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
`qm {{[clou|cloudinit]}} dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
- Display the virtual machine configuration:
|
||||
|
||||
`qm config {{vm_id}}`
|
||||
`qm {{[co|config]}} {{vm_id}}`
|
||||
|
||||
- Display the current configuration values instead of pending values for the virtual machine:
|
||||
|
||||
`qm config --current {{true}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --current {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch the configuration values from the given snapshot:
|
||||
|
||||
`qm config --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
|
||||
- Create a virtual machine:
|
||||
|
||||
`qm create {{100}}`
|
||||
`qm {{[cr|create]}} {{100}}`
|
||||
|
||||
- Automatically start the machine after creation:
|
||||
|
||||
`qm create {{100}} --start 1`
|
||||
`qm {{[cr|create]}} {{100}} --start 1`
|
||||
|
||||
- Specify the type of operating system on the machine:
|
||||
|
||||
`qm create {{100}} --ostype {{win10}}`
|
||||
`qm {{[cr|create]}} {{100}} --ostype {{win10}}`
|
||||
|
||||
- Replace an existing machine (requires archiving it):
|
||||
|
||||
`qm create {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
`qm {{[cr|create]}} {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
|
||||
- Specify a script that is executed automatically depending on the state of the virtual machine:
|
||||
|
||||
`qm create {{100}} --hookscript {{path/to/script.pl}}`
|
||||
`qm {{[cr|create]}} {{100}} --hookscript {{path/to/script.pl}}`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Delete a snapshot:
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Delete a snapshot from a configuration file (even if removing the disk snapshot fails):
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}} --force 1`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}} --force 1`
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
- Destroy a specific virtual machine:
|
||||
|
||||
`qm destroy {{vm_id}}`
|
||||
`qm {{[des|destroy]}} {{vm_id}}`
|
||||
|
||||
- Destroy all disks that are not explicitly referenced in a specific virtual machine's configuration:
|
||||
|
||||
`qm destroy {{vm_id}} --destroy-unreferenced-disks`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --destroy-unreferenced-disks`
|
||||
|
||||
- Destroy a virtual machine and remove from all locations (inventory, backup jobs, high availability managers, etc.):
|
||||
|
||||
`qm destroy {{vm_id}} --purge`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --purge`
|
||||
|
||||
- Destroy a specific virtual machine ignoring locks and forcing destroy:
|
||||
|
||||
`sudo qm destroy {{vm_id}} --skiplock`
|
||||
`sudo qm {{[des|destroy]}} {{vm_id}} --skiplock`
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
|
||||
- Import a VMDK/qcow2/raw disk image using a specific storage name:
|
||||
|
||||
`qm disk import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
`qm {{[di|disk]}} import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Move a virtual disk:
|
||||
|
||||
`qm disk move {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move {{vm_id}} {{destination}} {{index}}`
|
||||
|
||||
- Delete the previous copy of the virtual disk:
|
||||
|
||||
`qm disk move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Add `n` gigabytes to a virtual disk:
|
||||
|
||||
`qm disk resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
`qm {{[di|disk]}} resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Execute a specific QEMU Guest Agent command:
|
||||
|
||||
`qm guest cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
`qm {{[g|guest]}} cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Print the status of a specific PID:
|
||||
|
||||
`qm guest exec-status {{vm_id}} {{pid}}`
|
||||
`qm {{[g|guest]}} exec-status {{vm_id}} {{pid}}`
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
- Execute a specific command via a guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
|
||||
- Execute a specific command via a guest agent asynchronously:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
|
||||
- Execute a specific command via a guest agent with a specified timeout of 10 seconds:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
|
||||
- Execute a specific command via a guest agent and forward input from `stdin` until EOF to the guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Set a password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}}`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}}`
|
||||
|
||||
- Set an already hashed password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}} --crypted 1`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}} --crypted 1`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Display help for a specific command:
|
||||
|
||||
`qm help {{command}}`
|
||||
`qm {{[h|help]}} {{command}}`
|
||||
|
||||
- Display help for a specific command with detailed information:
|
||||
|
||||
`qm help {{command}} --verbose {{true|false}}`
|
||||
`qm {{[h|help]}} {{command}} --verbose {{true|false}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- List all snapshots of a specific virtual machine:
|
||||
|
||||
`qm listsnapshot {{vm_id}}`
|
||||
`qm {{[lists|listsnapshot]}} {{vm_id}}`
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
|
||||
- Migrate a specific virtual machine:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}}`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}}`
|
||||
|
||||
- Override the current I/O bandwidth limit with 10 KiB/s:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --bwlimit 10`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --bwlimit 10`
|
||||
|
||||
- Allow migration of virtual machines using local devices (root only):
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --force true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --force true`
|
||||
|
||||
- Use online/live migration if a virtual machine is running:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --online true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --online true`
|
||||
|
||||
- Enable live storage migration for local disks:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --with-local-disks true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --with-local-disks true`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Enter the QEMU Monitor interface of a specific virtual machine:
|
||||
|
||||
`qm monitor {{vm_id}}`
|
||||
`qm {{[mo|monitor]}} {{vm_id}}`
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
|
||||
- Command used by `qmigrate` during data migration from a VM to another host:
|
||||
|
||||
`qm mtunnel`
|
||||
`qm {{[mt|mtunnel]}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Stop embedded nbd server:
|
||||
|
||||
`qm nbdstop {{VM_ID}}`
|
||||
`qm {{[n|nbdstop]}} {{VM_ID}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Get the virtual machine configuration of a specific virtual machine:
|
||||
|
||||
`qm pending {{vm_id}}`
|
||||
`qm {{[p|pending]}} {{vm_id}}`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Reboot a virtual machine:
|
||||
|
||||
`qm reboot {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} {{vm_id}}`
|
||||
|
||||
- Reboot a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm reboot --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} --timeout {{10}} {{vm_id}}`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Resume a specific virtual machine:
|
||||
|
||||
`qm resume {{vm_id}}`
|
||||
`qm {{[resu|resume]}} {{vm_id}}`
|
||||
|
||||
- Resume a specific virtual machine ignoring locks (requires root):
|
||||
|
||||
`sudo qm resume {{vm_id}} --skiplock true`
|
||||
`sudo qm {{[resu|resume]}} {{vm_id}} --skiplock true`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Rollback the state of a specific VM to a specified snapshot:
|
||||
|
||||
`qm rollback {{vm_id}} {{snap_name}}`
|
||||
`qm {{[ro|rollback]}} {{vm_id}} {{snap_name}}`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Send the specified key event to a specific virtual machine:
|
||||
|
||||
`qm sendkey {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} {{vm_id}} {{key}}`
|
||||
|
||||
- Allow root user to send key event and ignore locks:
|
||||
|
||||
`qm sendkey --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
- Show command-line for a specific virtual machine:
|
||||
|
||||
`qm showcmd {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} {{vm_id}}`
|
||||
|
||||
- Put each option on a new line to enhance human readability:
|
||||
|
||||
`qm showcmd --pretty {{true}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --pretty {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch configuration values from a specific snapshot:
|
||||
|
||||
`qm showcmd --snapshot {{string}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --snapshot {{string}} {{vm_id}}`
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
|
||||
- Shutdown a virtual machine:
|
||||
|
||||
`qm shutdown {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm shutdown --timeout {{10}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --timeout {{10}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and do not deactivate storage volumes:
|
||||
|
||||
`qm shutdown --keepActive {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --keepActive {{true}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and skip lock (only root can use this option):
|
||||
|
||||
`qm shutdown --skiplock {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --skiplock {{true}} {{VM_ID}}`
|
||||
|
||||
- Stop and shutdown a virtual machine:
|
||||
|
||||
`qm shutdown --forceStop {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --forceStop {{true}} {{VM_ID}}`
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
- Create a snapshot of a specific virtual machine:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Create a snapshot with a specific description:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
|
||||
- Create a snapshot including the vmstate:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
- Display the status of a specific virtual machine:
|
||||
|
||||
`qm status {{vm_id}}`
|
||||
`qm {{[stat|status]}} {{vm_id}}`
|
||||
|
||||
- Display detailed status of a specific virtual machine:
|
||||
|
||||
`qm status --verbose {{true}} {{vm_id}}`
|
||||
`qm {{[stat|status]}} --verbose {{true}} {{vm_id}}`
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
- Suspend a virtual machine by ID:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}}`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}}`
|
||||
|
||||
- Skip the lock check when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplock`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplock`
|
||||
|
||||
- Skip the lock check for storage when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplockstorage`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplockstorage`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Create a template out of a specific virtual machine:
|
||||
|
||||
`qm template {{vm_id}}`
|
||||
`qm {{[tem|template]}} {{vm_id}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Unlock a specific virtual machine:
|
||||
|
||||
`qm unlock {{vm_id}}`
|
||||
`qm {{[u|unlock]}} {{vm_id}}`
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- Proxy a specific virtual machine:
|
||||
|
||||
`qm vncproxy {{vm_id}}`
|
||||
`qm {{[v|vncproxy]}} {{vm_id}}`
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
- Wait until the virtual machine is stopped:
|
||||
|
||||
`qm wait {{vm_id}}`
|
||||
`qm {{[w|wait]}} {{vm_id}}`
|
||||
|
||||
- Wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm shutdown {{vm_id}} && qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[shu|shutdown]}} {{vm_id}} && qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
|
||||
- Using an ISO file uploaded on the local storage, create a virtual machine with a 4 GB IDE disk on the `local-lvm` storage and an ID of 100:
|
||||
|
||||
`qm create {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
`qm {{[cr|create]}} {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
|
||||
- Show the configuration of a virtual machine, specifying its ID:
|
||||
|
||||
`qm config {{100}}`
|
||||
`qm {{[co|config]}} {{100}}`
|
||||
|
||||
- Start a specific virtual machine:
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
|||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped:
|
||||
|
||||
`qm shutdown {{100}} && qm wait {{100}}`
|
||||
`qm {{[shu|shutdown]}} {{100}} && qm {{[w|wait]}} {{100}}`
|
||||
|
||||
- Destroy a virtual machine and remove all related resources:
|
||||
|
||||
`qm destroy {{100}} --purge`
|
||||
`qm {{[des|destroy]}} {{100}} --purge`
|
||||
|
|
Loading…
Add table
Reference in a new issue