[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Xen xl toolstack on Debian 7.3.0; can't ssh to VM



On Mon, 2014-01-20 at 13:56 +0000, Dale Mellor wrote:
> I've got DOM0 and DOMU running (both Debian 7.3.0 AMD64), and can use
> both individually and can `ssh localhost` on both with the expected
> results.  I am setting up the networking by hand to understand how it
> all goes.  The problem comes down to, no matter what I try, if I `ssh
> w.x.y.z` on DOM0 in the hope of having a shell on DOMU, I always end up
> with a shell on DOM0; the vif-bridge does not seem to carry the traffic
> across and in to the DOMU.

Have you tried just using the normal scripts and instructions? If so
does it work? Then you could perhaps compare with what you are doing
manually.

It is good that you want to understand things, but really you are asking
us to help you reinvent the wheel.

> Could someone describe the simplest setup which would achieve this,
> using just the `xl`, `ip`, `brctl` and `iptables` commands please?
> 
> 
> To be more concrete and provide maybe a starting point, here's a setup
> I'm currently trying:
> 
>     ===/etc/xen/s1-0-2=============================
> 
>     name="s1-0-2"
>     memory=2048
>     kernel='/root/s1-0-2--vmlinuz'
>     ramdisk='/root/s1-0-2--initrd'
>     extra='root=/dev/xvda1 -- console=hvc0'
>     e820_host=1
>     disk = [ 'phy:/dev/roots/s1-0-2,xvda,w' ]
>     vif=[ 'mac=02:12:12:12:12:02,bridge=s1-0-2' ]
>     vfb = [ 'type=vnc,vncdisplay=2' ]
>     vnc=1
>     stdvga=1
> 
>     ===============================================
> 
> 
> And then on DOM0 (eth1 is a physical interface without a wire plugged
> into it):
> 
>     echo 1 > /proc/sys/net/ipv4/ip_forward
>     iptables -t nat -I POSTROUTING -j MASQUERADE
>     brctl addbr s1-0-2
>     brctl addif s1-0-2 eth1
>     xl create /etc/xen/s1-0-2
>     ip add add 10.133.33.3/24 dev eth1
> 
> working on the DOMU console:
> 
>     ip add add 10.133.33.3/24 dev eth0
>     ip route add default via 10.133.33.3 dev eth0
> 
> and then when back on DOM0 I do
> 
>     ssh 10.133.33.3
> 
> I get a shell prompt on DOM0, whereas I would hope for a shell prompt on
> DOMU.

Your domU:eth0 and dom0:eth1 have the same IP address, so I expect when
dom0 comes to look up the route to 10.133.33.3 it is resolving to
itself.

It seems quite odd to me to add an ip address to dom0:eth1 at all, given
that it isn't plugged in.

It's also odd to give a device (eth1) which is part of a bridge an IP
address, it should instead go on the bridge. 

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.