When I am trying to login (via putty) to the primary production server 2 using virtual IP [X.X.X.38],by default it is going to the production server 1 [X.X.X.37]. Can anyone tell me the probable reason and necessery action to be taken?
Check if VIP services are up & Ruuning on node 2
crs_stat -t | grep -i vip
There are possible chances that VIP has got failed over to node 1, re-directing you connection to node1
Virtual IP's are used as interconnect by RAC. If your cluster is up, oracle will manage the connection to server by its own i.e. if your cluster services are up and running, RAC will generate its own VIP to manage cluster.
In your case when you give VIP to connect to putty, ORACLE on basis of load, performance will take you too the best node out of the two. As a test case, you may shutdown your cluster and then try connecting to your node through VIP's, it will work as desired.
It is a bad idea to use ssh on VIPs as the host signature can differ each time around, depending on the physical server owning that VIP at the time. Which means getting ssh "+man in the middle attack+" warnings and having to delete and update your known_hosts file each time around.
This is just silly IMO.
You want to admin a server? Use its static IP. Not VIP.