server1:~# 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 server1:~#
然后检查下集群的状态:
server1:
pveca -l
server1:~# 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% server1:~#
在server2上,输入:
server2:
pveca -a -h 192.168.0.100
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 server2:~#
就是这样,你已经创建了一个集群。你可以检查下正在运行的主机:、
server2:
pveca -l
应该在输出结果中显示两个主机的信息:
server2:~# 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% server2:~#