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

RE: [Xen-users] domU HVM network problem



By network address I mean in the machine.cfg on the vif= line instead of assigning an IP address I use the network address which in TCP/IP end in a zero.  This is because the VIF is not actually the tunnel to the domU nic.  My vif line looks like this:

vif = [ 'type=ioemu, vifname=vif0.0, ip=192.168.0.0, mac=FA:CE:00:00:00:01' ]

You have to make sure the tuntap module is loaded by typing lsmod:

[root@srv140 xen]# lsmod
Module                  Size  Used by
xt_tcpudp              36417  1
xt_physdev             36049  2
iptable_filter         36161  1
ip_tables              55329  1 iptable_filter
x_tables               50249  3 xt_tcpudp,xt_physdev,ip_tables
tun                    44993  1                                                         <<<<<<<<<<<<<<<<<<<<<<<<<


When I tested with Xen 3.0.1 the system craeted tun0 for the first domain.  Now in Xen 3.0.3 it creates tap0.  You have to type ifconfig -a to see the tun/tap devices and they are only created while the domU is running.  They get deleted when you shutdown the domU.  To keep things standard TCP/IP I assign the first address of the subnet to the tun/tap device and make that address the default gateway inside the domU:

in dom0:
tap0      Link encap:Ethernet  HWaddr CE:B9:F8:5E:22:D1
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

in domU:
[root@Xdom1 ~]# ip r
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.2
default via 192.168.0.1 dev eth0


My dom0 and each of my domU's are all on different subnets so I can use dom0 as a router. 

I hope this helps.


Max Baro
Technical Support Supervisor
FACTS Services, Inc.
(305) 284 - 7440
meb@xxxxxxxxxxxxxxxxx



-----Original Message-----
From: Carles Pina i Estany [mailto:carles@xxxxxxxx]
Sent: Sunday, March 09, 2008 5:54 PM
To: Max E. Baro
Cc: 'xen-users@xxxxxxxxxxxxxxxxxxx'
Subject: Re: [Xen-users] domU HVM network problem




Hello,

On Mar/09/2008, Max E. Baro wrote:
> Sorry, I guess I forgot to elaborate on the rest of the setup to make it
> work.

don't worrie...

> I modified vif-route because the default behavior is to set the eth0
> ip address to the vif interface and I could never get that to work
> properly.  Instead I assign the IP in the configuration file as you
> did, but I assign a network number address, not a host address.

in /etc/xend/machine.cfg, do you assign a network address?  Could you
show me what do you mean? I'm not sure if I get the point :-(

[here you explained some changes in vif-route, I did it and now the
vifXX.0 has the domU IP and not dom0, good!]

> Then in config I assign IP as "192.168.1.0".  This is important because you

in the domU config? in the vif line? If I set up ['ip=192.168.0.0,type=ioemu'], after xm create NAME I get:
----
Error: Device 0 (vif) could not be connected. Backend device not found.
----
(Are you using the same network for domU and dom0? -192.168.1.0/24- or
are you using two different networks? -like 192.168.1.0/24 and
192.168.0.0/24?)

> will cause a conflict with the eth0 adapter inside the domU.  In my domU I
> configure ifcfg-eth0 with IPADDRESS=192.168.1.2.  AFTER the domU is started
> I assign IP address 192.168.1.1 to the tap/tun device created in dom0 for
> that domain.

ok I understand (but I cannot ping it from domU to dom0 :-( )

> Here is where the problem with routing comes in.  The tap/tun device created
> is not specific to the domU id in anyway, it depends in what order the
> domU's are created.  If you have two HVM domains and each only one nic
> assigned, then the first one to be created will use device tap0 and the
> second one created will use tap1.  I have not found a way to specify which
> tap device to create so I cannot assign the IP address for the tap device
> automatically on startup.

well, I will be able to handle it in some way... after I have one
machine working :-)

Thank you a lot again, I think that I'm the last steps (I hope!)

--
Carles Pina i Estany            GPG id: 0x8CBDAE64
        http://pinux.info       Manresa - Barcelona

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

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