[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: |
Michael Tokarev |
Subject: |
[Qemu-devel] [Bug 770173] Re: /etc/qemu-ifup is not executed |
Date: |
Mon, 25 Apr 2011 10:06:30 -0000 |
This is not how tap networking works. You have to either pre-configure
the tap device before starting qemu, or grant the user ability to create
tap devices. Qemu have to open (or create) the tap device BEFORE
invoking the script, and if fails to do so due to insufficient
privileges, hence the script does not run. This is not a bug.
** Changed in: qemu
Status: New => Invalid
--
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