Featured image of post Common Command Line Management Commands for PVE Virtual Machines

Common Command Line Management Commands for PVE Virtual Machines

Proxmox Virtual Environment (PVE) is a popular open-source virtualization platform used for managing virtual machines...

Proxmox Virtual Environment (PVE) is a widely used open-source virtualization platform for managing virtual machines and containers. When managing PVE virtual machines via the web interface is not possible, PVE provides a comprehensive set of command line management options. In the command line, you can utilize several common commands for managing and operating PVE. Below are some commonly used command line management commands:

  1. pveperf: Used for performance testing and benchmarking.

  2. qm: A set of commands for virtual machine management:

    • qm monitor <vmid>: Connect to the virtual machine’s monitor.
    • qm start <vmid>: Start the instance.
    • qm shutdown <vmid>: Gracefully stop the instance by sending a shutdown command.
    • qm wait <vmid> [time]: Wait until the VM is stopped.
    • qm stop <vmid>: Forcefully stop the instance.
    • qm reset <vmid>: Restart the instance (equivalent to stopping and then starting it).
    • qm suspend <vmid>: Pause the instance.
    • qm resume <vmid>: Resume the instance.
    • qm cad <vmid>: Send the Ctrl-Alt-Delete key sequence.
    • qm destroy <vmid>: Destroy the instance (delete all used/owned volumes).
    • qm unlock <vmid>: Clear migration/backup locks.
    • qm status <vmid>: Display the status of the instance.
    • qm cdrom <vmid> [<device>] <path>: Set the CD-ROM path (default device is ide2).
    • qm cdrom <vmid> [<device>] eject: Eject the CD-ROM.
    • qm unlink <vmid> <volume>: Delete unused disk images.
    • qm vncproxy <vmid> <ticket>: Open VNC proxy.
    • qm vnc <vmid>: Start (X11) VNC viewer (experimental).
    • qm showcmd <vmid>: Display command line (debug information).
    • qm list: List all virtual machines.
    • qm startall: Start all virtual machines when onboot=1.
    • qm stopall [timeout]: Stop all virtual machines (default timeout is 3 minutes).
  3. pvesm: A set of storage management commands:

    • pvesm add: Attach storage to Proxmox VE.
    • pvesm del: Remove storage from Proxmox VE.
    • pvesm scan: Scan and add new storage.
  4. pvecm: A set of cluster management commands:

    • pvecm create: Create a new Proxmox VE cluster.
    • pvecm add: Add nodes to an existing cluster.
    • pvecm delnode: Remove a node from the cluster.
    • pvecm destroy: Destroy the entire cluster.
  5. pvesmigrate: A set of commands for migrating disks and virtual machines, used for moving VMs and storage between different Proxmox VE clusters.

Common Command Line Management Commands for PVE Virtual Machines Common Command Line Management Commands for PVE Virtual Machines

These commands are commonly used for basic virtual machine management tasks in Proxmox VE. There are more advanced commands and options available, which can be referenced in the official Proxmox VE documentation.

Please note that using these commands requires appropriate permissions and administrative access to ensure security and accuracy.

Licensed under CC BY-NC-SA 4.0