QEMU/KVM bridge networking howto

Hello all,
I had a dialog here:  https://bbs.archlinux.org/viewtopic.php?id=145177  but I inadvertently hijacked the OP thread, for that I deeply apologize and decided to start my own thread.
I've been struggling with getting my bridge networking working with QEMU/KVM.  I would love to get my KVM Windows 7 install working with bridge network so I can access my internal lan, but so far I am out of luck.  When I follow the Wiki's I completely hose my network settings and can't get online with my Arch host.
I've followed the wiki's here:
https://wiki.archlinux.org/index.php/QE … al_network
should I be using this wiki instead:
https://wiki.archlinux.org/index.php/KV … Networking
I'm kinda confused on how to approach this since there are separate wikis for QEMU and KVM.
I have a couple of confusing questions, that I hope someone can answer, or lead me in a direction to help me find a solution.  Free internet beer for helping. 
From a vanilla install of Arch, if I would like to run Windows 7 64-bit in a VM, should I use QEMU or KVM?  I did get the windows 7 up and running, not sure how, but it's not on my internet LAN, the VM can only access the internet.
Can someone help me out step by step or pointing me in a direction that can help get a bridge network set up between my host, which will need a static IP address, and my VM, which I would prefer to have another static IP address on my network.
I've tried using virtualbox but the performance was slower than using QEMU/KVM.
BTW, what's the difference between QEMU and KVM?  I'm confused by that as well.  I would even be willing to write up a "beginners guide" if I can get help getting mine set up.
any help is greatly appreciated.
--nixIT

I do things manually on my system so, for two VM:
ip tuntap add dev tap0 mode tap user djgera
ip tuntap add dev tap1 mode tap user djgera
brctl addbr br0
brctl setfd br0 0.0
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1
ip link set dev br0 up
ip link set dev tap0 up
ip link set dev tap1 up
ip addr del 192.168.0.77/24 dev eth0
ip addr add 192.168.0.77/24 broadcast + dev br0
ip route add default via 192.168.0.1
then each qemu-kvm instance that I lauch add:
-device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:00 -netdev type=tap,id=net0,ifname=tap0,script=no,downscript=no
-device virtio-net-pci,netdev=net1,mac=52:54:00:12:34:01 -netdev type=tap,id=net1,ifname=tap1,script=no,downscript=no

Similar Messages

  • Another KVM Bridged Networking Thread

    Hello everyone,
    I'm having some trouble getting KVM bridged networking to work following the instructions here:
    http://wiki.archlinux.org/index.php/Qem … _with_QEMU
    The VM I set up to test is running CentOS 5.5 and is unable to get an IP address. Here's what I run before attempting to start it:
    Turn off wireless:
    % sudo netcfg -a
    Running 'ip link sh' shows that wlan0 is down after this.
    Allow forwarding and adjust iptables:
    % su -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
    % sudo iptables -P FORWARD ACCEPT
    % cd /proc/sys/net/bridge
    % su -c 'for f in bridge-nf-*; do echo 0 > $f; done'
    Start the bridge:
    % sudo brctl addbr br0
    % sudo brctl addif br0 eth0
    % sudo ip link set up dev eth0
    % sudo dhcpcd br0
    Occasionally br0 times out and I have to run dhcpcd twice, but it comes up eventually. I can ping out to the Internet at this point.
    I believe that when I start my VM at this point tap networking is supposed to work, but obviously I am doing something wrong. I have tried starting it both as root and as my regular user. For reference, here is my run-qemu script:
    #!/bin/sh
    USERID=`whoami`
    IFACE=`sudo tunctl -b -u $USERID`
    MAC=`echo -n "FF:FF"; for n in 1 2 3 4; do echo -n ":" && cat /dev/urandom | tr -dc '0-9A-F' | head -c 2; done`
    qemu-kvm -daemonize -net nic,macaddr="${MAC}" -net tap,ifname="${IFACE}" \
    -k en-us -m 512 -smp 2 $*
    sudo tunctl -d $IFACE &> /dev/null
    ...and my /etc/qemu-ifup script:
    #!/bin/sh
    echo "Executing /etc/qemu-ifup"
    echo "Bringing up $1 for bridged mode..."
    sudo ip link set dev $1 up
    echo "Adding $1 to br0..."
    sudo /usr/sbin/brctl addif br0 $1
    sleep 2
    I originally used 'sudo /sbin/ifconfig $1 0.0.0.0 promisc up' in place of 'ip link set ...' but without any different results. I have also tried a completely empty iptables ruleset, with all chains set to ALLOW, just in case; no dice.
    Does anyone have any ideas? Thanks for any help you can provide, I appreciate your time.

    try setting a static ip first for both br0 and the qemu tap interface, and see if the host and VM are able to communicate properly, if they cant, dont add the tap interface to br0, assign the tap interface an ip, and see if you are able to communicate with the VM.

  • Qemu-kvm guest virtio networking halts

    Hi,
    I recently switched from Debian to Archlinux, but seems to have stumbled on a bug that has made the transition a bit painfull since i rely on virtualization.
    Overview:
    qemu-kvm guests network interface dies after "some"  traffic over nfs via virtio interface.
    Using e1000 instead of virtio network seems to solve the problem som far... but at a cost of performance.
    Any suggestions on how to resolve the issue or how to work around the problem without sacrificing performance?
    How to reproduce:
    Configure the guest to use virtio as network driver and attach the interface to a bridge that the hosts has a configured interface on.
    Export a share with a large amount of data over nfs from the host and read that data over nfs from the guest.
    ( what is funny/strange is that i could not get nuttcp to force the problem... )
    Detail:
    My guest are connected via tap interfaces to a bridge on my host and they are using virtio.
    After retreiving "some" network traffic from the host over nfs the guests interface stops receiving traffic and logs "page allocation failure. order:0, mode:0x20" ( Log included below )
    - tshark on guest verifies guest sending arp requests but not receiving arp reply
    - tshark on host show that the host is both receiving arp request and sending arp reply
    Guests are running with the following parameters:
    %sudo /usr/bin/qemu-system-x86_64 -M pc-0.11 -enable-kvm -m 512 -smp 1 -name myguest -boot c -drive file=/mnt/myguest.img,if=virtio,index=0,boot=on -net nic,vlan=0,model=virtio,name=virtio.0 -net tap,vlan=0,name=tap.0,ifname=tap0 -serial pty -parallel none -usb -vnc 0.0.0.0:10 -k sv -vga std
    host is currently running:
    qemu-kvm 0.11.0-1
    testing/kernel26 2.6.32-1
    testing/kernel26-firmware 2.6.32-1
    guest is currently running
    testing/kernel26 2.6.32-1
    testing/kernel26-firmware 2.6.32-1
    kernel from testing on both host/guest was a attempt to work around a potential issue in 2.6.30 but the fault is present with both kernels.
    I don't belive that the problem lies on the archlinux guest since a Debian(Lenny) guest experiances the same problem.
    The same guest on the same hardare running on Debian(Lenny) as a host works fine.
    from /var/log/messages
    2009-12-14T00:10:58.160723+01:00 myguest kernel: tar: page allocation failure. order:0, mode:0x20
    2009-12-14T00:10:58.160809+01:00 myguest kernel: Pid: 31303, comm: tar Not tainted 2.6.32-ARCH #7
    2009-12-14T00:10:58.160821+01:00 myguest kernel: Call Trace:
    2009-12-14T00:10:58.160859+01:00 myguest kernel: <IRQ> [<ffffffff810d5778>] ? __alloc_pages_nodemask+0x6b8/0x700
    2009-12-14T00:10:58.160864+01:00 myguest kernel: [<ffffffffa019cb4b>] ? try_fill_recv+0x8b/0x1c0 [virtio_net]
    2009-12-14T00:10:58.160869+01:00 myguest kernel: [<ffffffffa019d57d>] ? virtnet_poll+0x3ad/0x6e0 [virtio_net]
    2009-12-14T00:10:58.160872+01:00 myguest kernel: [<ffffffff8129146a>] ? net_rx_action+0x15a/0x2a0
    2009-12-14T00:10:58.160876+01:00 myguest kernel: [<ffffffffa019c2b5>] ? skb_recv_done+0x25/0x40 [virtio_net]
    2009-12-14T00:10:58.160884+01:00 myguest kernel: [<ffffffff8105d177>] ? __do_softirq+0xd7/0x240
    2009-12-14T00:10:58.160887+01:00 myguest kernel: [<ffffffff810131dc>] ? call_softirq+0x1c/0x30
    2009-12-14T00:10:58.160891+01:00 myguest kernel: <EOI> [<ffffffff81015315>] ? do_softirq+0x65/0xa0
    2009-12-14T00:10:58.160894+01:00 myguest kernel: [<ffffffff8105d07e>] ? local_bh_enable+0xae/0xb0
    2009-12-14T00:10:58.160901+01:00 myguest kernel: [<ffffffff81291f44>] ? dev_queue_xmit+0x144/0x4e0
    2009-12-14T00:10:58.160905+01:00 myguest kernel: [<ffffffff812c1b36>] ? ip_queue_xmit+0x196/0x440
    2009-12-14T00:10:58.160908+01:00 myguest kernel: [<ffffffff812a82de>] ? sch_direct_xmit+0x6e/0x1e0
    2009-12-14T00:10:58.160912+01:00 myguest kernel: [<ffffffff812d61c8>] ? tcp_transmit_skb+0x3a8/0x750
    2009-12-14T00:10:58.160915+01:00 myguest kernel: [<ffffffff812d875c>] ? tcp_write_xmit+0x1ec/0xa10
    2009-12-14T00:10:58.160923+01:00 myguest kernel: [<ffffffff812890bf>] ? __alloc_skb+0x6f/0x180
    2009-12-14T00:10:58.160926+01:00 myguest kernel: [<ffffffff812d8fe3>] ? __tcp_push_pending_frames+0x23/0x90
    2009-12-14T00:10:58.160930+01:00 myguest kernel: [<ffffffff812cb9e9>] ? tcp_sendmsg+0x8b9/0xbb0
    2009-12-14T00:10:58.160933+01:00 myguest kernel: [<ffffffff8127f95e>] ? sock_sendmsg+0x12e/0x150
    2009-12-14T00:10:58.160940+01:00 myguest kernel: [<ffffffff81074040>] ? autoremove_wake_function+0x0/0x30
    2009-12-14T00:10:58.160944+01:00 myguest kernel: [<ffffffff8127fd79>] ? kernel_sendmsg+0x39/0x50
    2009-12-14T00:10:58.160947+01:00 myguest kernel: [<ffffffffa0291292>] ? xs_send_kvec+0x82/0x90 [sunrpc]
    2009-12-14T00:10:58.160951+01:00 myguest kernel: [<ffffffffa02912f4>] ? xs_sendpages+0x54/0x200 [sunrpc]
    2009-12-14T00:10:58.160955+01:00 myguest kernel: [<ffffffffa02915d8>] ? xs_tcp_send_request+0x58/0x190 [sunrpc]
    2009-12-14T00:10:58.160962+01:00 myguest kernel: [<ffffffffa028ee3c>] ? xprt_transmit+0x7c/0x300 [sunrpc]
    2009-12-14T00:10:58.160966+01:00 myguest kernel: [<ffffffffa028bf3f>] ? call_transmit+0x18f/0x2b0 [sunrpc]
    2009-12-14T00:10:58.160969+01:00 myguest kernel: [<ffffffffa029437a>] ? __rpc_execute+0xaa/0x2b0 [sunrpc]
    2009-12-14T00:10:58.160973+01:00 myguest kernel: [<ffffffffa028cae1>] ? rpc_run_task+0x31/0x80 [sunrpc]
    2009-12-14T00:10:58.160980+01:00 myguest kernel: [<ffffffffa0323d1e>] ? nfs_read_rpcsetup+0x17e/0x1e0 [nfs]
    2009-12-14T00:10:58.160984+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.160988+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.160991+01:00 myguest kernel: [<ffffffffa032158a>] ? nfs_pageio_doio+0x2a/0x70 [nfs]
    2009-12-14T00:10:58.160995+01:00 myguest kernel: [<ffffffffa032161b>] ? nfs_pageio_add_request+0x4b/0xf0 [nfs]
    2009-12-14T00:10:58.161003+01:00 myguest kernel: [<ffffffffa03239aa>] ? readpage_async_filler+0xfa/0x190 [nfs]
    2009-12-14T00:10:58.161007+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.161010+01:00 myguest kernel: [<ffffffff810d7dc1>] ? read_cache_pages+0xa1/0x100
    2009-12-14T00:10:58.161014+01:00 myguest kernel: [<ffffffffa03234bd>] ? nfs_readpages+0x19d/0x2b0 [nfs]
    2009-12-14T00:10:58.161021+01:00 myguest kernel: [<ffffffffa0324230>] ? nfs_pagein_one+0x0/0xe0 [nfs]
    2009-12-14T00:10:58.161024+01:00 myguest kernel: [<ffffffff810d7709>] ? __do_page_cache_readahead+0x1c9/0x280
    2009-12-14T00:10:58.161028+01:00 myguest kernel: [<ffffffff810d77dc>] ? ra_submit+0x1c/0x30
    2009-12-14T00:10:58.161031+01:00 myguest kernel: [<ffffffff810d0629>] ? generic_file_aio_read+0x339/0x600
    2009-12-14T00:10:58.161035+01:00 myguest kernel: [<ffffffff8110edb2>] ? do_sync_read+0xe2/0x120
    2009-12-14T00:10:58.161042+01:00 myguest kernel: [<ffffffff81074040>] ? autoremove_wake_function+0x0/0x30
    2009-12-14T00:10:58.161045+01:00 myguest kernel: [<ffffffff81331212>] ? preempt_schedule_irq+0x42/0x70
    2009-12-14T00:10:58.161049+01:00 myguest kernel: [<ffffffff8104ad02>] ? finish_task_switch+0x42/0xc0
    2009-12-14T00:10:58.161052+01:00 myguest kernel: [<ffffffff8110fb65>] ? vfs_read+0xb5/0x1a0
    2009-12-14T00:10:58.161059+01:00 myguest kernel: [<ffffffff8110fd3e>] ? sys_read+0x4e/0x90
    2009-12-14T00:10:58.161063+01:00 myguest kernel: [<ffffffff81012e8b>] ? device_not_available+0x1b/0x20
    2009-12-14T00:10:58.161066+01:00 myguest kernel: [<ffffffff81012042>] ? system_call_fastpath+0x16/0x1b
    2009-12-14T00:10:58.161068+01:00 myguest kernel: Mem-Info:
    2009-12-14T00:10:58.161071+01:00 myguest kernel: DMA per-cpu:
    2009-12-14T00:10:58.161077+01:00 myguest kernel: CPU 0: hi: 0, btch: 1 usd: 0
    2009-12-14T00:10:58.161080+01:00 myguest kernel: DMA32 per-cpu:
    2009-12-14T00:10:58.161083+01:00 myguest kernel: CPU 0: hi: 186, btch: 31 usd: 137
    2009-12-14T00:10:58.161086+01:00 myguest kernel: active_anon:887 inactive_anon:896 isolated_anon:0
    2009-12-14T00:10:58.161089+01:00 myguest kernel: active_file:4740 inactive_file:112288 isolated_file:0
    2009-12-14T00:10:58.161092+01:00 myguest kernel: unevictable:0 dirty:8 writeback:0 unstable:0
    2009-12-14T00:10:58.161099+01:00 myguest kernel: free:728 slab_reclaimable:1589 slab_unreclaimable:1798
    2009-12-14T00:10:58.161102+01:00 myguest kernel: mapped:1605 shmem:17 pagetables:332 bounce:0
    2009-12-14T00:10:58.161111+01:00 myguest kernel: DMA free:1988kB min:84kB low:104kB high:124kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:13860kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15352kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:16kB slab_unreclaimable:56kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    2009-12-14T00:10:58.161119+01:00 myguest kernel: lowmem_reserve[]: 0 489 489 489
    2009-12-14T00:10:58.161162+01:00 myguest kernel: DMA32 free:924kB min:2784kB low:3480kB high:4176kB active_anon:3548kB inactive_anon:3584kB active_file:18960kB inactive_file:435292kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:500896kB mlocked:0kB dirty:32kB writeback:0kB mapped:6420kB shmem:68kB slab_reclaimable:6340kB slab_unreclaimable:7136kB kernel_stack:1104kB pagetables:1328kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    2009-12-14T00:10:58.161167+01:00 myguest kernel: lowmem_reserve[]: 0 0 0 0
    2009-12-14T00:10:58.161171+01:00 myguest kernel: DMA: 1*4kB 0*8kB 0*16kB 2*32kB 2*64kB 2*128kB 2*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 1988kB
    2009-12-14T00:10:58.161179+01:00 myguest kernel: DMA32: 93*4kB 1*8kB 2*16kB 0*32kB 2*64kB 3*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 924kB
    2009-12-14T00:10:58.161182+01:00 myguest kernel: 117053 total pagecache pages
    2009-12-14T00:10:58.161184+01:00 myguest kernel: 0 pages in swap cache
    2009-12-14T00:10:58.161187+01:00 myguest kernel: Swap cache stats: add 0, delete 0, find 0/0
    2009-12-14T00:10:58.161194+01:00 myguest kernel: Free swap = 0kB
    2009-12-14T00:10:58.161196+01:00 myguest kernel: Total swap = 0kB
    2009-12-14T00:10:58.161199+01:00 myguest kernel: 131056 pages RAM
    2009-12-14T00:10:58.161201+01:00 myguest kernel: 4443 pages reserved
    2009-12-14T00:10:58.161204+01:00 myguest kernel: 8899 pages shared
    2009-12-14T00:10:58.161210+01:00 myguest kernel: 120326 pages non-shared
    Last edited by nlights (2009-12-17 22:10:20)

    Mr.Elendig wrote:Bridging is the best way todo it, so you should give us some more info on your atempt at it, so that we can help you fix it.
    Ok, I've followed the instructions from the wiki.
    One problem is that I'm on a laptop. eth0 is wireless and eth1 is wired. I chose to use eth1 since I thought it'd be easier to get working on one device before trying to make it work on both.
    1. bridge and tun modules are loaded from rc.conf
    2. In /etc/conf.d/bridges I have this:
    bridge_br0="eth1"
    BRIDGE_INTERFACES=(br0)
    3. In /etc/rc.conf I changed my networking portion to this:
    eth1="eth1 up"
    br0="dhcp"
    INTERFACES=(eth1 br0)
    4. In /etc/udev/rules.d/65-kvm.rules I have this:
    KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660"
    5. My user is part of the kvm group, although I have also tried running qemu-kvm as root.
    6. In /etc/qemu-ifup I put:
    #!/bin/sh
    echo "Executing /etc/qemu-ifup"
    echo "Bringing up $1 for bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc up
    echo "Adding $1 to br0..."
    sudo /usr/sbin/brctl addif br0 $1
    sleep 2
    7. Using visudo I added this to the bottom:
    Cmnd_Alias QEMU=/sbin/ifconfig,/sbin/modprobe,/usr/sbin/brctl,/usr/bin/tunctl
    %kvm ALL=NOPASSWD: QEMU
    8. I launch qemu-kvm with the following script:
    USERID=`whoami`
    IFACE=`sudo tunctl -b -u $USERID`
    qemu-kvm -net nic -net tap,ifname="$IFACE" -vga std -m 1024 -k en-us -usbdevice tablet -localtime /dev/sda
    sudo tunctl -d $IFACE &> /dev/null
    My system starts with br0 getting the dhcp IP on boot, so that part is working.
    When I run the qemu-kvm start script I get this error (running as user or root):
    /etc/qemu-ifup: could not launch network script
    Could not initialize device 'tap'
    /etc/qemu-ifup is executable
    Last edited by shakin (2009-06-05 19:13:14)

  • Problems in starting windows using qemu-kvm from arch

    Hello,
    I am facing problems in launching windows XP & 7 using qemu-kvm / qemu from arch. I have arch 2010.05 installed (kernel 2.6.33.4) which has kvm.ko, intel & amd modules. System is Intel Core 2 Duo 3.0GHz. Windows XP is installed on partition 0 (real) and i am trying to start windows from that real partition using qemu-kvm.
    I installed qemu-kvm using pacman -S qemu-kvm. I am running modprobe kvm and modprobe kvm-intel. Also, i have added username to kvm group.
    Command -
    qemu-kvm /dev/sda - I have grub menu.lst which gives me list and i am selecting windows to boot but windows does not start. I can see startup but then fails.
    qemu-kvm /dev/sda1 - sda1 has windows. With this qemu-kvm just hangs at Booting from Hard-disk...
    qemu-kvm -no-kvm /dev/sda - Selecting windows but this time get Windows XP activation error however i can boot same windows XP directly without any error.
    For Windows 7 - I have another HDD with Windows 7 installed on partition 0 and Arch. Everytime when i try to start Windows 7 using qemu-kvm (with kvm or without kvm) it gives blue screen with STOP: 0x... If i start Windows 7 directly it works fine.
    Also, i downloaded kernel 2.6.35 and built with KVM but still facing same problems. I also tried with qemu.
    Can anyone help me in resolving this issue? I want to qemu-kvm Windows from real partition. Let me know if it is not possible.
    Am i missing any installation/configuration steps?
    I searched on google and on arch forum/wiki but was not able to resolve this issue. Let me know if you need more details.
    Thank you,
    Satish.
    Last edited by satishk (2010-10-18 15:21:06)

    satishk wrote:Hi,
    Do i need to create two hardware profiles in Windows or Linux?
    the hardware profiles are only needed for windows , linux guest doesn't need it (unless you have compiled your own kernel without more then 1 HDD controller..  specifically for the guest)
    satishk wrote:1. Can i run qemu-kvm from linux kernel with only command support. No desktop environment installed (X11)? If yes, what is the procedure?
    qemu-KVM uses SDL, NOT X11 .
    added : SDL can be installed seperately, it doesn't require X11 .
    you can run qemu-kvm without SDL by using a special startup parameter, -nodisplay
    you have to connect with a serial connection to get to the console of the VM.
    satishk wrote:2. If i restart/shutdown from quest OS that is windows in my case, is it possible to restart/shutdown the complete system (i.e. host OS
    too)?
    you can do that by using a bash script to start the VM, that script can also be used to stop the host.
    satishk wrote:3. Whether Windows would be able to detect USB drivers and other devices by default or i need to do anything special in qemu-kvm?
    USB devices are normally detected, although you have to test how well they work.
    You may have to use udev rules to prevent the host from using those devices, they can't be used by both host and guest at the same time.
    Network cards will not be detected, but you can link a physical network device with qemu-kvm virtual network devices.
    search for qemu documentation, it also applies to qemu-kvm.
    Last edited by Lone_Wolf (2010-10-22 18:35:13)

  • Qemu-kvm: network access from host to guest

    I need ssh and http access from my host (Arch) to the guest (other Linux). I've failed at setting up Tap networking as described in the wiki. I don't need to have the whole LAN access the guest, so is there another way the host can access the guest? Using the guest's IP of 10.0.2.15 doesn't work, but I'm hoping there is a way to do it.
    Thanks.

    Mr.Elendig wrote:Bridging is the best way todo it, so you should give us some more info on your atempt at it, so that we can help you fix it.
    Ok, I've followed the instructions from the wiki.
    One problem is that I'm on a laptop. eth0 is wireless and eth1 is wired. I chose to use eth1 since I thought it'd be easier to get working on one device before trying to make it work on both.
    1. bridge and tun modules are loaded from rc.conf
    2. In /etc/conf.d/bridges I have this:
    bridge_br0="eth1"
    BRIDGE_INTERFACES=(br0)
    3. In /etc/rc.conf I changed my networking portion to this:
    eth1="eth1 up"
    br0="dhcp"
    INTERFACES=(eth1 br0)
    4. In /etc/udev/rules.d/65-kvm.rules I have this:
    KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660"
    5. My user is part of the kvm group, although I have also tried running qemu-kvm as root.
    6. In /etc/qemu-ifup I put:
    #!/bin/sh
    echo "Executing /etc/qemu-ifup"
    echo "Bringing up $1 for bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc up
    echo "Adding $1 to br0..."
    sudo /usr/sbin/brctl addif br0 $1
    sleep 2
    7. Using visudo I added this to the bottom:
    Cmnd_Alias QEMU=/sbin/ifconfig,/sbin/modprobe,/usr/sbin/brctl,/usr/bin/tunctl
    %kvm ALL=NOPASSWD: QEMU
    8. I launch qemu-kvm with the following script:
    USERID=`whoami`
    IFACE=`sudo tunctl -b -u $USERID`
    qemu-kvm -net nic -net tap,ifname="$IFACE" -vga std -m 1024 -k en-us -usbdevice tablet -localtime /dev/sda
    sudo tunctl -d $IFACE &> /dev/null
    My system starts with br0 getting the dhcp IP on boot, so that part is working.
    When I run the qemu-kvm start script I get this error (running as user or root):
    /etc/qemu-ifup: could not launch network script
    Could not initialize device 'tap'
    /etc/qemu-ifup is executable
    Last edited by shakin (2009-06-05 19:13:14)

  • [SOLVED] KVM and Bridged Networking

    I've got KVM working and a Windows 2008 server installed on a image now, but it's only getting a NAT ip address. I need to get this server onto my main network, on Windows I'd use Virtual Box and Bridged Networking, but I thought I'd give KVM a try out.
    I've followed the setup at https://wiki.archlinux.org/index.php/KV … Networking
    Using Netcfg
    Bridged networking is used when you want your VM to be on the same network as your host machine. This will allow it to get a static or DHCP IP address on your network, and then you can access it using that IP address from anywhere on your LAN. The preferred method for setting up bridged networking for KVM is to use the netcfg package. You will also need to install bridge-utils.
    Netcfg#Configuring_a_bridge_for_use_with_virtual_machines_.28VMs.29
    And this page https://wiki.archlinux.org/index.php/Ne … _.28VMs.29
    I've got a bridge working I believe (all my stuff is DHCP by the way)
    Output of ifconfig
    br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
    inet 192.168.1.52 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::21d:7dff:fea9:bb2f prefixlen 64 scopeid 0x20<link>
    ether 00:1d:7d:a9:bb:2f txqueuelen 0 (Ethernet)
    RX packets 2966 bytes 520670 (508.4 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 2351 bytes 1874150 (1.7 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500 metric 1
    ether 00:1d:7d:a9:bb:2f txqueuelen 1000 (Ethernet)
    RX packets 2977 bytes 570261 (556.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 2364 bytes 1875202 (1.7 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 45 base 0xc000
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 0 (Local Loopback)
    RX packets 72 bytes 7056 (6.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 72 bytes 7056 (6.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    I've got "bridge" added to my rc.conf as a MODULE which is loaded. (I saw reference to this somewhere else on the forum that this might be needed)
    I'm starting my VM with the following command
    qemu-kvm -vnc 192.168.1.52:0 -hda Nekomi -m 2048 -smp 2 -net nic
    Yet I still can't get an IP outside of the 10.0.0.0 range on the VM.
    The VNC line above is because the HOST has not VGA output at all, completely headless.
    I'm trying to get this working and trying to learn at the same time. KVM is new to me, as is bridged networking on linux.
    Any ideas? Thanks
    Last edited by Naijeru (2012-09-18 16:28:20)

    Sorry for the delay, bit a PC rebuild occurred :-(
    Anyway, I managed to get this working with steps #1-#7 from the linked section. Thanks for that. I did have a few minor issues in getting a DHCP on the host machine itself, turns out I'd missed a single ) from the daemons section of rc.conf. A human error, but difficult to fix as the machine was rendered off the network and without a VGA card... fun!
    I diverge, I have this script to bring up a bridge when the qemu-kvm starts
    #!/bin/sh
    echo "Executing /etc/qemu-ifup"
    echo "Bringing up $1 for bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc up
    echo "Adding $1 to br0..."
    sudo /usr/sbin/brctl addif br0 $1
    sleep 2
    But when the kvm shutdowns it complains it can't find qemu-ifdown script. So I'm thinking of making one but just want to check it over first.
    #!/bin/sh
    echo "Executing /etc/qemu-ifdown"
    echo "Removing $1 from br0..."
    sudo /usr/sbin/brctl delif br0 $1
    echo "Taking down $1 from bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc down
    sleep 2
    I've reversed the logic here, is the above the correct way to bring down the guest interface?

  • Qemu - Bridged networking with wireless adapter

    How can I use bridged networking with wireless on Qemu virtual machine? With virtualbox it can be easily done. I don't why in Qemu it is so complicated, maybe virtualbox have completely difference mechacnism on this. I've read the wiki, it looks like impossible to use wireless for bridged networking. If it is really impossible, why virtualbox can do it?
    And, in arch wiki's qemu manual, i didn't see how to use NetworkManager there to do bridged networking. Since, I use NetworkManager and disable the others (like netct and dhcpcd), it make it even more complicated. But, maybe it's because me that don't understand. Maybe someone experienced here can give me a way around this?

    bagol wrote:How can I use bridged networking
    It's up to you to set up the bridged network - or use TAP, e.g.:
    ip tuntap add dev <devname> mode tap user <youruser>
    ip lin set <devname> up
    ip route ...
    ... and proxy_arp
    ... and iptables forwarding & masquerade
    It's a good learning experience, to set up the network yourself, rather than have VirtualBox do similar things by *magic*

  • QEMU host-only networking using tap devices

    I'm trying to setup host-only networking on my QEMU VM running Arch (actually, the Archiso; there is no Arch installation present yet). A short summary:
    What I want
    connect to the host from the guest system
    connect to the guest from the host system
    using a tap device (to avoid user-mode networking) on a network bridge (to connect guest and host)
    Eventually, I want to run an AMP stack on the VM for web development. (Let's, for now, ignore the fact that I might need an internet connection later on to install packages)
    What I tried
    I first set up a tap device:
    ip tuntap add dev tap0 mode tap
    and then a network bridge:
    BRIDGE='qemubr0'
    brctl addbr ${BRIDGE}
    brctl addif ${BRIDGE} tap0
    ip link set up dev ${BRIDGE}
    The relevant parameters I run QEMU with are:
    qemu-system-x86_64 \
    -net nic \
    -net tap,ifname=tap0,script=no
    QEMU starts without any errors, but trying to ping the host from within the VM results in:
    -- VM:
    # ping 10.0.2.2
    connect: Network is unreachable
    (FYI: 10.0.2.2 is supposed to be the default IP address of the host system (?) according to http://wiki.qemu.org/Documentation/Networking )
    Relevant logs/outputs
    dmesg on the host machine:
    [ 0.339337] NET: Registered protocol family 2
    [ 0.339670] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
    [ 0.339851] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
    [ 0.340102] TCP: Hash tables configured (established 32768 bind 32768)
    [ 0.340171] TCP: reno registered
    [ 0.340182] UDP hash table entries: 2048 (order: 4, 65536 bytes)
    [ 0.340226] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
    [ 0.340327] NET: Registered protocol family 1
    [ 0.340353] pci 0000:00:02.0: Video device with shadowed ROM
    [ 0.341863] PCI: CLS 64 bytes, default 64
    [ 0.341937] Unpacking initramfs...
    [ 0.503984] Freeing initrd memory: 4908K (ffff88003765a000 - ffff880037b25000)
    [ 0.504055] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
    [ 0.504060] software IO TLB [mem 0xb94a1000-0xbd4a1000] (64MB) mapped at [ffff8800b94a1000-ffff8800bd4a0fff]
    [ 0.504112] Simple Boot Flag at 0x35 set to 0x1
    [ 0.504352] microcode: CPU0 sig=0x1067a, pf=0x80, revision=0xa0c
    [ 0.504364] microcode: CPU1 sig=0x1067a, pf=0x80, revision=0xa0c
    [ 0.504475] microcode: Microcode Update Driver: v2.00 <[email protected]>, Peter Oruba
    [ 0.504524] Scanning for low memory corruption every 60 seconds
    [ 0.505041] futex hash table entries: 1024 (order: 4, 65536 bytes)
    [ 0.505090] Initialise system trusted keyring
    [ 0.505685] HugeTLB registered 2 MB page size, pre-allocated 0 pages
    [ 0.508836] zpool: loaded
    [ 0.508841] zbud: loaded
    [ 0.509100] VFS: Disk quotas dquot_6.5.2
    [ 0.509170] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [ 0.509392] msgmni has been set to 7699
    [ 0.509494] Key type big_key registered
    [ 0.509767] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [ 0.509826] io scheduler noop registered
    [ 0.509830] io scheduler deadline registered
    [ 0.509893] io scheduler cfq registered (default)
    [ 0.510198] pcieport 0000:00:1c.0: irq 24 for MSI/MSI-X
    [ 0.510482] pcieport 0000:00:1c.1: irq 25 for MSI/MSI-X
    [ 0.510705] pcieport 0000:00:1c.0: Signaling PME through PCIe PME interrupt
    [ 0.510713] pcie_pme 0000:00:1c.0:pcie01: service driver pcie_pme loaded
    [ 0.510744] pcieport 0000:00:1c.1: Signaling PME through PCIe PME interrupt
    [ 0.510748] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
    [ 0.510754] pcie_pme 0000:00:1c.1:pcie01: service driver pcie_pme loaded
    [ 0.510785] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
    [ 0.510847] pciehp 0000:00:1c.0:pcie04: Slot #0 AttnBtn- AttnInd- PwrInd- PwrCtrl- MRL- Interlock- NoCompl- LLActRep+
    [ 1.506690] tsc: Refined TSC clocksource calibration: 1396.499 MHz
    [ 1.843356] pciehp 0000:00:1c.0:pcie04: Timeout on hotplug command 0x00000000 (issued 1333 msec ago)
    [ 1.843368] pciehp 0000:00:1c.0:pcie04: service driver pciehp loaded
    [ 1.843390] pciehp 0000:00:1c.1:pcie04: Slot #1 AttnBtn- AttnInd- PwrInd- PwrCtrl- MRL- Interlock- NoCompl- LLActRep+
    [ 2.506739] Switched to clocksource tsc
    [ 3.176680] pciehp 0000:00:1c.1:pcie04: Timeout on hotplug command 0x00000000 (issued 1333 msec ago)
    [ 3.176691] pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
    [ 3.176703] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
    [ 3.176768] vesafb: mode is 1440x900x32, linelength=5760, pages=0
    [ 3.176770] vesafb: scrolling: redraw
    [ 3.176774] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
    [ 3.176807] vesafb: framebuffer at 0xd0000000, mapped to 0xffffc90004780000, using 5120k, total 5120k
    [ 3.235921] Console: switching to colour frame buffer device 180x56
    [ 3.294769] fb0: VESA VGA frame buffer device
    [ 3.294803] intel_idle: does not run on family 6 model 23
    [ 3.294882] GHES: HEST is not enabled!
    [ 3.294990] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [ 3.316009] 0000:00:03.3: ttyS0 at I/O 0x1830 (irq = 17, base_baud = 115200) is a 16550A
    [ 3.316238] Linux agpgart interface v0.103
    [ 3.316307] rtc_cmos 00:02: RTC can wake from S4
    [ 3.316496] rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
    [ 3.316535] rtc_cmos 00:02: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
    [ 3.316560] ledtrig-cpu: registered to indicate activity on CPUs
    [ 3.316751] TCP: cubic registered
    [ 3.316954] NET: Registered protocol family 10
    [ 3.317338] NET: Registered protocol family 17
    [ 3.317735] Loading compiled-in X.509 certificates
    [ 3.317757] registered taskstats version 1
    [ 3.318307] Magic number: 15:252:84
    [ 3.318413] rtc_cmos 00:02: setting system clock to 2015-01-01 16:05:44 UTC (1420128344)
    [ 3.318617] PM: Hibernation image not present or could not be loaded.
    [ 3.320772] Freeing unused kernel memory: 1136K (ffffffff818e2000 - ffffffff819fe000)
    [ 3.320775] Write protecting the kernel read-only data: 8192k
    [ 3.324495] Freeing unused kernel memory: 748K (ffff880001545000 - ffff880001600000)
    [ 3.326086] Freeing unused kernel memory: 336K (ffff8800017ac000 - ffff880001800000)
    [ 3.336977] random: systemd-tmpfile urandom read with 4 bits of entropy available
    [ 3.363462] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
    [ 3.372761] serio: i8042 KBD port at 0x60,0x64 irq 1
    [ 3.372934] serio: i8042 AUX port at 0x60,0x64 irq 12
    [ 3.379297] ACPI: bus type USB registered
    [ 3.379343] usbcore: registered new interface driver usbfs
    [ 3.379364] usbcore: registered new interface driver hub
    [ 3.380595] usbcore: registered new device driver usb
    [ 3.381344] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 3.381800] uhci_hcd: USB Universal Host Controller Interface driver
    [ 3.381991] uhci_hcd 0000:00:1a.0: UHCI Host Controller
    [ 3.382003] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 1
    [ 3.382015] uhci_hcd 0000:00:1a.0: detected 2 ports
    [ 3.382060] uhci_hcd 0000:00:1a.0: irq 20, io base 0x00001840
    [ 3.382412] hub 1-0:1.0: USB hub found
    [ 3.382427] hub 1-0:1.0: 2 ports detected
    [ 3.383010] uhci_hcd 0000:00:1a.1: UHCI Host Controller
    [ 3.383021] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 2
    [ 3.383032] uhci_hcd 0000:00:1a.1: detected 2 ports
    [ 3.383073] uhci_hcd 0000:00:1a.1: irq 21, io base 0x00001860
    [ 3.383523] hub 2-0:1.0: USB hub found
    [ 3.383649] hub 2-0:1.0: 2 ports detected
    [ 3.384187] uhci_hcd 0000:00:1a.2: UHCI Host Controller
    [ 3.384197] uhci_hcd 0000:00:1a.2: new USB bus registered, assigned bus number 3
    [ 3.384207] uhci_hcd 0000:00:1a.2: detected 2 ports
    [ 3.384245] uhci_hcd 0000:00:1a.2: irq 22, io base 0x00001880
    [ 3.384679] hub 3-0:1.0: USB hub found
    [ 3.384693] hub 3-0:1.0: 2 ports detected
    [ 3.385046] uhci_hcd 0000:00:1d.0: UHCI Host Controller
    [ 3.385056] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 4
    [ 3.385067] uhci_hcd 0000:00:1d.0: detected 2 ports
    [ 3.385104] uhci_hcd 0000:00:1d.0: irq 16, io base 0x000018a0
    [ 3.385391] hub 4-0:1.0: USB hub found
    [ 3.385405] hub 4-0:1.0: 2 ports detected
    [ 3.386100] ehci-pci: EHCI PCI platform driver
    [ 3.386149] uhci_hcd 0000:00:1d.1: UHCI Host Controller
    [ 3.386159] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 5
    [ 3.386169] uhci_hcd 0000:00:1d.1: detected 2 ports
    [ 3.386210] uhci_hcd 0000:00:1d.1: irq 17, io base 0x000018c0
    [ 3.386499] hub 5-0:1.0: USB hub found
    [ 3.386512] hub 5-0:1.0: 2 ports detected
    [ 3.387422] ehci-pci 0000:00:1a.7: EHCI Host Controller
    [ 3.387433] ehci-pci 0000:00:1a.7: new USB bus registered, assigned bus number 6
    [ 3.387454] ehci-pci 0000:00:1a.7: debug port 1
    [ 3.390536] SCSI subsystem initialized
    [ 3.391377] ehci-pci 0000:00:1a.7: cache line size of 64 is not supported
    [ 3.391407] ehci-pci 0000:00:1a.7: irq 23, io mem 0xf0805c00
    [ 3.393114] libata version 3.00 loaded.
    [ 3.400023] ehci-pci 0000:00:1a.7: USB 2.0 started, EHCI 1.00
    [ 3.400556] hub 6-0:1.0: USB hub found
    [ 3.400572] hub 6-0:1.0: 6 ports detected
    [ 3.420762] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
    [ 3.423437] hub 1-0:1.0: USB hub found
    [ 3.423452] hub 1-0:1.0: 2 ports detected
    [ 3.446764] hub 2-0:1.0: USB hub found
    [ 3.446781] hub 2-0:1.0: 2 ports detected
    [ 3.470096] hub 3-0:1.0: USB hub found
    [ 3.470113] hub 3-0:1.0: 2 ports detected
    [ 3.470446] uhci_hcd 0000:00:1d.2: UHCI Host Controller
    [ 3.470457] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
    [ 3.470467] uhci_hcd 0000:00:1d.2: detected 2 ports
    [ 3.470510] uhci_hcd 0000:00:1d.2: irq 18, io base 0x000018e0
    [ 3.470855] hub 7-0:1.0: USB hub found
    [ 3.470871] hub 7-0:1.0: 2 ports detected
    [ 3.471114] ahci 0000:00:1f.2: version 3.0
    [ 3.471277] ahci 0000:00:1f.2: irq 26 for MSI/MSI-X
    [ 3.471324] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
    [ 3.471354] ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 4 ports 3 Gbps 0x1 impl SATA mode
    [ 3.471359] ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pio slum part ccc
    [ 3.472602] scsi host0: ahci
    [ 3.472778] scsi host1: ahci
    [ 3.472926] scsi host2: ahci
    [ 3.475424] scsi host3: ahci
    [ 3.475545] ata1: SATA max UDMA/133 abar m2048@0xf0805000 port 0xf0805100 irq 26
    [ 3.475549] ata2: DUMMY
    [ 3.475551] ata3: DUMMY
    [ 3.475553] ata4: DUMMY
    [ 3.476505] ehci-pci 0000:00:1d.7: EHCI Host Controller
    [ 3.476517] ehci-pci 0000:00:1d.7: new USB bus registered, assigned bus number 8
    [ 3.476540] ehci-pci 0000:00:1d.7: debug port 1
    [ 3.480454] ehci-pci 0000:00:1d.7: cache line size of 64 is not supported
    [ 3.480479] ehci-pci 0000:00:1d.7: irq 19, io mem 0xf0806000
    [ 3.490041] ehci-pci 0000:00:1d.7: USB 2.0 started, EHCI 1.00
    [ 3.490373] hub 8-0:1.0: USB hub found
    [ 3.490387] hub 8-0:1.0: 6 ports detected
    [ 3.513423] hub 4-0:1.0: USB hub found
    [ 3.513436] hub 4-0:1.0: 2 ports detected
    [ 3.536764] hub 5-0:1.0: USB hub found
    [ 3.536781] hub 5-0:1.0: 2 ports detected
    [ 3.560098] hub 7-0:1.0: USB hub found
    [ 3.560115] hub 7-0:1.0: 2 ports detected
    [ 3.793361] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [ 3.793627] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    [ 3.793633] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    [ 3.793664] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
    [ 3.793670] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    [ 3.793788] ata1.00: ATA-8: TOSHIBA THNS128GG4BAAA-NonFDE, AGLA0203, max UDMA/100
    [ 3.793792] ata1.00: 250069680 sectors, multi 16: LBA48
    [ 3.794031] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
    [ 3.794035] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
    [ 3.794065] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
    [ 3.794070] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
    [ 3.794186] ata1.00: configured for UDMA/100
    [ 3.794336] scsi 0:0:0:0: Direct-Access ATA TOSHIBA THNS128G 0203 PQ: 0 ANSI: 5
    [ 3.826124] sd 0:0:0:0: [sda] 250069680 512-byte logical blocks: (128 GB/119 GiB)
    [ 3.826227] sd 0:0:0:0: [sda] Write Protect is off
    [ 3.826232] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [ 3.826278] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 3.827934] sda: sda1 sda2 sda3
    [ 3.828454] sd 0:0:0:0: [sda] Attached SCSI disk
    [ 3.863366] device-mapper: uevent: version 1.0.3
    [ 3.863509] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: [email protected]
    [ 13.087453] random: nonblocking pool is initialized
    [ 17.023466] NET: Registered protocol family 38
    [ 17.304211] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
    [ 17.773165] thinkpad_ec: thinkpad_ec 0.41 loaded.
    [ 17.776308] tp_smapi 0.41 loading...
    [ 17.776557] tp_smapi successfully loaded (smapi_port=0xb2).
    [ 17.785849] EXT4-fs (dm-0): re-mounted. Opts: data=ordered
    [ 18.128026] Monitor-Mwait will be used to enter C-1 state
    [ 18.128038] Monitor-Mwait will be used to enter C-2 state
    [ 18.128045] Monitor-Mwait will be used to enter C-3 state
    [ 18.128052] tsc: Marking TSC unstable due to TSC halts in idle
    [ 18.128109] ACPI: acpi_idle registered with cpuidle
    [ 18.128216] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
    [ 18.128538] ACPI: Lid Switch [LID]
    [ 18.128632] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input3
    [ 18.128638] ACPI: Sleep Button [SLPB]
    [ 18.128774] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
    [ 18.128779] ACPI: Power Button [PWRF]
    [ 18.133197] Switched to clocksource hpet
    [ 18.157152] agpgart-intel 0000:00:00.0: Intel GM45 Chipset
    [ 18.157193] agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
    [ 18.158391] agpgart-intel 0000:00:00.0: detected 32768K stolen memory
    [ 18.158864] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
    [ 18.161295] thermal LNXTHERM:00: registered as thermal_zone0
    [ 18.161300] ACPI: Thermal Zone [THM0] (49 C)
    [ 18.163180] thermal LNXTHERM:01: registered as thermal_zone1
    [ 18.163184] ACPI: Thermal Zone [THM1] (47 C)
    [ 18.201123] systemd-journald[151]: Received request to flush runtime journal from PID 1
    [ 18.211042] tpm_tis 00:05: 1.2 TPM (device-id 0x1020, rev-id 6)
    [ 18.211049] tpm_tis 00:05: Intel iTPM workaround enabled
    [ 18.214146] Non-volatile memory driver v1.3
    [ 18.215056] ACPI: Battery Slot [BAT0] (battery present)
    [ 18.216407] ACPI: AC Adapter [AC] (on-line)
    [ 18.254681] [drm] Initialized drm 1.1.0 20060810
    [ 18.486984] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
    [ 18.488981] ACPI Warning: SystemIO range 0x0000000000001028-0x000000000000102f conflicts with OpRegion 0x0000000000001000-0x000000000000107f (\_SB_.PCI0.LPC_.PMIO) (20140724/utaddress-258)
    [ 18.488992] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 18.488998] ACPI Warning: SystemIO range 0x00000000000011b0-0x00000000000011bf conflicts with OpRegion 0x0000000000001180-0x00000000000011ff (\_SB_.PCI0.LPC_.LPIO) (20140724/utaddress-258)
    [ 18.489003] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 18.489006] ACPI Warning: SystemIO range 0x0000000000001180-0x00000000000011af conflicts with OpRegion 0x0000000000001180-0x00000000000011ff (\_SB_.PCI0.LPC_.LPIO) (20140724/utaddress-258)
    [ 18.489011] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 18.489014] lpc_ich: Resource conflict(s) found affecting gpio_ich
    [ 18.489532] wmi: Mapper loaded
    [ 18.496450] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt
    [ 18.528954] thinkpad_acpi: ThinkPad ACPI Extras v0.25
    [ 18.528960] thinkpad_acpi: http://ibm-acpi.sf.net/
    [ 18.528962] thinkpad_acpi: ThinkPad BIOS 6EET55WW (3.15 ), EC 6EHT11WW-1.05
    [ 18.528965] thinkpad_acpi: Lenovo ThinkPad X301, model 27763JG
    [ 18.562827] mei_me 0000:00:03.0: irq 27 for MSI/MSI-X
    [ 18.576844] thinkpad_acpi: detected a 16-level brightness capable ThinkPad
    [ 18.578163] thinkpad_acpi: radio switch found; radios are enabled
    [ 18.578329] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
    [ 18.578333] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
    [ 18.589581] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
    [ 18.589742] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
    [ 18.593495] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input5
    [ 18.602509] input: PC Speaker as /devices/platform/pcspkr/input/input6
    [ 18.608125] cfg80211: Calling CRDA to update world regulatory domain
    [ 18.608227] [drm] Memory usable by graphics device = 2048M
    [ 18.608232] checking generic (d0000000 500000) vs hw (d0000000 10000000)
    [ 18.608235] fb: switching to inteldrmfb from VESA VGA
    [ 18.608267] Console: switching to colour dummy device 80x25
    [ 18.608458] [drm] Replacing VGA console driver
    [ 18.627881] Intel(R) Wireless WiFi driver for Linux, in-tree:
    [ 18.627886] Copyright(c) 2003- 2014 Intel Corporation
    [ 18.628049] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
    [ 18.628121] iwlwifi 0000:03:00.0: irq 28 for MSI/MSI-X
    [ 18.633437] i915 0000:00:02.0: irq 29 for MSI/MSI-X
    [ 18.633498] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 18.633501] [drm] Driver supports precise vblank timestamp query.
    [ 18.633597] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
    [ 18.643232] iwlwifi 0000:03:00.0: loaded firmware version 8.83.5.1 build 33692 op_mode iwldvm
    [ 18.691553] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
    [ 18.691558] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
    [ 18.691561] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
    [ 18.691565] iwlwifi 0000:03:00.0: Detected Intel(R) Ultimate N WiFi Link 5300 AGN, REV=0x24
    [ 18.691646] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled
    [ 18.728972] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: data=ordered
    [ 18.767043] iTCO_vendor_support: vendor-support=0
    [ 18.775548] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
    [ 18.775618] iTCO_wdt: Found a ICH9M-E TCO device (Version=2, TCOBASE=0x1060)
    [ 18.781996] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
    [ 18.792476] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
    [ 18.822944] iwlwifi 0000:03:00.0 wls1: renamed from wlan0
    [ 18.836659] fbcon: inteldrmfb (fb0) is primary device
    [ 19.343552] Console: switching to colour frame buffer device 180x56
    [ 19.352308] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
    [ 19.352310] i915 0000:00:02.0: registered panic notifier
    [ 19.375020] ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
    [ 19.397558] acpi device:01: registered as cooling_device2
    [ 19.398077] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8
    [ 19.398394] [drm] Initialized i915 1.6.0 20140725 for 0000:00:02.0 on minor 0
    [ 19.398598] snd_hda_intel 0000:00:1b.0: irq 30 for MSI/MSI-X
    [ 19.444984] sound hdaudioC0D0: CX20561 (Hermosa): BIOS auto-probing.
    [ 19.445424] sound hdaudioC0D0: autoconfig: line_outs=1 (0x1a/0x0/0x0/0x0/0x0) type:speaker
    [ 19.445428] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
    [ 19.445432] sound hdaudioC0D0: hp_outs=2 (0x19/0x16/0x0/0x0/0x0)
    [ 19.445435] sound hdaudioC0D0: mono: mono_out=0x0
    [ 19.445438] sound hdaudioC0D0: dig-out=0x1c/0x0
    [ 19.445440] sound hdaudioC0D0: inputs:
    [ 19.445444] sound hdaudioC0D0: Mic=0x18
    [ 19.445447] sound hdaudioC0D0: Internal Mic=0x1d
    [ 19.445450] sound hdaudioC0D0: Dock Mic=0x17
    [ 19.446528] sound hdaudioC0D0: Enable sync_write for stable communication
    [ 19.460104] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/hdaudioC0D0/input9
    [ 19.460484] input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
    [ 19.460612] input: HDA Intel Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
    [ 19.460739] input: HDA Intel Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
    [ 19.460861] input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
    [ 19.507357] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.2, id: 0x1a0b1, caps: 0xd047b3/0xb40000/0xa0000, board id: 71, fw id: 572156
    [ 19.507368] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
    [ 19.552922] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input7
    [ 19.553788] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled
    [ 19.554188] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0
    [ 19.559479] mousedev: PS/2 mouse device common for all mice
    [ 19.687534] iwlwifi 0000:03:00.0: L1 Disabled - LTR Disabled
    [ 19.687940] iwlwifi 0000:03:00.0: Radio type=0x0-0x2-0x0
    [ 19.715231] IPv6: ADDRCONF(NETDEV_UP): wls1: link is not ready
    [ 20.522949] cfg80211: Calling CRDA to update world regulatory domain
    [ 23.184174] wls1: authenticate with 34:31:c4:5f:07:d1
    [ 23.190197] wls1: send auth to 34:31:c4:5f:07:d1 (try 1/3)
    [ 23.193077] wls1: authenticated
    [ 23.193382] wls1: associate with 34:31:c4:5f:07:d1 (try 1/3)
    [ 23.201867] wls1: RX AssocResp from 34:31:c4:5f:07:d1 (capab=0x431 status=0 aid=4)
    [ 23.213427] wls1: associated
    [ 23.213484] IPv6: ADDRCONF(NETDEV_CHANGE): wls1: link becomes ready
    [ 23.213555] cfg80211: Calling CRDA to update world regulatory domain
    [ 24.474590] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
    [ 24.727431] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input14
    [ 26.135183] fuse init (API version 7.23)
    [ 325.938870] wls1: AP 34:31:c4:5f:07:d1 changed bandwidth, new config is 2432 MHz, width 1 (2432/0 MHz)
    [ 1198.431306] perf interrupt took too long (2511 > 2495), lowering kernel.perf_event_max_sample_rate to 50100
    [ 1284.185106] tun: Universal TUN/TAP device driver, 1.6
    [ 1284.185111] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
    [ 1284.215129] Bridge firewalling registered
    [ 1284.229704] device tap0 entered promiscuous mode
    [ 1284.241864] IPv6: ADDRCONF(NETDEV_UP): qemubr0: link is not ready
    [ 2126.210933] wls1: AP 34:31:c4:5f:07:d1 changed bandwidth, new config is 2432 MHz, width 2 (2422/0 MHz)
    [ 2426.034294] wls1: AP 34:31:c4:5f:07:d1 changed bandwidth, new config is 2432 MHz, width 1 (2432/0 MHz)
    [ 2892.936374] kvm: zapping shadow pages for mmio generation wraparound
    [ 2911.505834] kvm [958]: vcpu0 disabled perfctr wrmsr: 0xc1 data 0xffff
    ip link / addr on host:
    # ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: wls1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:21:6a:a9:49:ae brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.32/24 brd 192.168.178.255 scope global wls1
    valid_lft forever preferred_lft forever
    inet6 fe80::2176:234a:73c6:16a7/64 scope link
    valid_lft forever preferred_lft forever
    3: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master qemubr0 state DOWN group default qlen 500
    link/ether 7a:16:ef:9e:39:78 brd ff:ff:ff:ff:ff:ff
    4: qemubr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 7a:16:ef:9e:39:78 brd ff:ff:ff:ff:ff:ff
    # ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: wls1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00:21:6a:a9:49:ae brd ff:ff:ff:ff:ff:ff
    3: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master qemubr0 state DOWN mode DEFAULT group default qlen 500
    link/ether 7a:16:ef:9e:39:78 brd ff:ff:ff:ff:ff:ff
    4: qemubr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 7a:16:ef:9e:39:78 brd ff:ff:ff:ff:ff:ff
    VM ip addr / link
    http://oi58.tinypic.com/16kt11k.jpg
    VM dmesg (extract), probably not helpful
    http://oi59.tinypic.com/2i7l2qv.jpg
    I must admit that my theoretical and practical knowledge on networking is quite limited, so this might be trivial. I'd be happy about any hints in the right direction. Thanks
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code and please don't post images of text [jwr] --
    Last edited by AndyBrandi (2015-01-01 17:48:08)

    You are scratching your right ear with the left hand, so to speak.
    Let's say on the host, you have a bridge, br0, with an appropriate IP, serving as a gateway (created with your favorite network manager), and you'd like to start a VM whose virtual drive is arch-x86_64, then this is all you need to do:
    $ qemu-system-x86_64 -enable-kvm -drive file=arch-x86_64,if=virtio -net nic,model=virtio -net bridge,br=br0
    inside the VM you'll have eth0 (or whatever), and on the host -- tap0 plugged into the bridge. This is all courtesy of /usr/lib/qemu/qemu-bridge-helper which is a suid binary.
    Last edited by Leonid.I (2015-01-03 23:24:41)

  • [SOLVED] Qemu with host networking space.

    Hello, I'm trying to lunch Qemu with host networking, so the VM's can talk to each other, what I did so far is creating the following bridges ( Actually virt-manager did that for me ):
    br0, virbr0 -> virbr0-nic ( the interface )
    and have the following network interfaces:
    br0, lo, virbr0, wlp1s0
    What I think I'm missing is something on the code... I'm lunching with:
    qemu-system-x86 -kernel kernel -cpu host -m 2024 -hda image.image
    I did review the following manuals
    https://wiki.archlinux.org/index.php/QE … networking
    https://wiki.archlinux.org/index.php/Network_bridge
    I'm missing the right command, thanks.
    Last edited by abdullah (2015-02-06 18:00:11)

    abdullah wrote:
    Well, still trying, here is the code that I'm using right now:
    ./start.sh
    #!/bin/bash
    bridge=br0
    tap=$(sudo tunctl -u $(whoami) -b)
    sudo ip link set $tap up
    sleep 1s
    sudo brctl addif $bridge $tap
    qemu-system ..... etc \
    -net nic,vlan0,model=virtio,macaddr=00:16:35:AF:94:4B \
    -net nic,vlan=0,ifname=$tap,script=no,downscript=no
    sudo brctl delif $bridge $tap
    sudo ip link set $tap down
    sudo tunctl -d $tap
    which the reff was in https://activedoc.opensuse.org/book/ope … h-qemu-kvm
    any help please?
    Sorry if I am late to the party... but here's how I do this with bridged networking.
    Let's assume that I have 2 guests, an ArchLinux and Window 7. These are the start scripts:
    : cat start-arch.sh
    #!/bin/bash
    vm_dir="/export/scratch/VMs"
    scripts_dir="${vm_dir}/scripts"
    . ${scripts_dir}/macaddr-gen.sh
    # Generate a random MAC address
    gen_macaddr mac
    # Start the emulator
    qemu-system-x86_64 -enable-kvm -smp 2 \
    -net bridge,br=br0 -net nic,macaddr=${mac},model=virtio \
    -drive file="${vm_dir}/arch-x86_64-1",if=virtio -nographic
    : cat start-win7.sh
    #!/bin/bash
    vm_dir="/export/scratch/VMs"
    scripts_dir="${vm_dir}/scripts"
    . ${scripts_dir}/macaddr-gen.sh
    # Generate a random MAC address
    gen_macaddr mac
    # Start the emulator
    qemu-system-x86_64 -enable-kvm -m 3G -smp 2 \
    -net bridge,br=br0 -net nic,macaddr=${mac},model=virtio \
    -drive file="${vm_dir}/win7-x86_64-1",if=virtio \
    -usbdevice tablet -vga qxl -spice port=5930,disable-ticketing
    : cat macaddr-gen.sh
    #!/bin/bash
    # Generate a random MAC address
    gen_macaddr() {
    local str i macaddr _mac=$1
    str=$(cat /dev/random | tr -cd '[:xdigit:]' | head -c 12 | \
    tr '[:upper:]' '[:lower:]')
    i=0
    macaddr=""
    while [ $i -lt 6 ]; do
    macaddr=${macaddr}${str:0:2}":"
    str=${str:2}
    let i=i+1
    done
    eval $_mac=\${macaddr%:}
    : cat /etc/qemu/bridge.conf
    allow br0
    Note, that the MAC addresses of virtualized NICs in the VMs must be different. If you now do
    : ./start-arch.sh &
    : ./start-win7.sh
    Assuming that you have already set up  a bridge br0, qemu will create several tap? interfaces and insert them into that bridge (using the qemu-bridge-helper suid binary), and you'll have a virtual LAN rooted at br0.
    EDIT: Added a slightly faster random MAC generator and comments.
    Last edited by Leonid.I (2015-02-09 20:13:50)

  • Tap0.device issues while attempting to start bridged network

    i'm trying to get the bridged network working so i can run xen and everytime i try sudo netctl enable xenbridge-dhcp i get this error in journalctl.
    -- Logs begin at Wed 2013-05-15 14:16:16 PDT, end at Tue 2013-05-28 18:26:42 PDT. --
    May 28 18:25:07 kimbra sudo[23762]: pam_unix(sudo:session): session closed for user root
    May 28 18:25:12 kimbra sudo[23764]: jd : TTY=pts/1 ; PWD=/home/jd ; USER=root ; COMMAND=/usr/bin/netctl start xenbridge-dhcp
    May 28 18:25:12 kimbra sudo[23764]: pam_unix(sudo:session): session opened for user root by (uid=0)
    May 28 18:25:12 kimbra systemd[1]: Expecting device sys-subsystem-net-devices-tap0.device...
    -- Subject: Unit sys-subsystem-net-devices-tap0.device has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/li … temd-devel
    -- Unit sys-subsystem-net-devices-tap0.device has begun starting up.
    May 28 18:26:42 kimbra systemd[1]: Job sys-subsystem-net-devices-tap0.device/start timed out.
    May 28 18:26:42 kimbra systemd[1]: Timed out waiting for device sys-subsystem-net-devices-tap0.device.
    -- Subject: Unit sys-subsystem-net-devices-tap0.device has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/li … temd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Softwar … e9d022f03d
    -- Unit sys-subsystem-net-devices-tap0.device has failed.
    -- The result is timeout.
    May 28 18:26:42 kimbra systemd[1]: Dependency failed for xen bridge.
    -- Subject: Unit netctl@xenbridge\x2ddhcp.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/li … temd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Softwar … e9d022f03d
    -- Unit netctl@xenbridge\x2ddhcp.service has failed.
    -- The result is dependency.
    May 28 18:26:42 kimbra sudo[23764]: pam_unix(sudo:session): session closed for user root
    tap0.device is not working and i can't find the uml_utilities package anywhere.
    help?

    Sorry for the rather late response, but I've just been through this issue myself. The tunctl & brctl utilities are now part of 'uml_utliities', which is itself deprecated.
    I downloaded uml_utilities and installed it.
    I've encountered a bug which appears to be common to all bridged netwroking (the inbuilt VirtualBox bridging demonstrates the same problem). The nature of the bug is that if I bridge with the physical ethernet adapter, only a linux guest VM can see the outside world. THis is true whether the guest is running under VirtualBox or KVM so the issue appears to be generic.
    Non-linux guests can see each other and the *host*, but not the rest of the world. Speculations as to the reason include the deprecation of Uml_Utilities, but regardless, I tried something different.
    I created the bridge and assigned it a separate subnet. I added some tap interfaces. I ran a DHCP server instance listening on the bridge alone. I set forwarding on, and created a static route enabling my router to find the virtual subnet.
    I used dnsmasq for the DHCP as it isn't used by my regular network setup, meaning that I can screw around with it trivially without breaking things. Additionally, I set up the config automatically from my vnet script. I can potentially add multiple virtual subnets this way although I haven't included support in the script as yet. The minimal config hands out addresses from the pool specified on the vnet command line, and I can set up static addresses on the same subnet by referencing the contents of /etc/host and /etc/ethers (it identifies vms by mac address).
    This works perfectly, and has the advantage that the virtual network traffic will route via wireless as well as cabled ethernet. It also makes it simple to firewall the virtual subnet and reduces the risk of experiencing minor hassle when my broken vnet code stuffs the ethernet interface.
    Ping me if you want a copy of the vnet script, although it's still very much a work in progress.
    Last edited by salafrance (2013-09-21 20:02:12)

  • Bridged network only gets UDP broadcast traffic?

    I've created a bridged network Mac OS X 10.8.5 using ifconfig and TUNTAP for OS X to bridge my wireless connection, en0, with a virtual interface, tap0, which I can use for guest VMs:
            $ sudo sysctl -w net.inet.ip.forwarding=1
            $ sudo sysctl -w net.link.ether.inet.proxyall=1
            $ sudo sysctl -w net.inet.ip.fw.enable=1
            $ sudo ifconfig bridge0 create
            $ sudo ifconfig bridge0 addm en0 addm tap0
            $ sudo ifconfig bridge0 up
            $ ifconfig
            en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
                      ether 28:cf:xx:xx:xx:xx
                      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%en0 prefixlen 64 scopeid 0x4
                      inet 192.168.100.64 netmask 0xffffff00 broadcast 192.168.100.1
                      media: autoselect
                      status: active
            bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
                      ether ac:de:xx:xx:xx:xx
                      Configuration:
                                priority 0 hellotime 0 fwddelay 0 maxage 0
                                ipfilter disabled flags 0x2
                      member: en0 flags=3<LEARNING,DISCOVER>
                               port 4 priority 0 path cost 0
                      member: tap0 flags=3<LEARNING,DISCOVER>
                               port 8 priority 0 path cost 0
            tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
                      ether ca:3d:xx:xx:xx:xx
                      open (pid 88244)
    I'm using this with QEMU and the guest VM never gets a DHCP lease. If I `tcpdump -i tap0`, I only see broadcast traffic. Shouldn't I see a mirror of everything on en0? (192.168.100.33, the host doing the broadcasting, is another unrelate, noisy server on my LAN.)
    Any ideas?

    IGMP snooping may be enabled by default on the 6509. Disabling it may solve your problem.
    http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/122sx/swcg/snooigmp.htm#wp1020466

  • Problems with SRW224G4 switch and Bridged Network Cards

    Hello,
    We have recently installed a SRW224G4 switch and have discovered that when we plug our DELL PowerEdge 2900 server into the switch, the switch loses all network connectivity and all of the LED's on the switch start flashing.
    The server works perfectly well plugged into another switch, but as soon as we introduce the SRW224G4 into the network, either with the server plugged into that switch or any other, the problem re-occurs.
    The only way we found we could eliminate this issue was if we disabled the Bridged Network connection on the two network cards on the server. If we do that, everything is fine, except the network performance of the server has dropped significantly.
    The server is plugged into the 1GB ports on the switch, although we tried it on the 100MB ports and received the same problems. The switch reports that the ports are running at full-duplex.
    Has anyone noticed this behavior before, and more importantly been able to rectify it.
    Thanks in advance for your assistance,
    Paul

    I had this problem as well with any Linksys 2024 or rackmountable switch..  The trick is, you need to use the network cards management software to "team" or bridged the 2 NIC's otherwise the switch detects a loop and the whole thing locks up. So lame...  Windows built in bridge mode stinks dont use it.  When you use the Intel management software or Dell or HP's NIc management software you have the option to actually choose "redundant mode" where you can pick a Nic to be the primary, or you can choose Load Balancing where you can essentially double your throughput by joining the 2 nics.
    In Windows 2008 Server, you actually do this by going to the Properties on the NIC in  Device Manger.  the software controls are now built right into the driver.  pretty neat.  2003 you can check Device Manager the same way but not sure if it's the same as 2008, you might need to run the actual NIC management app.
    Hope this helps
    fdigi 

  • Bridged networking not working with nested VMware Workstation

    I am having an issue that I can't seem to find any answer to.... 
    We are running Vsphere 5.5 and I have 2 Guests each running Windows 7 64-bit.  Each of these guests has VMware Workstation 10 running on them.  When we P2V the systems we followed all the instructions to allow nested VMware Workstation.  However, we are running into an issue where the Bridged Networking will not work.  Both of the Win7 guests are on the same vlan and all of the VMs in Workstation are on the same network as well.  However, while the 2 Windows 7 guests can ping each other and each of the guests can ping the VMs that are hosted locally, they cannot connect to the systems on the other guest running workstation.
    I tried to upgrade the Guest NIC to VMXNet3, but that did not help. 
    All of the research I have done brings me to people who are having the opposite problem (ESXi nested in VMware Workstation). 
    How can I get the 2 bridged networks to connect?
    Thanks!

    The ESXi vSwitch to which the outer guests are connected must be configured for promiscuous mode and forged transmits.

  • Bridge Network Adapters Always Start Disconnected

    I've been working on this for two weeks with no success.   Everytime I reboot my server, Windows Server 2008 R2 & VmWare Sever 2.02 any VMs that are set to bridged networking boot with their network adapter set as disconnected.  It requires a manual "click" of the checkbox to turn on the network adapter.  I have been using VMware server since version 1 and have never had this problem.  One unusual thing is the Manager Virtual Networks Auto-Bridging doesn't seem to show any network adapters, although networking continues to work.   If I set my VM to NAT or host only my adapter starts connected, as it should.
    Things I have tried:
    Uninstall VmWare server & Reinstall
    Uninstall and create various VM Hosts, all do the same, pre-compiled applicanece and all costum built.
    Moved host images to another server (works fine)
    Checked to make sure Bridge Protcal is installed on ethernet adapter, even removed and readded.
    Uninstalled and reinstalled ethernet adapter (Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller(NDIS6.20)
    This is a Windows Server 2008 R2 box with lots of ram  and plenty of resources only running spiceworks & splunk in a test capacity.  Using this machine for testing and pre-deployment but it's virtual machines need to act like they would in production.
    Any help would be greatly appreciated.
    Thanks

    Opps typo, I moved the VM images to different hosts, Windows server 2003, 2008 and 2008 R2.  My home box runs 2008 R2 and Vmware server nicely together without this issue.  Hence why I'm at a loss.
    Thanks for  your interest.

  • QoS in multi-bridge network

    Hi,
    In a point-to-multipoint bridge network (1 bridge as root the others as non-root) bandwidth is shared equally. Is there a way to let for instance one non-root bridge have 4 Mbps and the other non-root bridge 2 Mbps?
    Thanks,
    Joost Koopmans

    The simplest answer is to set the non-roots that should have the highest data rate to Basic/Basic/Yes/Yes on the 1/2/5.5/11 settings and those that should get less bandwidth at Basic/Basic/Yes/No.
    Matthew Wheeler
    Chief Wireless Architect
    Blue Modal

Maybe you are looking for