[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.
https://bugs.launchpad.net/bugs/770173
Title:
/etc/qemu-ifup is not executed
Status in QEMU:
Invalid
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 ->
/usr/bin/qemu-ifup*
$ cat /etc/qemu-ifup
#!/bin/sh
#switch=$(/sbin/ip route list | awk '/^default / { print $5 }')
#/sbin/ifconfig $1 0.0.0.0 up
#/usr/sbin/brctl addif ${switch} $1
set -x
switch=br0
if [ -n "$1" ];then
/usr/bin/sudo /etc/qemu-ifup-sudo $1 `whoami`
exit 0
else
echo "Error: no interface specified"
exit 1
fi
$ cat /etc/qemu-ifup-sudo
#!/bin/sh
set -x
switch=br0
/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
- [Qemu-devel] [PATCH 0/5] PPC: Add FSL (e500) MMU emulation, Alexander Graf, 2011/04/30
- [Qemu-devel] [PATCH 1/5] PPC: Make MPC8544DS obey -cpu switch, Alexander Graf, 2011/04/30
- [Qemu-devel] [PATCH 3/5] PPC: Add GS MSR definition, Alexander Graf, 2011/04/30
- [Qemu-devel] [PATCH 2/5] PPC: Make MPC8544DS emulation work w/o KVM, Alexander Graf, 2011/04/30
- [Qemu-devel] [PATCH 4/5] PPC: Add another 64 bits to instruction feature mask, Alexander Graf, 2011/04/30
- [Qemu-devel] [PATCH 5/5] PPC: Implement e500 (FSL) MMU, Alexander Graf, 2011/04/30