[Top][All Lists]

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

[Qemu-discuss] multiple nic interfaces question

From: Medi Montaseri
Subject: [Qemu-discuss] multiple nic interfaces question
Date: Mon, 18 Dec 2017 19:16:55 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0


I am trying to configure multiple nic interfaces and having some problems, help is appreciated.

my runqemu(1) script from poky/scripts/runqemeu is

commit 1db3dc88036ccd46ed2b714fdc0fb565beb001ed
Author: Robert Yang <address@hidden>
Date:   Sun Apr 10 07:16:48 2016 -0700

I have been using it successfully like

About to run [runqemu  qemux86-64  serial  kvm  qemuparams="-m 256  -device virtio-serial  -chardev socket,path=./virtio-ports/tty0,server,nowait,id=tty0   -device virtserialport,chardev=tty0,name=tty0    "]

I notice that it is creating tap0 and then cleans it up (a transient tap device).

runqemu(1) in-turn is calling

   -net nic,model=virtio -net tap,vlan=0,ifname=tap0,script=no,downscript=no
   -cpu kvm64 -drive 
   -show-cursor -usb -usbdevice tablet -vga vmware -no-reboot -serial stdio 
-enable-kvm -m 256
    -device virtio-serial -chardev 
    -device virtserialport,chardev=tty0,name=tty0
    -append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda rw mem=256M 
ip= oprofile.timer=1 rootfstype=ext4 

As seen, we have one tap0 device. I would like to create multiple tap devices (say tap1, tap2, etc). I have tried adding the following to qemuparams

case 1: " -net nic,model=virtio -net tap,ifname=tap1,script=no"
case 2: " -netdev tap,id=net0,ifname=tap1 -device virtio-net-pci,netdev=net0 "
case 3: " -net none -netdev tap,id=net0,ifname=tap1 -device 
virtio-net-pci,netdev=net0 "

And always get the following error
qemu-system-x86_64: -netdev tap,id=net0,ifname=tap1: could not configure 
/dev/net/tun (tap1): Operation not permitted
Set 'tap0' nonpersistent
Releasing lockfile of preconfigured tap device 'tap0'

/dev/net/tun mode is

ls -ld /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Dec 11 16:20 /dev/net/tun

there is a sudo operation going on by someone (but I can't tell by who or when)....

Continuing with the following parameters:
FSTYPE: [ext4]
Setting up tap interface under sudoAcquiring lockfile for tap0...

Anyways, I have the following questions:

1- Can I mix -net and -netdev together. Looks like -net is deprecated

2- Say I want to have persistent devices, how to instruct runqemu(1) or qemu-system-x86_64(1) to stay away from tap creation, and use existing persistent taps.

3- Do you have any suggestions as how to fix this issue.



reply via email to

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