如下或使用 qm -help查看命令
qm 虚拟机相关操作命令
1.查看虚拟机列表
root@pve63-node172:~# qm list
VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID
104 Copy-of-VM-debian10-ci stopped 512 2.00 0
107 CT201 running 512 32.00 278817
108 VM 108 stopped 2048 1.00 0
109 v111 running 1024 0.00 1368522
110 v112 running 1024 2.00 159297
111 centOS7 stopped 512 10.00 0
113 v113 stopped 1024 2.00 0
114 v123 stopped 1024 2.00 0
116 v112 stopped 1024 2.00 0
132 debian10 stopped 1024 12.00 0
201 CT201 stopped 512 32.00 0
502 debian10-ci stopped 512 2.00 0
902 VM 902 stopped 4096 3.00 0
root@pve63-node172:~#
-----------------------------------
2、其他命令
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]
-----------------------------------
3.1、网络命令
查看防火墙
# pve-firewall compile
ipset cmdlist:
iptables cmdlist:
ip6tables cmdlist:
ebtables cmdlist:
ignore FORWARD (2jmj7l5rSw0yVb/vlWAYkK/YBwk)
ignore INPUT (2jmj7l5rSw0yVb/vlWAYkK/YBwk)
ignore OUTPUT (2jmj7l5rSw0yVb/vlWAYkK/YBwk)
iptables table raw cmdlist:
ip6tables table raw cmdlist:
no changes
firewall disabled
-----------------------------------
3.2、
~# pve-firewall localnet
local hostname: pve63-node172
local IP address: 10.38.1.172
network auto detect: 10.38.1.0/24
using detected local_network: 10.38.1.0/24
accepting corosync traffic from/to:
- pve63-node173: 10.38.1.173 (link: 0)
- pve63-node174: 10.38.1.174 (link: 0)
-----------------------------------
3.3、重启防火墙
# pve-firewall restart
3.4、
启动防火墙
# pve-firewall start
3.5、停止防火墙
# pve-firewall stop