[HCI-VN] Virtual Machine cannot start after restarting NIC (vlink not delivered)
Problem Description
NIC, but the virtual machine editing interface shows that it is connected.


Warning Information
none
Effective troubleshooting steps
1. This situation is Medium Node enter the vn-agent container (container_exec -n vn-a) on the background of the host where the virtual machine is located to view the vlink status:
sfd_byTools.sh –vlink|grep <vm_id>
If the output is empty, it means there is no vlink.
2. If you don't know how to troubleshoot, you may go to the qemu log, which Medium shows the following exception, which also indicates that vlink is not generated.
(PS: This socket file will be created only when vlink is built)

3. This situation needs to be checked step by step from the VT management plane -> VN control plane
On the VT management side, view the sfvt_vtpdaemon log and focus on:
Check some logs to see if vlink Shut Down is triggered by VT: grep -rn "[create_vm_interface_vlink]" /sf/log/today grep -rn "[shutdown_vm_interface_vlink]" /sf/log/today grep -rn "update network interfaces" /sf/log/today
The VT management plane sees the flag sent by vlink:

For detailed troubleshooting of the VN control plane, please refer to this kb, which is written in more detail:
http://tskb.sangfor.com/forum.php?mod=viewthread&tid=30890
If the current log is not enough, you need to enable LCP debug. If this step is reached, it is recommended to report to R&D for processing.
4. After turning on debug, the following exception is seen:


After checking the database, it was found that there was residual data in vrrp. This causes an exception in the dp configuration sent by lcp, and lcp keeps reporting errors, affecting the sending of vlink.
Root Cause
Direct cause of the problem: VRRP data remains in MySQL, causing abnormal DP configuration sent by LCP, and LCP keeps reporting errors Internal restriction: vmport and vrrp are not Allow more than 3 locations. The problem exists in vrrp with 4 locations.
Solution
Temporary recovery: delete the extra abnormal data in mysql
This issue is resolved in version 6.11.0. Once resolved, a patch will be released.
Suggestions and Conclusion
If lcp keeps restarting, this is most likely the problem. First check the MySQL database to see if there are more than 4 vmport/vrrp locations.