报错:Cant find interface eth0 for vrrp_instance VI_1 !!!
解决:
keepalived这个报错一般是由于不同系统的网卡名称不一致导致的,centons7.9的网卡名称如下,注意避坑
ens33
! Configuration File for keepalived
global_defs {
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 192.168.200.1
smtp_connect_timeout 30
router_id LVS_DEVEL
vrrp_skip_check_adv_addr
vrrp_strict
vrrp_garp_interval 0
vrrp_gna_interval 0
}
vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id 43
priority 222
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.0.0.188/24 dev ens33 label ens33:0
10.0.0.189/24 dev ens33 label ens33:1
}
}