Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
QEMU Virtual network switch info
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Sun Jul 05, 2015 8:45 am    Post subject: QEMU Virtual network switch info Reply with quote

Hi everyone !

I'm trying to get a DragonFlyBSD 4.2 install under QEMU delivering a NFS share to my Gentoo host for HAMMER reasons :) .

For this, I've tried to setup a Virtual Network Switch as explained on the Gentoo wiki here

It works fine when I start QEMU with the option below, the perfomance is kinda horrible however, ping works, SSH takes ages.

Code:
-netdev tap,id=t0,ifname=vnet0,script=no,downscript=no -device e1000,netdev=t0


The wiki state this to improve the performance :

after setting up the guest it is recommended to emulate a virtio-net device, which is 10 times as fast

That's where I'm lost, no matter which option I try, I always end up with either an error message from QEMU or 2 network cards on the guest (the VirtIO and the e1000) and the VirtIO can't reach the host.

Would someone have a reliable config for such problem (accessing a NFS share from a QEMU guest from a Gentoo host) ?

Have a nice day !
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1753

PostPosted: Sun Jul 05, 2015 9:36 am    Post subject: Reply with quote

AFAIR I had more problems with setting bridge in a way that would work than with qemu interfaces themselves, so here's a relevant part from my config. Obviously it had to be something in brctl_ part that made the difference.

# VIRTUAL MACHINE <--> HOST BRIDGE
#

config_vn0="10.0.1.1/24"
brctl_vn0="setfd 0
sethello 10
stp off"
rc_net_vn0_provide="lan !net"


Now, what does it mean "ssh takes ages"? Do you mean opening the session?
SSH doesn't usually need high bandwidth, you almost could use an avian carier and still be happy enough.
Anyway, ssh should work fine in all networking modes. Virtio is intended for high throughput, and for less demanding stuff like ssh and www even user mode would be sufficient if you opened connection from guest. Are you sure it's actually a networking problem? Maybe it's sshd that is the culprit here? Or perhaps it's not even started as standalone deamon and running as a service behind xinetd instead?
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 164
Location: Belgium

PostPosted: Sun Jul 05, 2015 11:27 am    Post subject: Reply with quote

Ah but you're using bridge already (which is kinda hard to understand, I tried to set it up but no luck so far)

Using the wiki instructions here's what I've achieved :

Guest can reach Bridge (say 192.168.1.5), Default Gateway (say 192.168.1.1) and Internet but Host can only ping bridge and bridge does not route to default gateway for some reasons)

What I liked in the Virtual Network Switch is that it does not involve bridging, just 2 additional interface that talk to each other.

I didn't know about the avian carrier but I suspect that that's what happens when I set a Virtual Network Switch :D

It's really painfully slow to connect through SSH and furthermore the connection drops :( Unusable for more than a few minutes.

Thanks for your answer, I'll try to educate myself about bridges I guess
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum