I've a ubuntu machine hosting two VMs, each of them running an application, for which i need to provide high availability, so i implemented a floating IP using keepalived and VRRP, But i cannot ping the master VM using the virtual IP from the host, it says destination host unreachable.
keepalived.conf for VM1:
vrrp_instance VI_1 {
interface enp1s0
state MASTER #BACKUP here for VM2
virtual_router_id 51
priority 200 #100 in case of VM2
advert_int 2
authentication {
auth_type PASS
auth_pass monkey
}
virtual_ipaddress {
192.168.122.150/24
}
}
when i start keepalived service , it shows below messages:
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Unknown keyword '}'
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Unknown keyword 'virtual_ipaddress'
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Unknown keyword '192.168.122.150'
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Unknown keyword '}'
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Unknown keyword '}'
Dec 19 14:31:37 secondaryvm Keepalived_vrrp[1419]: Using LinkWatch kernel netlink reflector...
Dec 19 14:31:37 secondaryvm systemd[1]: Started Keepalive Daemon (LVS and VRRP).
Dec 19 14:31:39 secondaryvm Keepalived_vrrp[1419]: VRRP_Instance(VI_1) Transition to MASTER STATE
Dec 19 14:31:41 secondaryvm Keepalived_vrrp[1419]: VRRP_Instance(VI_1) Entering MASTER STATE
Dec 20 01:55:40 secondaryvm Keepalived_vrrp[1419]: VRRP_Instance(VI_1) Received advert with lower priori
~