Hi again, I also tested the brctl bridges on the host domain. The output of brctl is shown below too. I tried adding a new bridge and configuring guest domain to use it, but with no success. I also tried to turn the STP on and off for xenbr0, and tested each case with xm create with no success either. -bash-3.00# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no vif0.0 peth0 Any input is appreciated, Lamia Youseff ------------------ Hi All, I am having a really hard time starting xen-domain with a vbd file. I always get the error "Error: Device 0 (vif) could not be connected. Backend device not found." I have been using xen 2.0 before, but now i am not able to start domains with xen 3. I have no clue what could be the problem. I have done some testing, which is shown in the log below. Any ideas/ help will be very appreciated, Lamia Youseff ==================================-bash-3.00# cat xen-domain.config kernel = "/boot/vmlinuz-2.6-xenU" memory = 128 name = "xen3-vm1" nics = 1 ip = "10.1.1.13" netmask=get_current_ipmask() gateway=get_current_ipgw() hostname="xen3-vm1" disk = [''phy:vg2/vmdisk1,sda1,w''] root = "/dev/sda1 ro" vif = [''mac=00:16:3E:F6:BB:B3, bridge=xenbr0'' ] ==============================================-bash-3.00# xm create xen-domain.config Using config file "xen-domain.config". Error: Device 0 (vif) could not be connected. Backend device not found. ===============================================-bash-3.00# xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 142 4 r----- 536.0 xen3-vm1 5 128 1 --p--- 0.0 ==============================================-bash-3.00# blockdev --getsize /dev/vg2/vmdisk1 2097152 ==============================================-bash-3.00# lvs LV VG Attr LSize Origin Snap% Move Log Copy% vmdisk1 vg2 -wi-ao 1.00G -bash-3.00# lvscan ACTIVE ''/dev/vg2/vmdisk1'' [1.00 GB] inherit ================================================-bash-3.00# xm destroy 5 -bash-3.00# mount /dev/vg2/vmdisk1 /mnt/vmdisk/ -bash-3.00# cat /mnt/vmdisk/ .autofsck etc/ lib64/ opt/ tmp/ bin/ home/ lost+found/ proc/ usr/ boot/ initrd/ media/ root/ var/ dev/ lib/ mnt/ sbin/ -bash-3.00# cat /mnt/vmdisk/etc/fstab # This file is edited by fstab-sync - see ''man fstab-sync'' for details /dev/sda1 / ext2 defaults 1 1 /boot /boot ext2 defaults 1 2 LABEL=/tmp /tmp ext2 defaults 1 2 LABEL=/usr /usr ext2 defaults 1 2 LABEL=/var /var ext2 defaults 1 2 -- .......................................................... : Lamia M.Youseff : lyouseff@cs.ucsb.edu : : Ph.D Candidate : www.cs.ucsb.edu/~lyouseff : : University of California,: : : Santa Barbara (UCSB) : : :........................................................: : : : "There are no impossible dreams; there is just our : : limited perception of what is possible" : *:-.,_,.-:*''``''*:-.,_,.-:*''``''*:-.,_,.-:*''``''*:-.,_,.-:*''* _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Timo Virtaneva
2006-Jan-23 20:31 UTC
Re: [Xen-users] Backend device not found!!.-- follow-up
Hi I''m had similar problems. I use the network - script from the fc4 beta version and it is workin fine: -- Timo ########## Network script vi /etc/xen/scripts/network #!/bin/sh #===========================================================================# Default Xen network start/stop script. # Xend calls a network script when it starts. # The script name to use is defined in /etc/xen/xend-config.sxp # in the network-script field. # # This script creates a bridge (default xen-br0), adds a device # (default eth0) to it, copies the IP addresses from the device # to the bridge and adjusts the routes accordingly. # # If all goes well, this should ensure that networking stays up. # However, some configurations are upset by this, especially # NFS roots. If the bridged setup does not meet your needs, # configure a different script, for example using routing instead. # # Usage: # # network (start|stop|status) {VAR=VAL}* # # Vars: # # bridge The bridge to use (default xen-br0). # netdev The interface to add to the bridge (default eth0). # antispoof Whether to use iptables to prevent spoofing (default yes). # # start: # Creates the bridge and enslaves netdev to it. # Copies the IP addresses from netdev to the bridge. # Deletes the routes to netdev and adds them on bridge. # # stop: # Removes netdev from the bridge. # Deletes the routes to bridge and adds them to netdev. # # status: # Print ifconfig for netdev and bridge. # Print routes. # #=========================================================================== # Exit if anything goes wrong. set -e # First arg is the operation. OP=$1 shift # Pull variables in args in to environment. for arg ; do export "${arg}" ; done bridge=${bridge:-xen-br0} netdev=${netdev:-eth0} antispoof=${antispoof:-yes} echo "network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" # Usage: transfer_addrs src dst # Copy all IP addresses (including aliases) from device $src to device $dst. transfer_addrs () { local src=$1 local dst=$2 # Don''t bother if $dst already has IP addresses. if ip addr show dev ${dst} | egrep -q ''^ *inet '' ; then return fi # Address lines start with ''inet'' and have the device in them. # Replace ''inet'' with ''ip addr add'' and change the device name $src # to ''dev $src''. Remove netmask as we''ll add routes later. ip addr show dev ${src} | egrep ''^ *inet '' | sed -e " s/inet/ip addr add/ s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@ s/${src}/dev ${dst}/ " | sh -e } # Usage: transfer_routes src dst # Get all IP routes to device $src, delete them, and # add the same routes to device $dst. # The original routes have to be deleted, otherwise adding them # for $dst fails (duplicate routes). transfer_routes () { local src=$1 local dst=$2 # List all routes and grep the ones with $src in. # Stick ''ip route del'' on the front to delete. # Change $src to $dst and use ''ip route add'' to add. ip route list | grep ${src} | sed -e " h s/^/ip route del / P g s/${src}/${dst}/ s/^/ip route add / P d " | sh -e } # Usage: create_bridge dev bridge # Create bridge $bridge and add device $dev to it. create_bridge () { local dev=$1 local bridge=$2 # Don''t create the bridge if it already exists. if ! brctl show | grep -q ${bridge} ; then brctl addbr ${bridge} brctl stp ${bridge} off brctl setfd ${bridge} 0 fi ifconfig ${bridge} up } # Usage: antispoofing dev bridge # Set the default forwarding policy for $dev to drop. # Allow forwarding to the bridge. antispoofing () { local dev=$1 local bridge=$2 iptables -P FORWARD DROP iptables -A FORWARD -m physdev --physdev-in ${dev} -j ACCEPT } # Usage: show_status dev bridge # Print ifconfig and routes. show_status () { local dev=$1 local bridge=$2 echo ''============================================================'' ifconfig ${dev} ifconfig ${bridge} echo '' '' ip route list echo '' '' route -n echo ''============================================================'' } op_start () { if [ "${bridge}" == "null" ] ; then return fi # Create the bridge and give it the interface IP addresses. # Move the interface routes onto the bridge. create_bridge ${netdev} ${bridge} transfer_addrs ${netdev} ${bridge} transfer_routes ${netdev} ${bridge} # Don''t add $dev to $bridge if it''s already on a bridge. if ! brctl show | grep -q ${netdev} ; then brctl addif ${bridge} ${netdev} fi if [ ${antispoof} == ''yes'' ] ; then antispoofing ${netdev} ${bridge} fi } op_stop () { if [ "${bridge}" == "null" ] ; then return fi # Remove the interface from the bridge. # Move the routes back to the interface. brctl delif ${bridge} ${netdev} transfer_routes ${bridge} ${netdev} # It''s not our place to be enabling forwarding... } case ${OP} in start) op_start ;; stop) op_stop ;; status) show_status ${netdev} ${bridge} ;; *) echo ''Unknown command: '' ${OP} echo ''Valid commands are: start, stop, status'' exit 1 esac ----- Lamia M.Youseff <lyouseff@cs.ucsb.edu> kirjoitti:> Hi again, > > I also tested the brctl bridges on the host domain. The output of > brctl > is shown below too. I tried adding a new bridge and configuring guest > > domain to use it, but with no success. I also tried to turn the STP on > > and off for xenbr0, and tested each case with xm create with no > success > either. > > -bash-3.00# brctl show > bridge name bridge id STP enabled interfaces > xenbr0 8000.feffffffffff no vif0.0 > > peth0 > Any input is appreciated, > Lamia Youseff_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users