qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Network connection between hosts drops when using vir


From: Bram Klein Gunnewiek
Subject: Re: [Qemu-discuss] Network connection between hosts drops when using virtio network card
Date: Tue, 23 Dec 2014 10:19:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

I know why QEMU was crashing on one node and not the other. The node QEMU crashed on had the option "Promiscuous Mode" set to "Allow all". When I set this to deny QEMU does not crash anymore. Question is, why is this happening (and only happening in a specific configuration)? I assume this is a bug?

On 12/23/2014 09:54 AM, Bram Klein Gunnewiek wrote:
I have more strange problems that I can't explain. As a test, I booted two virtualbox vm's to act as nodes. Both are identical (clones). When I try to reproduce the problem on those machines I can't but while testing I experienced another strange "bug". When using two nics where the first nic is virtio (vhost enabled) and the second one is e1000 qemu crashes on one of the two machines (always the same machine) as soon as the boot manager tries to activate the second nic (e1000). I can't reproduce this on the other virtualbox vm (although they are exactly the same). It does not happen with only 1 virtio nic and it also doesnt happen when both nics are e1000 devices. I use this command to start QEMU on the (virtual) hosts:

sudo qemu-system-x86_64 -daemonize -smp 1 -m 128 -vnc 0.0.0.0:0 \
-netdev tap,id=tap_1,script=no,downscript=no,ifname=net_1_1,vhost=on \
-device virtio-net-pci,bootindex=1,id=nic_1,netdev=tap_1,mac=02:16:3F:00:00:FA \
-netdev tap,id=tap_2,script=no,downscript=no,ifname=net_1_2 \
-device e1000,bootindex=2,id=nic_2,netdev=tap_2,mac=02:16:3F:00:00:FB; \
sudo brctl addif bridge0 net_1_1; \
sudo brctl addif bridge0 net_1_2; \
sudo ifconfig net_1_1 0.0.0.0 up; \
sudo ifconfig net_1_2 0.0.0.0 up;

This is a screenshot of the VNC screen of the QEMU process right after it crashed: http://i.imgur.com/QFKClTS.png . The other VM continues boot without any problems. The bridge is configured like this (again, on both machines):

auto bridge0
iface bridge0 inet dhcp
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

Both machines are running ubuntu Ubuntu 14.04.1 LTS with QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.9), Copyright (c) 2003-2008 Fabrice Bellard.

There is nothing in the kernal logs to give me more information.

On 12/23/2014 08:43 AM, Bram Klein Gunnewiek wrote:
I am testing some qemu stuff in a local enviroment where I have a "cluster" of one virtualbox vm and my bare metal machine (the virtualbox vm runs on my machine). I have disabled kvm hardware virtualisation (rmmod kvm_intel). I have one single network card in my PC (RTL8111/8168/8411) that is configured as a bridge. The virtualbox vm is linked to that bridge so the vm gets an IP from my local DHCP server.

This works fine except when I use a virtio network card on a guest system. If I do that I loose the connection to my virtualbox vm. I don't have much experience with linux networking and bridges but the strange thing is that this only happens with virtio network cards. If I use an e1000 card in my qemu guest everything works fine. Can someone spot the issue or knows where to look? There is nothing helpfull in my kernel logs.

Network configuration:

iface bridge0 inet dhcp
bridge_ports eth1
bridge_stp off
bridge_fd 0

Goes wrong:

sudo qemu-system-x86_64 -daemonize -smp 1 -m 128 -vnc 0.0.0.0:0 \
-netdev tap,id=tap_1,script=no,downscript=no,ifname=net_1_1,vhost=off \
-device virtio-net-pci,bootindex=1,id=nic_1,netdev=tap_1,mac=02:16:3E:00:00:01; \
sudo brctl addif bridge0 net_1_1; \
sudo ifconfig net_1_1 0.0.0.0 up;

Works:

sudo qemu-system-x86_64 -daemonize -smp 1 -m 128 -vnc 0.0.0.0:0 \
-netdev tap,id=tap_2,script=no,downscript=no,ifname=net_1_2 \
-device e1000,bootindex=2,id=nic_2,netdev=tap_2,mac=02:16:3E:00:00:02; \
sudo brctl addif bridge0 net_1_2; \
sudo ifconfig net_1_2 0.0.0.0 up;







reply via email to

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