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

Re: [Xen-users] çå: xen bug in ubuntu 12.04 ï



Am 11.08.2012 19:14, schrieb lyflyd:

Tksï

I run pv guest ï When I create pv guest by xen-create-image command,the vif can up success.

But when I create guest system through the following the script of the way to create.( In fact is to copy a guest system)

#!/bin/bash

Â

# $1 is Âipaddr

if [ -z $1 ];then

ÂÂÂÂÂÂÂ echo "Usage:$0 ip_addr"

ÂÂÂÂÂÂÂ exit 0

fi

# get random string

MATRIX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

LENGTH="2"

while [ "${n:=1}" -le "$LENGTH" ]

do

ÂÂÂÂÂÂÂ PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"

ÂÂÂÂÂÂÂ let n+=1

done

echo "$PASS"

cp templates.cfg $1.cfg

# set mac

sed -i "s/TEMP/$PASS/g" $1.cfg

# set hostname

sed -i "s/HOSTNAME/$1/g" $1.cfg

# set ipaddr

sed -i "s/IPADDR/$1/g" $1.cfg

Â

#

## create disk iso and swap file

#

Â

mkdir -p /data/xen/domains/$1

dd if=/dev/zero of=/data/xen/domains/$1/disk.img bs=1 count=1 seek=20G

dd if=/dev/zero of=/data/xen/domains/$1/swap.img bs=1M count=1024

mkfs.ext4 /data/xen/domains/$1/disk.img

sleep 2

cd /data/xen/domains/$1

mount -o loop disk.img /mnt

tar -zxSf /data/xen/domains/templates_10.04/ubuntu_10.04.tgz -C /mnt/

sleep 2

sed -i "s/10.10.10.231/$1/g" /mnt/etc/network/interfaces

sleep 2

umount /mnt

Â

#

## start vps $1

#

xm create -c $1.cfg

ubuntu_10.04.tgz is a os iso file.

Â

My configuration file :

#

# Configuration file for the Xen instance 10.04, created

# by xen-tools 4.3.1 on Sat Jul 28 03:10:44 2012.

#

Â

#

#Â Kernel + memory size

#

Â

Â

bootloader = '/usr/bin/pygrub'

Â

vcpusÂÂÂÂÂÂ = '1'

memoryÂÂÂÂÂ = '1048'

Â

#

#Â Disk device(s).

#

rootÂÂÂÂÂÂÂ = '/dev/xvda2 ro'

diskÂÂÂÂÂÂÂ = [

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 'file:/data/xen/domains/10.10.10.220/disk.img,xvda2,w',

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 'file:/data/xen/domains/10.10.10.220/swap.img,xvda1,w',

ÂÂÂÂÂÂÂÂÂÂÂÂÂ ]

Â

Â

#

#Â Physical volumes

#

Â

Â

#

#Â Hostname

#

nameÂÂÂÂÂÂÂ = '10.10.10.220_10.04'

Â

#

#Â Networking

#

vifÂÂÂÂÂÂÂÂ = [ 'ip=10.10.10.220 ,mac=00:16:3E:22:5K:2F' ]

Â

#

#Â Behaviour

#

on_rebootÂÂ = 'restart'

on_crashÂÂÂ = 'restart'

Â

Â

åää: Lukas Laukamp [mailto:lukas@xxxxxxxxxx]
å éæé: 2012å8æ12æ 0:53
æää: lyflyd
æé: xen-users@xxxxxxxxxxxxx
äé: Re: [Xen-users] xen bug in ubuntu 12.04 ï

Â

Am 11.08.2012 18:27, schrieb lyflyd:

Hiï

Â

in the ubuntu 12.04 ,i installed the xen dom0 success.

In the startup xen guest, the guest system can be the normal starting, but guest system vif interface does not exist.

View dmesg log shows:

[2062.382385] device vif9.0 entered promiscuous mode

[2062.387698] ADDRCONF (NETDEV_UP) : vif9.0: link is not ready

[2072.221544] vif8.0: no IPv6 routers present

[2076.808353] xen-blkback: ring-ref 8, event-channel 9, protocol 1 (x86_64-abi)

[2076.847384] xen-blkback: ring-ref 9, event-channel 10, protocol 1 (x86_64-abi)

[2076.856078] eth1: port 4 (vif9.0) entering disabled state

[2076.856268] eth1: port 4 (vif9.0) entering disabled state

Â

this vif interfaces that the line is disabled.

Â

And the normal vif startup information is:

[2035.861524] ADDRCONF (NETDEV_UP) : vif7.0: link is not ready

[2048.585999] xen-blkback: ring-ref 8, event-channel 9, protocol 1 (x86_64-abi)

[2048.629885] xen-blkback: ring-ref 9, event-channel 10, protocol 1 (x86_64-abi)

[2048.648746] ADDRCONF (NETDEV_CHANGE) : vif7.0: link becomes ready

[2048.648801] eth1: port 2 (vif7.0) entering forwarding state

[2048.648806] eth1: port 2 (vif7.0) entering forwarding state

Â

why the vif interfaces disabled?

Â

what's wrong ?

how can I do ?

Â

Â




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


Hello,

it would be useful to know if you run a HVM or PV guest and how your configuration look like. I don't have issues with Xen on Ubuntu 12.04 and Debian. The only case where I had problems was when the vif option in the configuration file of a HVM has the option type=ioemu. There it happened that the vif interface couldn't be setup correct or stopped after a while.

Best Regards


Hello,

xen-create-image should generate a DomU configuration file in the specified output dir. Could you show us the configuration file of the DomU and the configuration of you bridge in /etc/network/interfaces. If you have created the bridge with the script network-bridge try to create the manually and try to start the guest with this bridge. So a possible bridge configuration could look like this:

auto xenbr0
iface xenbr0 inet static
ÂÂÂ address IP-ADDRESS of Dom0
ÂÂÂ netmask NETMASK-FOR-THE-NETWORK
ÂÂÂ gateway GATEWAY-OF-THE-NETWORK
ÂÂÂ bridge_ports eth0
ÂÂÂ bridge_stp off (Spanning tree protocol is disabled in this case)
ÂÂÂ bridge_fd 0 (sets the default forward delay)

The configuration for eth0 then must look like this:

auto eth0
iface eth0 inet manual

The configuration line for vif in the DomU configuration should look like this:

vifÂÂÂ [ 'bridge=xenbr0,ip=IP-OF-DOMU,mac=WANTED-MAC-ADDRESS' ]

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