PVE Basic CLI Commands: Difference between revisions
From WikiMLT
m (Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Proxmox) |
m (Text replacement - "mlw-continue" to "code-continue") |
||
Line 56: | Line 56: | ||
qm help [<extra-args>] [OPTIONS] | qm help [<extra-args>] [OPTIONS] | ||
</syntaxhighlight>For example if you need to force stop a VM with <code>id:120</code> you can use the following commands: | </syntaxhighlight>For example if you need to force stop a VM with <code>id:120</code> you can use the following commands: | ||
<syntaxhighlight lang="shell" line="1" class="root-prompt | <syntaxhighlight lang="shell" line="1" class="root-prompt code-continue"> | ||
qm unlock 120 | qm unlock 120 | ||
qm stop 120 | qm stop 120 |
Latest revision as of 07:29, 26 September 2022
Manage Virtual Machines within CLI
The base CLI command used for managing the QEMU/KVM Virtual Machines in ProxmoxVE is qm
:
qm
ERROR: no command specified
USAGE: qm <COMMAND> [ARGS] [OPTIONS]
qm cloudinit dump <vmid> <type>
qm guest cmd <vmid> <command>
qm guest exec-status <vmid> <pid>
qm guest passwd <vmid> <username> [OPTIONS]
qm guest exec <vmid> [<extra-args>] [OPTIONS]
qm clone <vmid> <newid> [OPTIONS]
qm config <vmid> [OPTIONS]
qm create <vmid> [OPTIONS]
qm delsnapshot <vmid> <snapname> [OPTIONS]
qm destroy <vmid> [OPTIONS]
qm list [OPTIONS]
qm listsnapshot <vmid>
qm migrate <vmid> <target> [OPTIONS]
qm move-disk <vmid> <disk> [<storage>] [OPTIONS]
qm pending <vmid>
qm reboot <vmid> [OPTIONS]
qm reset <vmid> [OPTIONS]
qm resize <vmid> <disk> <size> [OPTIONS]
qm resume <vmid> [OPTIONS]
qm rollback <vmid> <snapname>
qm sendkey <vmid> <key> [OPTIONS]
qm set <vmid> [OPTIONS]
qm shutdown <vmid> [OPTIONS]
qm snapshot <vmid> <snapname> [OPTIONS]
qm start <vmid> [OPTIONS]
qm stop <vmid> [OPTIONS]
qm suspend <vmid> [OPTIONS]
qm template <vmid> [OPTIONS]
qm unlink <vmid> --idlist <string> [OPTIONS]
qm cleanup <vmid> <clean-shutdown> <guest-requested>
qm importdisk <vmid> <source> <storage> [OPTIONS]
qm importovf <vmid> <manifest> <storage> [OPTIONS]
qm monitor <vmid>
qm mtunnel
qm nbdstop <vmid>
qm rescan [OPTIONS]
qm showcmd <vmid> [OPTIONS]
qm status <vmid> [OPTIONS]
qm terminal <vmid> [OPTIONS]
qm unlock <vmid>
qm vncproxy <vmid>
qm wait <vmid> [OPTIONS]
qm help [<extra-args>] [OPTIONS]
For example if you need to force stop a VM with id:120
you can use the following commands:
qm unlock 120
qm stop 120
rm /var/lock/qemu-server/lock-120.conf # some times you may need to remove the lock file
Manage Linux Containers within CLI
The base CLI command used for managing the Proxmox Linux Containers in ProxmoxVE is pct
:
pct
ERROR: no command specified
USAGE: pct <COMMAND> [ARGS] [OPTIONS]
pct clone <vmid> <newid> [OPTIONS]
pct create <vmid> <ostemplate> [OPTIONS]
pct destroy <vmid> [OPTIONS]
pct list
pct migrate <vmid> <target> [OPTIONS]
pct move-volume <vmid> <volume> [<storage>] [<target-vmid>] [<target-volume>] [OPTIONS]
pct pending <vmid>
pct resize <vmid> <disk> <size> [OPTIONS]
pct restore <vmid> <ostemplate> [OPTIONS]
pct template <vmid>
pct config <vmid> [OPTIONS]
pct set <vmid> [OPTIONS]
pct delsnapshot <vmid> <snapname> [OPTIONS]
pct listsnapshot <vmid>
pct rollback <vmid> <snapname>
pct snapshot <vmid> <snapname> [OPTIONS]
pct reboot <vmid> [OPTIONS]
pct resume <vmid>
pct shutdown <vmid> [OPTIONS]
pct start <vmid> [OPTIONS]
pct stop <vmid> [OPTIONS]
pct suspend <vmid>
pct console <vmid> [OPTIONS]
pct cpusets
pct df <vmid>
pct enter <vmid>
pct exec <vmid> [<extra-args>]
pct fsck <vmid> [OPTIONS]
pct fstrim <vmid> [OPTIONS]
pct mount <vmid>
pct pull <vmid> <path> <destination> [OPTIONS]
pct push <vmid> <file> <destination> [OPTIONS]
pct rescan [OPTIONS]
pct status <vmid> [OPTIONS]
pct unlock <vmid>
pct unmount <vmid>
pct help [<extra-args>] [OPTIONS]
The command used for managing the container images is pveam
:
pveam
ERROR: no command specified
USAGE: pveam <COMMAND> [ARGS] [OPTIONS]
pveam download <storage> <template>
pveam available [OPTIONS]
pveam list <storage>
pveam remove <template_path>
pveam update
pveam help [<extra-args>] [OPTIONS]
References