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

Re: [Xen-users] Enable XEN 4.6 networking host <-> guest



Andrea Genuise <andrea.genuise@xxxxxxxxxxxxxxxxxx> wrote:

> I'm running CentOS 7 and I'm trying to enable networking on XEN.
> 
> Basically, I need just a network channel between host and guests
> and viceversa, as if they were on the same LAN.
> 
> I set up a bridge interface according to the guide here:
> https://wiki.centos.org/HowTos/Xen/Xen4QuickStart/Xen4Networking7
> and I have the following situation in dom0:
> 
> [root@localhost ~]# ip addr
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master
> xenbr0 state UP qlen 1000
> link/ether 00:25:b3:44:5f:fc brd ff:ff:ff:ff:ff:ff
> 3: wls1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
> link/ether 00:22:fa:d4:9e:de brd ff:ff:ff:ff:ff:ff
> 4: xenbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
> link/ether 00:25:b3:44:5f:fc brd ff:ff:ff:ff:ff:ff
> inet 10.13.14.175/22 brd 10.13.15.255 scope global dynamic xenbr0
> valid_lft 3973sec preferred_lft 3973sec
> inet6 fe80::225:b3ff:fe44:5ffc/64 scope link
> valid_lft forever preferred_lft forever

OK, you have a bridge with IP addr and a NIC (ens5) attached to it.

> 5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
> state DOWN

> 6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master
> virbr0 state DOWN qlen 500

Where have these come from - they shouldn't be there.

> But now I don't know which is the IP address of the guests in
> order to contact them (and viceversa from guest to host).

You have to configure the guest - Xen doesn't do it for you.

> I'm using this config file for the XEN VM:
> ...
> vif = [ 'bridge=xenbr0' ]

Right, that attaches a virtual NIC to the bridge when you start the guest.

> And inside the domU I get this:
> ...
> 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
> link/ether 00:16:3e:03:36:2f brd ff:ff:ff:ff:ff:ff

OK, you have a virtual NIC (00:16:3e is the OUI used by Xen). But, there are no 
IP addresses configured on it. You need to configure networking in the guest in 
much the same way as you would if it were a real (physical) machine.

> 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
> state DOWN
> link/ether 52:54:00:00:74:6b brd ff:ff:ff:ff:ff:ff
> inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
> valid_lft forever preferred_lft forever
> 4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master
> virbr0 state DOWN qlen 500
> link/ether 52:54:00:00:74:6b brd ff:ff:ff:ff:ff:ff

Where did these come from, they shouldn't be there.

> It seems like the xenbr0 is not even attached to the guest.

It shouldn't be. From the guest's POV there is just a virtual NIC. This virtual 
NIC is in turn connected to a VIF which gets connected to the bridge in Dom0.
If on Dom0 you type "brctl show xenbr0", you should see the bridge with ens5 
and vifn.1 as connected interfaces - n will be replaced with the same number as 
the ID of the guest.


_______________________________________________
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®.