In desperate need of Xen/Networking help!

I haven’t had to set up a Xen virtualized server in a few years. The last time I was using Fedora Core 5. I’ve switched primarily to openSUSE, and I’m amazed at how difficult of a time I’m having getting this going.

For some background, this is a Phenom 9500 with 4GB of RAM, 80GB HDD. Virtualization extensions have been enabled as well as the TLB errata patch.

Last night I set up a fresh install of openSUSE 11.1 64-bit (using the LiveCD). I then switched from NetworkManager to traditional ifup/ifdown in Yast for Network Control (I read somewhere that NetworkManager causes problems with Xen networking).

I went back into Yast and installed the hypervisor and tools. I rebooted into the Xen kernel, and downloaded the openSUSE 64 bit DVD. I created a new virtual machine (1 vCPU, 1GB RAM, 15GB HDD, paravirtualized) and installed openSUSE 11.1.

When the installation tried to connect to check for updates, it couldn’t establish a connection. I’m not sure why this isn’t working, it should be an out-of-the-box thing, right?

I read a post somewhere saying to specify the IP in the Xen machine config, but that hasn’t helped either. Here are some outputs that should hopefully help:

I’ve tried adding eth0 to the bridge pan0, no luck. The DomU is set up for DHCP right now. I’ve tried setting it to the static IP 192.168.1.99, no luck.

Dom0 route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

Dom0 ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:1F:D0:50:20:D9  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:d0ff:fe50:20d9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1595 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3011286 (2.8 Mb)  TX bytes:182115 (177.8 Kb)
          Interrupt:252 Base address:0x4000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2508 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2508 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1544751 (1.4 Mb)  TX bytes:1544751 (1.4 Mb)

vif1.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:69 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:4 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:20816 (20.3 Kb)  TX bytes:140 (140.0 b)

Dom0 brctl show

bridge name	bridge id		STP enabled	interfaces
pan0		8000.feffffffffff	no		vif1.0

DOM0 Xen VM config:

name="build1"
uuid="a4ee0967-a178-9bfa-985d-b7efc97d1c4b"
memory=512
maxmem=1024
vcpus=1
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
keymap="en-us"
builder="linux"
bootloader="/usr/lib/xen/boot/domUloader.py"
bootargs="--entry=xvda2:/boot/vmlinuz-xen,/boot/initrd-xen"
extra=" "
disk= 'file:/var/lib/xen/images/build1/disk0,xvda,w', 'file:/home/ghoerner/Desktop/openSUSE-11.1-DVD-x86_64.iso,xvdb:cdrom,r', ]
vif= 'ip=192.168.1.99,mac=00:16:3e:50:0f:b7,bridge=pan0', ]
vfb='type=vnc,vncunused=1']

I have to have 3 of these VMs set up on this machine by tomorrow, any help anyone could provide would be greatly appreciated.

Hi,

I’m running a Xen kernel (86-X64)
I have one virtual machine running

When I compare my ethernet interface and yours I see one big difference and it seems that you are missing a bridge (br0)

As far as I remember this was automatically created when I started the Xen kernel.

Ifconfig in dom0

br0       Link encap:Ethernet  HWaddr 00:21:5A:4D:FE:50
          inet addr:192.168.1.130  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:787935 errors:0 dropped:0 overruns:0 frame:0
          TX packets:516288 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:999756880 (953.4 Mb)  TX bytes:77054656 (73.4 Mb)

eth0      Link encap:Ethernet  HWaddr 00:21:5A:4D:FE:50
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1871875 errors:0 dropped:0 overruns:0 frame:0
          TX packets:527868 errors:0 dropped:0 overruns:0 carrier:0
          collisions:8629 txqueuelen:1000
          RX bytes:1846125976 (1760.6 Mb)  TX bytes:80159566 (76.4 Mb)
          Interrupt:16 Memory:fa000000-fa012700

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:48004 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:868828520 (828.5 Mb)  TX bytes:868828520 (828.5 Mb)

vif1.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:5851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22118 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:464636 (453.7 Kb)  TX bytes:10806863 (10.3 Mb)

ifconfig in domu shows only eth0 and lo

Hope this help
Regards
Philippe

Hi,

I had very hard time, I have installed Opensuse 11.1 (x86-64) on my core2quad with 8Gb ram. First, I have noticed that steps as shown at:

How to install & configure Xen Virtualization in openSUSE 11.0 | SUSE & openSUSE

won’t work - simply I got vif(0) could not be connected, so I gave up this metod of configuring and decided to go through shell. I have one nic (eth0). I don’t know if this can help you (or anyone) but since there are so many references regarding Xen and other Linux distributions, I hope that someone might find this useful. Also note that I have updated all packages with latest from suse update but it didn’t help either. So:

a) after installing all needed to run xen, go to /etc/xen
and edit xend-config.sxp
change line
(network-script)
to
(network-script network-bridge)
b) if you have rebooted your server to run with xen kernel and
made changes to /etc/xen/xend-config.sxp don’t run /etc/init.d/xend restart !!! Run /sbin/reboot otherwise if you are connected remotely through ssh you will cut off your access to server! After that when server reboots ifconfig should show
eth0, peth0 (being in PROMISC mode) and lo0 interfaces
c) copy /etc/xen/examples/xmexample.hvm to /root/mydomain.hvm
(or whatever you like).
d) edit file with your favourit editor.
most important:
comment out line:
device_model = ‘/usr’ + arch_libdir + '/xen/bin/qemu-dm’
and make sure you are using vnc access (otherwise /var/log/xen/xend.log is full of errors regarding python2.6 etc).
line
** vif = ‘type=ioemu bridge=xenbr0’ ] **
should be:
** vif = ‘type=iomeu bridge=eth0’ ] ** (since there is no xenbr0 in xen-3.3 used by OpenSuse 11.1
After that you can say
xm create /root/mydomain.hvm

Of course, you need to edit mydomain.hvm to point to correct disks you want to use… Hope this helps…

p.s. I suppose that you should check out XenNetworking - Xen Wiki
to make sure what network scenario you would like. Suggestions I gave are for bridged network setup.