[筆記]Proxmox VE Cluster (集群管理)

今天因為主要server 出了點問題而煩惱
但有一點運氣就是proxmox 是有 server cluster
可張多部proxmon server 集中起來一起管理和進行online VM 轉至到其他server 上運作
eg: Server01內有Centos,ubuntu VM 而我可Centos 轉到新的server02上運作 (不用關閉VM進行線上轉移)

1.首先在server01上進行以下步驟

Server01:

pveca -c

server01:~# pveca -c
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
ce:bf:a2:cd:69:23:e4:78:fc:05:db:fc:55:ef:52:1d root@server1
cluster master successfully created

2.然後檢查集群的狀態

Server01:

pveca -l
 
server01:~# pveca -l
CID—-IPADDRESS—-ROLE-STATE——–UPTIME—LOAD—-MEM—ROOT—DATA
1 : 192.168.0.100 M A 00:14 0.00 5% 1% 0%
這時會看見local server 現在是 M 的狀態(Master server)

 

 

 

 

3.現在要張server02加入server01的集群
在Server02上進行以下步驟

server02:

pveca -a -h 192.168.0.100 (-h 是輸入主要Master server ip)

server2:~# pveca -a -h 192.168.0.100
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
ea:ad:21:fc:5d:9b:af:ab:fb:0d:72:72:c7:94:23:ca root@server2
The authenticity of host ‘192.168.0.100 (192.168.0.100)’ can’t be established.
RSA key fingerprint is 7c:17:8c:35:9c:be:60:6b:56:97:2a:0b:72:60:57:09.
Are you sure you want to continue connecting (yes/no)? <– yes
Warning: Permanently added ‘192.168.0.100′ (RSA) to the list of known hosts.
root@192.168.0.100’s password: <– root password of server1.example.com
cluster node successfully created

就是這樣,現在已經創建了一個集群了。現在可以檢查下正在運行的server
 
server02:
 
pveca -l
 
如沒有什麼問題輸出結果中會看到現在兩部server 的信息:
 
server02:~# pveca -l
CID—-IPADDRESS—-ROLE-STATE——–UPTIME—LOAD—-MEM—ROOT—DATA
1 : 192.168.0.100 M S 00:15 0.00 5% 1% 0%
2 : 192.168.0.101 N S 00:04 0.08 15% 1% 0%
大功告成~~現在可以進入Proxmox 的控制台進行集群管理(線上轉移VM)
真的很方便以後server出問題時可不用動新安裝任何VM了~

 

 

 

 

 

關於 cyrus