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

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



On 16/06/2016 22:35, Andrea Genuise wrote:
Hi,

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
5: 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
6: 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

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).

I'm using this config file for the XEN VM:

kernel = "/srv/xen/vmlinuz-xen"
ramdisk = "/srv/xen/initrd-xen"
name = "dom1"
memory = "512"
disk = [ 'tap:aio:/srv/xen/dom1.img,xvda1,w',
'tap:aio:/srv/xen/shared.img,xvda2,r' ]
vcpus=1
vif = [ 'bridge=xenbr0' ]
root = '/dev/xvda1 ro'


And inside the domU I get this:
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: 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
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

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

How should I proceed?

Thank you.
Solved it by editing the scripts inside /etc/sysconfig/network-scripts directory
and setting up a static IPv4 configuration:

dom0 /etc/sysconfig/network-scripts/ifcfg-xenbr0:
...
BOOTPROTO="static"
IPADDR="10.0.0.1"
NETMASK="255.255.255.0"
NM_CONTROLLED="no"
...
domX /etc/sysconfig/network-scripts/ifcfg-eth0:
...
BOOTPROTO="static"
IPADDR="10.0.0.X"
NETMASK="255.255.255.0"
NM_CONTROLLED="no"
...
Thank you anyway,
Andrea
_______________________________________________
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®.