LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-04-2015, 08:12 PM   #1
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
kvm: is VDE still the recommended way to set up virtual networking?


In his wiki entry, last modified 8 years ago, Eric Hameleers recommends using VDE for virtual networking with Qemu. Is this still recommended?

The Qemu documentation suggests VDE is not the right backend to use. Some years ago I set up virtual networks for kvm-qemu with basic shell scripts which brought up bridges, dummy devices and TAP adapters. It was fast and reliable and I was about to do the same thing until I saw Eric's recommendation. Any suggestions, clarifications?
 
Old 08-06-2015, 12:49 AM   #2
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
I never used vde. I converted a couple years ago from tunctl/brctl to macvlan/macvtap interfaces for kvm/qemu and lxc. They work well and have been stable in testing and production.
 
Old 08-06-2015, 09:59 AM   #3
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
I have been using tun via the qemu-bridge-helper provided with qemu, it's simple and works.
 
1 members found this post helpful.
Old 08-06-2015, 02:11 PM   #4
Cesare
Member
 
Registered: Jun 2010
Posts: 65

Rep: Reputation: 113Reputation: 113
I don't think there's a single "best" or "recommended" way for qemu networking. It all depends on what you're trying to achieve.

SLIRP is the most easy and despite its drawbacks an excellent choice if all the networking you need is e.g. a working browser in the VM.

Tap has no external dependencies and will give you full network access with best performance but needs root privileges.

VDE is propably geared towards working with very complex virtual networks.

I don't do that, but I still use VDE because it's very convenient for my use case as my VMs get full network access, yet I can start/stop them as an ordinary user without root privileges. With only 4 lines (a few more if you want proper IPv6) in rc.local and no need to handle tap-devices the setup is also very simple.
 
1 members found this post helpful.
Old 08-07-2015, 07:36 PM   #5
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Thanks for the tips everybody. I've been studying qemu more closely over the past couple of days and I'm happy with the qemu-bridge-helper method, suggested by slacker1337. I had to make some adjustments because I installed qemu from source, completely forgetting I could have used the slackbuild instead. It meant I had to put udev rules in place, and also chmod u+s /usr/local/libexec/qemu-bridge-helper to allow regular users run qemu (but adding the setuid bit to this script doesn't seem to be in the slackbuild, so perhaps there's another way?). I also had to echo "allow br0" > /usr/local/etc/qemu/bridge.conf.

At some point I will look again at VDE, and compare it with the netdev bridge backend set up by the helper.

Thanks again.
 
Old 08-07-2015, 07:47 PM   #6
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Quote:
Originally Posted by gezley View Post
Thanks for the tips everybody. I've been studying qemu more closely over the past couple of days and I'm happy with the qemu-bridge-helper method, suggested by slacker1337. I had to make some adjustments because I installed qemu from source, completely forgetting I could have used the slackbuild instead. It meant I had to put udev rules in place, and also chmod u+s /usr/local/libexec/qemu-bridge-helper to allow regular users run qemu (but adding the setuid bit to this script doesn't seem to be in the slackbuild, so perhaps there's another way?). I also had to echo "allow br0" > /usr/local/etc/qemu/bridge.conf.

At some point I will look again at VDE, and compare it with the netdev bridge backend set up by the helper.

Thanks again.
Glad to see you got it working the way you want. I've been pleased with the throughput using the qemu-bridge-helper. I had a host machine running 6 virtual machines with no issues. I'll share one of my startup scripts for you as well. Here is a startup script I use for my -current VM:
Code:
arch=x86_64
params=(
  -cpu qemu64
  -m 1024
  -hda $HOME/VMs/slackware64-current.qcow2
  -net nic,macaddr=50:50:11:13:11:21
  -enable-kvm
  -daemonize
  -name slack_current
  -vnc :21
  -serial telnet:localhost:7021,server,nowait,nodelay
  -monitor telnet:localhost:7121,server,nowait,nodelay
  -usbdevice tablet
)
exec /usr/bin/qemu-system-$arch "${params[@]}
 
Old 08-07-2015, 08:18 PM   #7
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by slacker1337 View Post
Glad to see you got it working the way you want. I've been pleased with the throughput using the qemu-bridge-helper. I had a host machine running 6 virtual machines with no issues. I'll share one of my startup scripts for you as well. Here is a startup script I use for my -current VM:
Code:
arch=x86_64
params=(
  -cpu qemu64
  -m 1024
  -hda $HOME/VMs/slackware64-current.qcow2
  -net nic,macaddr=50:50:11:13:11:21
  -enable-kvm
  -daemonize
  -name slack_current
  -vnc :21
  -serial telnet:localhost:7021,server,nowait,nodelay
  -monitor telnet:localhost:7121,server,nowait,nodelay
  -usbdevice tablet
)
exec /usr/bin/qemu-system-$arch "${params[@]}
Nice one. The positional parameter idea is a good idea which I'll adopt if you don't mind.

Some questions for you, and you can take your time answering them because I'll be hitting the hay in 5 minutes as it's after 2 here! I know they're not strictly Slack-related but I might as well pick your brains while you're here! ;-)

1) Is qemu64 a decent cpu?
2) Regarding hda, I was under the impression the default storage controller was IDE. Take a look at my own new thread started in the LQ Virtualization forum, titled "Qemu storage for Windows 2012 guest" and let me know what you think. I realise this is all emulated hardware but I assume a SAS controller with a SCSI disk under qemu will still perform better than the default IDE disk on ATA?
3) Your network parameter? Does the helper script not have to be explicitly set?
 
Old 08-08-2015, 03:24 PM   #8
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Quote:
Originally Posted by gezley View Post
Nice one. The positional parameter idea is a good idea which I'll adopt if you don't mind.
I have to admit that I stole that from work, my original script was not as elegant.
Quote:
Originally Posted by gezley View Post
1) Is qemu64 a decent cpu?
I've been pretty satisfied with it. I had that cpu set for a multitude of servers as well as a Windows 7 VM that ran quickly. I admit though that I haven't tried any others.
Quote:
Originally Posted by gezley View Post
2) Regarding hda, I was under the impression the default storage controller was IDE. Take a look at my own new thread started in the LQ Virtualization forum, titled "Qemu storage for Windows 2012 guest" and let me know what you think. I realise this is all emulated hardware but I assume a SAS controller with a SCSI disk under qemu will still perform better than the default IDE disk on ATA?
I haven't messed with any drive controllers, though you present an interesting idea.
Quote:
Originally Posted by gezley View Post
3) Your network parameter? Does the helper script not have to be explicitly set?
From what I understand, the helper program is called based not calling user mode and my /etc/qemu/bridge.conf
 
Old 08-08-2015, 05:36 PM   #9
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by slacker1337 View Post
I have to admit that I stole that from work, my original script was not as elegant.
I've been pretty satisfied with it. I had that cpu set for a multitude of servers as well as a Windows 7 VM that ran quickly. I admit though that I haven't tried any others.
I haven't messed with any drive controllers, though you present an interesting idea.
From what I understand, the helper program is called based not calling user mode and my /etc/qemu/bridge.conf
OK thanks. I'm getting the impression with the kvm accelerator it doesn't really matter whether the emulated hardware is a Celeron or i7, IDE adapter or SCSI. But I do wonder, if that's the case why go to the trouble of maintaining all those different pieces of hardware in Qemu? And surely the internal Qemu code for each of these emulated devices is different, leading possibly to one device possibly ending up more buggy than another? Just some questions I have in my head; no need to answer. Thanks.
 
Old 08-08-2015, 05:39 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Or that?

Code:
arch=x86_64
params="
  -cpu qemu64
  -m 1024
  -hda $HOME/VMs/slackware64-current.qcow2
  -net nic,macaddr=50:50:11:13:11:21
  -enable-kvm
  -daemonize
  -name slack_current
  -vnc :21
  -serial telnet:localhost:7021,server,nowait,nodelay
  -monitor telnet:localhost:7121,server,nowait,nodelay
  -usbdevice tablet
"
exec /usr/bin/qemu-system-$arch `echo $params`
There's more that one way to skin a cat.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual networking with KVM johndoe777 Linux - Newbie 1 08-20-2014 04:23 PM
[SOLVED] VDE and KVM -- guests and host all on same subnet kfritz Slackware 5 05-21-2012 10:18 PM
KVM with VDE Networking Question dman777 Linux - Virtualization and Cloud 0 09-27-2011 02:01 AM
VDE networking in QEMU trademark91 Slackware 2 02-28-2011 08:29 PM
LXer: Create a LAN for Virtual Servers with KVM and VDE LXer Syndicated Linux News 0 11-12-2008 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration