LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable ssh the VM from Xen Hypervisor (http://www.linuxquestions.org/questions/linux-networking-3/unable-ssh-the-vm-from-xen-hypervisor-4175458409/)

rajorcldba 04-17-2013 12:33 AM

Unable ssh the VM from Xen Hypervisor
 
Hi Experts,

I am creating a VM under Xen Hypervisor.
I could login to the VM from "xm console <vm name>".
However the SSH is not working.

Did some research and seems like its a routing issue.
Routing at Hypervisor:
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.56.249.66 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
10.191.192.0 0.0.0.0 255.255.224.0 U 0 0 0 cscotun0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.191.208.91 0.0.0.0 UG 0 0 0 cscotun0
[root@node1 ~]#

Routing at VM is blank.
[root@dbnode1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
[root@dbnode1 ~]#

Network configuration:
Hypervisor Config Details:
[root@node1 ~]# grep GATEWAY /etc/sysconfig/network
GATEWAY=192.168.1.1
[root@node1 ~]# grep NETMASK /etc/sysconfig/network-scripts/ifcfg-eth0
NETMASK=255.255.255.0
[root@node1 ~]# hostname -i
192.168.1.15
[root@node1 ~]#

Configured VM as per the above:
[root@dbnode1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dbnode1.arun.com
[root@dbnode1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# generated by /usr/sbin/oraclevm-template
DEVICE=eth0
ONBOOT=yes
#BOOTPROTO=dhcp
BOOTPROTO=static
#HWADDR=00:16:36:6c:af:a5
HWADDR=00:16:3E:2A:59:4C
IPADDR=192.168.1.31
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
[root@dbnode1 ~]#

[root@dbnode1 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:3E:2A:59:4C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@dbnode1 ~]#

[root@dbnode1 ~]# route add -net 192.168.1.0/24 gw 192.168.1.1
SIOCADDRT: Network is unreachable
[root@dbnode1 ~]#

[root@dbnode1 ~]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.31 dbnode1.arun.com dbnode1
[root@dbnode1 ~]#


Please suggest where I am missing.

dctw 04-17-2013 01:36 AM

If there is another Xen instance running at the same server, probably you can try to ping from this vm to the other vm or vice versa.

My guess would be the network misconfiguration at the Xen Bridge. Probably you can paste the output of brctl command and also the xen instance configuration file and we can troubleshoot from there.

rajorcldba 04-17-2013 04:11 AM

Thanks for the quick reply.

This is first VM I am configuring on this Xen environment.

[root@node1 ~]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 11935 4 r----- 5597.1
[root@node1 ~]#

Other than Privileged Domain, there are no other domains to cross-check the configuration.

Here are the details:
[root@node1 ~]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes
xenbr0 8000.feffffffffff no peth0
vif0.0
[root@node1 ~]#
[root@node1 ~]# cat /u01/VM1/vm.cfg
bootloader = '/usr/bin/pygrub'
disk = ['file:/u01/VM1/System.img,xvda,w',
]
memory = '2048'
name = 'OVM_EL5U5_X86_64_11201RAC_1'
on_crash = 'restart'
on_reboot = 'restart'
vcpus = 1
vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0']
vif = ['bridge=xenbr0,type=netfront',]
vif_other_config = []
[root@node1 ~]#

dctw 04-17-2013 11:33 PM

I see....
Not sure whether it helps ... My configuration for Xen client is much simpler.

You can try this and see whether it works??

***************************************
name = 'OVM_EL5U5_X86_64_11201RAC_1'
memory = '2048'
disk = ['file:/u01/VM1/System.img,xvda,w',
]
vif = ['bridge=xenbr0', ]
bootloader = '/usr/bin/pygrub'
vcpus = 1
on_crash = 'restart'
on_reboot = 'restart'
********************************

dctw 04-17-2013 11:35 PM

Of course I'd presume the client is running and firewall for the Xen client is off.
From the Xen client, are the network interface up? What is the ifconfig output for the client and server? Are they pingable from server to client and vice versa ...
Is the sshd running at the client and stuff....

These are some of the questions I should have asked earlier before biting on Xen being the cause. LOL

From your output earlier, I didn't see indication that the client is running from your 'xm list' output. Maybe I'm wrong ...

rajorcldba 04-17-2013 11:42 PM

Hi,

I could access the VM from the Xen without any issue using the "xm console".

However unable to ping/ssh between the Hypervisor and VM.

Seems like the issue could be with bridge/routing setup.

Regards,
Raj.

dctw 04-17-2013 11:55 PM

Have you tried the client config file I suggested?
Also can we take a look at the output for the following for both Hypervisor and Client?

route -n
ifconfig

dctw 04-18-2013 12:05 AM

I was looking at the output you posted earlier and noticed there isn't an IP assigned to eth0. Probably you can start troubleshoot from there.

******************************
[root@dbnode1 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:3E:2A:59:4C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

[root@dbnode1 ~]#

******************************


All times are GMT -5. The time now is 05:02 PM.