| 1 | ### 🐳 LXC 容器管理 |
| 2 | pct list |
| 3 | pct start 101 |
| 4 | pct enter 102 |
| 5 | |
| 6 | ### 🖥️ VM 虛擬機管理 |
| 7 | qm start <VM_ID> |
| 8 | qm shutdown <VM_ID> |
| 9 | qm stop <VM_ID> |
| 10 | qm restart <VM_ID> |
| 11 | qm create <VM_ID> --name <VM_NAME> --memory <MEMORY_SIZE> --cores <CPU_CORES> --net0 virtio,bridge=vmbr0 |
| 12 | qm del <VM_ID> |
| 13 | qm log <VM_ID> |
| 14 | |
| 15 | ### 🔗 Cluster & Corosync |
| 16 | pvecm expected <數字> |
| 17 | pvecm status |
| 18 | corosync-cfgtool -s |
| 19 | vi /etc/pve/corosync.conf |
| 20 | systemctl restart corosync |
| 21 | systemctl restart pve-cluster |
| 22 | |
| 23 | ### 📦 Storage 管理 |
| 24 | pvesm status |
| 25 | pvesm alloc <STORAGE_NAME> <SIZE> |
| 26 | pvesm remove <STORAGE_NAME> |
| 27 | |
| 28 | ### 👤 使用者 & 權限 |
| 29 | pveum user list |
| 30 | pveum user add <USERNAME>@<REALM> --password <PASSWORD> |
| 31 | pveum user del <USERNAME>@<REALM> |
| 32 | pveum aclmod /vms/<VM_ID> --add <USERNAME>@<REALM> --role <ROLE> |
| 33 | |
| 34 | ### 🌐 網路設定 |
| 35 | ip a |
| 36 | vi /etc/network/interfaces |
| 37 | systemctl restart networking |
| 38 | |
| 39 | ### 💾 備份 & 還原 |
| 40 | vzdump <VM_ID> --storage <STORAGE_NAME> --mode snapshot |
| 41 | vzdump --restore <BACKUP_FILE> <NEW_VM_ID> |
| 42 | |
| 43 | ### ⚙️ 系統更新 & 日誌 |
| 44 | apt update && apt dist-upgrade |
| 45 | journalctl -xe |
| 46 | reboot |
| 47 | |
| 48 | ### 🔀 Cluster 節點管理 |
| 49 | pvecm delnode <NODE_NAME> |
| 50 | pvecm addnode <NODE_NAME> |
| 51 | pvecm add <NODE_IP> |
| 52 | pvecm nodes |
| 53 | pmxcfs -l |
| 54 |
timmy / 🧰 Proxmox 指令一把抓!從 VM 到 Cluster 全面控場
Last active 1 week ago
從 LXC 到 VM、儲存、權限、Cluster 甚至備份還原,Proxmox 操作指令大全,一次搞懂不求人 🚀
Revision bac9d580faf6412d803d52cd782754c6c082506c
Comments 0
Log in to leave a comment