@An Vo Apologize for the delay in responding to this issue. I had to perform some lab tests so determine the cause of this and understand the solution for this problem. I tested this scenario and see that doing the below fixes the issue:
Find the Interface No. of Nic2 of VM2 using the route print command which will give a similar output as shown below:
===========================================================================
Interface List
3...00 0d 3a 10 92 ce ......Microsoft Hyper-V Network Adapter
7...00 0d 3a 10 9b 2a ......Microsoft Hyper-V Network Adapter #2
===========================================================================
-- Here the #2 Network Adapter has the Interface# 7
On VM2, please add the following routes:
route add -p 0.0.0.0 MASK 0.0.0.0 192.168.1.1 METRIC 5015 IF <Interface No. of NIC2>
Now add another route specifically for VM1's IP address as shown below:
route add -p 192.168.5.200 MASK 255.255.255.255 192.168.5.20 METRIC 5000 IF <Interface No. of NIC2>
Once you add these routes, it will give you an "Ok!" for every command once it adds the same. You can verify if these are added by doing a "Route Print". After adding these routes, you should be able tp ping the VM2's NIC2 IP from VM1 as expected and also vice-versa. Hope this helps!
Please let us know if you have any further questions and we will be glad to assist you further. Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.