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