From what I understand, A is a hypervisor hosting B, and from the contents of the routing table on A it seems it also has a virtual NIC connected to an internal network where the virtual NIC of B is residing.
For C to be able to reach B and vice versa, two things must happen:
- A must act as a router
- C must have an entry in its routing table for the network 192.168.122.0/24, pointing to A
On A, make sure IP forwarding is enabled. Exactly how you accomplish that depends on your distribution, but you could try
echo 1 > /proc/sys/net/ipv4/ip_forward as a quick-and-dirty solution (that won't survive a reboot). Additional configuration may be needed if rules in the
iptables FORWARD chain (or the FORWARD policy) is set to block/drop traffic (
iptables -L FORWARD will show both the policy and the ruleset).
On C, make sure 192.168.122.0/24 is routed to A's IP address. Again, for a permanent fix you'll have to edit your configuration files, but
route add -net 192.168.122.0/24 gw <IP_address_of_A> should do as a quick fix.
Adding a second IP address in the 192.168.122.0/24 network to C's NIC, as you tried, is not the same as adding a route. It will only cause the 192.168.122.0/24 network to exist in two different places: in the virtual environment inside A, and on the outside network connecting A and C. That would be an invalid IP configuration, as an IP network can only exist in one place.
Also, having two default gateways on the same system won't work at all, as you're telling the IP stack to send any traffic not specifically routed elsewhere through two different routers. That will actually cause the IP stack to load balance outbound traffic across both gateways, which is almost certainly not what you want.