This commit is contained in:
2025-10-12 13:28:36 +02:00
parent 6fc22a8ee0
commit c0f08c98cb

View File

@@ -0,0 +1,51 @@
# How to Start Stop and List Proxmox VE Virtual Machines via the CLI
Sometimes, you cannot get to the Proxmox VE web GUI for one reason or another, or you simply prefer the CLI. We thought we would put the three basic commands you need in one place to start, stop, and list virtual machines in the Proxmox VE UI.
## How to List Proxmox VE Virtual Machines via the CLI
Listing the virtual machines is perhaps the most important function. The listing gives you the VM name, but also the VMID
`qm list`
The output of this command will help a lot when it comes to finding VMs via the CLI. Here we can see VMID 100 is a pfSense VM.
## How to Start Proxmox VE Virtual Machines via the CLI
Starting a VM in Promxox VE using the CLI, then using this VMID. Here, we can use qm start and then the VMID for the virtual machine to start it.
`qm start VMID`
The qm start command usually takes a few seconds. After it returns to the prompt, you can do qm list again and verify it is running.
## How to Stop Proxmox VE Virtual Machines via the CLI
Stopping VMs, there are a few methods that you need to be aware of. `Shutdown`, `stop`, and `reset` are all very important.
### Shutdown
To shutdown the VM by sending the poweroff signal, use
`qm shutdown VMID`
### Stop
If you want to stop a VM immediately, perhaps because it misbehaves, use the qm stop command instead.
`qm stop VMID`
A quick note here is that some VMs, especially those with old or funky OSes, might not respond to the qm shutdown command so you can instead use qm stop.
## How to Suspend and Resume Proxmox VE Virtual Machines via the CLI
Sometimes you want to keep the state of a VM, but do not want to stop it. Instead, you would want to resume the virtual machine at a later time. That is where you would use `qm suspend` and `qm resume` commands.
### Suspend
`qm suspend VMID`
### Resume
`qm resume VMID`
Note here that both suspend and resume generally take a few seconds so if you see the shell pause for a few seconds, do not worry here.
## How to Restart Proxmox VE Virtual Machines via the CLI
As you may have guessed by now, if you want to restart a Proxmox VE VM via the CLI, the command is:
`qm restart VMID`
## Final Words
Using the qm commands extends beyond Proxmox VE server. Proxmox VE uses KVM virtualization and qemu like other Linux virtualization setups. Still, the commands make a lot of sense so long as you remember “qm” is the command, and to find a VMID via the shell you would use the list command.