[Top][All Lists]

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

[Qemu-devel] [Bug 770173] Re: /etc/qemu-ifup is not executed

From: Carlos Eduardo Moreira dos Santos
Subject: [Qemu-devel] [Bug 770173] Re: /etc/qemu-ifup is not executed
Date: Mon, 25 Apr 2011 16:52:31 -0000

That's not what is written in documentation. http://www.linux-
kvm.org/page/Networking) makes clear that /etc/qemu-ifup is executed by
qemu to create a tap interface. My script /etc/qemu-ifup-sudo is based
on the doc's one and my user has the ability to create tap devices using
sudo. In fact, a device is created in the first post if the script is
called manually.

If the bug is in the documentation and we must create tap devices before
calling qemu, where is the best place to discover the first non-existent
tapX device and create it?

You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

  /etc/qemu-ifup is not executed

Status in QEMU:

Bug description:
  The following does not work:
  $ qemu -m 512 -drive file=arch_min.qcow2,if=virtio,boot=on -nographic -net 
nic,model=virtio -net tap,script=/etc/qemu-ifup
  warning: could not configure /dev/net/tun: no virtual network emulation

  However, this works:
  $ /etc/qemu-ifup tap0
  $ kvm -m 512 -drive file=arch_min.qcow2,if=virtio,boot=on -nographic -net 
nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no
  $ /etc/qemu-ifdown tap0

  Other info:

  - qemu 0.12.5
  - ubuntu 10.10

  $ ls -l /etc/qemu-ifup
  lrwxrwxrwx 1 root root  18 2011-03-26 15:57 /etc/qemu-ifup -> 

  $ cat /etc/qemu-ifup

  #switch=$(/sbin/ip route list | awk '/^default / { print $5 }')
  #/sbin/ifconfig $1 up
  #/usr/sbin/brctl addif ${switch} $1

  set -x


  if [ -n "$1" ];then
    /usr/bin/sudo /etc/qemu-ifup-sudo $1 `whoami`
    exit 0
    echo "Error: no interface specified"
    exit 1

  $ cat /etc/qemu-ifup-sudo

  set -x


  /usr/sbin/tunctl -u $2 -t $1
  /usr/bin/sudo /sbin/ip link set $1 up
  sleep 0.5s
  /usr/bin/sudo /usr/sbin/brctl addif $switch $1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]