Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Proxmox establishment of Cluster

pve:(172.20.9.50)
root@pve:~# pvecm create test

pve02:(172.20.9.53)
root@pve02:~# pvecm add 172.20.9.50

pve:(172.20.9.54)
root@pve03:~#pvecm add 172.20.9.50

After three successful execution of the command, log in to any IP can manage the Cluster.
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Promox HA configuration

DataCenter(test)-->HA
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

First, create the HA Groups
DataCenter (the Test) -> HA -> Groups -> the Create
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA
Here you can have a lot of options, we chose the most commonly used.
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

DataCenter (test) -> HA - > Add
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA
in accordance with the addition of HA VM 100, all of the other machines are added to HA
is important to note that the Request State: If no boot choose stopped.
There are two types of state ignored and disabled state.

如果觉得麻烦,可以命令行。
root@pve:~# ha-manager status
quorum OK
master pve03 (active, Sun Mar 15 20:37:20 2020)
lrm pve (active, Sun Mar 15 20:37:15 2020)
lrm pve02 (active, Sun Mar 15 20:37:17 2020)
lrm pve03 (active, Sun Mar 15 20:37:16 2020)
service vm:100 (pve02, error)
service vm:101 (pve, started)
service vm:102 (pve, started)
service vm:103 (pve02, started)
service vm:105 (pve03, started)
service vm:109 (pve02, not found)
root@pve:~# ha-manager remove vm:101
root@pve:~# ha-manager add vm:101 --group HA_Group
root@pve:~# ha-manager status
quorum OK
master pve03 (active, Sun Mar 15 20:38:00 2020)
lrm pve (active, Sun Mar 15 20:37:54 2020)
lrm pve02 (active, Sun Mar 15 20:37:57 2020)
lrm pve03 (active, Sun Mar 15 20:37:56 2020)
service vm:100 (pve02, error)
service vm:101 (pve, starting)
service vm:102 (pve, started)
service vm:103 (pve02, started)
service vm:105 (pve03, started)
service vm:109 (pve02, not found)
root@pve:~#

Switch Testing

Proxmox trigger conditions look
1. manually restart the server, do not migrate all VM, VM state after the freeze are all waiting for the host to start up.
2. Server manually shut down, do not migrate all VM, VM state after the freeze are all waiting for the host to start up.
3. The server is disrupted, such as broken network, server sudden power failure and other anomalies, in theory VM will be migrated to a host of other normal operation.

A test switch, host restart PVE

Five running VM, a template on the machines in pve
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Ensure that all states in the VM HA normal.
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Restart host pve
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Login pve03 View Cluster status
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

View HA status - all VM are freeze state
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

And other server is restarted, all will be re-run on the VM host pve
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

Two switching test, host shutdown PVE

And a switching effect of the same test, not the map.

Switch Testing Third, close switch ports host pve

All hosts and VM state test.
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

关掉交换机端口
Monitor-Room-2960S#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Monitor-Room-2960S(config)#inter
Monitor-Room-2960S(config)#interface gi
Monitor-Room-2960S(config)#interface gigabitEthernet 1/0/19
Monitor-Room-2960S(config-if)#shut
Monitor-Room-2960S(config-if)#

Network interruption
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

View Cluster status
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

View HA state
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

VM state to fence
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA

VM migration began
Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA
six hosts, each three VM, not bad.
Migration status change time is approximately 2 minutes, all switches should be in about 3 minutes.

SSH Communications solutions to problems

Proxmox VE 6.1 of --Cluster from zero to proficient and configuration and management of HA
task started by HA resource agent
2020-03-15 20:56:35 # /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=pve03' [email protected] /bin/true
2020-03-15 20:56:35 Host key verification failed.
2020-03-15 20:56:35 ERROR: migration aborted (duration 00:00:00): Can't connect to destination address using public key
TASK ERROR: migration aborted

处理方式:
root@pve:~# /usr/bin/ssh -e none -o 'HostKeyAlias=pve03' [email protected] /bin/true
The authenticity of host 'pve03 (172.20.9.54)' can't be established.
ECDSA key fingerprint is SHA256:/bAsG9C0Mw52KTxtfyE6RYON1mLosD9mu03Mb8M0E74.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'pve03' (ECDSA) to the list of known hosts.

root@pve:~# ssh 172.20.9.54
Linux pve03 5.3.10-1-pve #1 SMP PVE 5.3.10-1 (Thu, 14 Nov 2019 10:43:13 +0100) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Mar 15 21:08:06 2020 from 172.20.9.50
root@pve03:~# exit
logout
Connection to 172.20.9.54 closed.
root@pve:~#

Guess you like

Origin blog.51cto.com/5404628/2478709