[ubuntu-ar] Configuración de bridge para KVM

Daniel Bareiro daniel-listas at gmx.net
Sat Mar 28 18:02:16 GMT 2009


Hola!

Estoy tratando de iniciar una máquina virtual KVM en Ubuntu server
usando el siguiente script de inicio:

----------------------------------------------------------------------------
root en ss01:~# cat /etc/init.d/vm_start
#!/bin/bash

#
# Variables
#

KVM=/usr/bin/kvm
DISK_PATH=/space/vms

#
# Main
#

$KVM -hda $DISK_PATH/ratatoskr.img -m 512 -boot c -smp 2 -net \
 nic,vlan=0,macaddr=00:16:3e:00:00:31 -net tap -daemonize -vnc :1 \
 -k es -localtime -monitor telnet:localhost:4001,server,nowait \
 -serial telnet:localhost:4041,server,nowait
----------------------------------------------------------------------------

pero cuando lo ejecuto manualmente, obtengo el siguiente mensaje de
error:

root en ss01:~# /etc/init.d/vm_start
can't add tap0 to bridge eth1: Operation not supported


En otra máquina con una sola interfaz de red estoy usando la misma
versión de KVM de Ubuntu y no obtengo estos errores al intentar levantar
la máquina virtual. Parecería ser que el problema se debe a que el
bridge no está en el default gateway [1], que sería consistente con la
configuración de red que estoy usando:

----------------------------------------------------------------------------
root en ss01:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# auto eth0
# iface eth0 inet dhcp

auto br0
iface br0 inet static
         address 10.1.0.49
         netmask 255.255.0.0
         network 10.1.0.0
         broadcast 10.1.255.255
         bridge_ports eth0
         bridge_stp off
         bridge_maxwait 5

auto eth1
iface eth1 inet static
         address 10.3.0.49
         netmask 255.255.0.0
         network 10.3.0.0
         broadcast 10.3.255.255
         gateway 10.3.0.5
----------------------------------------------------------------------------

El script qemu-ifup que estoy usando es el siguiente:

----------------------------------------------------------------------------
root en ss01:~# cat /etc/qemu-ifup
#!/bin/sh

# DGB - 20090106
#sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1

/sbin/ifconfig $1 0.0.0.0 promisc up
/usr/sbin/brctl addif br0 $1
sleep 2
----------------------------------------------------------------------------

Supongo que quizás, modificando este script, podría bootear las VMs
manteniendo el bridge en eth0 y con el default gateway en eth1. Alguien
me podría dar una mano para ver cómo configurar el script para conseguir
este resultado.

Gracias anticipadas.

Saludos,
Daniel

[1] https://bugs.launchpad.net/ubuntu/+source/kvm/+bug/125302
-- 
Mi frase del día:
"All we are given is possibilities -- to make ourselves one thing or another."
		-- Ortega y Gasset

Daniel Bareiro - GNU/Linux registered user #188.598
Proudly running Debian GNU/Linux with uptime:
14:43:09 up 35 days, 20:26, 11 users,  load average: 0.18, 0.18, 0.13
------------ próxima parte ------------
Se ha borrado un mensaje que no est? en formato texto plano...
Nombre     : no disponible
Tipo       : application/pgp-signature
Tama?o     : 197 bytes
Descripci?n: Digital signature
Url        : https://lists.ubuntu.com/archives/ubuntu-ar/attachments/20090328/f6ed2de0/attachment.pgp 


More information about the Ubuntu-ar mailing list