LinuxQuestions.org
Visit Jeremy's Blog.
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 09-21-2012, 06:03 AM   #1
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Rep: Reputation: 34
Slackware Qemu Networking


I have compiled and installed vde2 and qemu on my computer, what do I need to add to my current qemu command to enable networking?

Code:
qemu-system-x86_64 -cpu core2duo -drive file=/home/ReactOS-0.3.14-QEMU/files/ReactOS.vmdk,index=0,media=disk -drive file=/dev/sr0,if=ide,index=1,media=cdrom -boot c -soundhw sb16 -m 384 -smp 2 -sdl -vga vmware -localtime &
I have a tap0 network device up and running

Code:
#ifconfig
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.22  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::1e6f:65ff:fe4c:3aa5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:894 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1014 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:553577 (540.6 KiB)  TX bytes:161837 (158.0 KiB)
          Interrupt:45 Base address:0x8000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1323 (1.2 KiB)  TX bytes:1323 (1.2 KiB)

tap0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:x:xx  
          inet addr:10.10.10.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::e4f4:e8ff:fe24:a672/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:2929 (2.8 KiB)
I'm looking to network my VM with my host machine and beyond.
-------------------------
| [VM] -> HOST -> | --> Internet
-------------------------
 
Old 09-21-2012, 06:34 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
I use QEMU (or rather, qemu-kvm but the rules should be the same) which has been compiled against vde2 (./configure --enable-vde).

When I run qemu it has these commandline arguments to connect it to the virtual switch created by vde:
Code:
 -net vde,sock=/var/run/kvm0.ctl,vlan=0 -net nic,model=virtio,vlan=0
I use my rc.vdenetwork script to setup the tap interface with the control socket "/var/run/kvm0.ctl" which you see returning in my qemu commandline parameter.

That is all that's needed.

Eric
 
Old 09-21-2012, 04:51 PM   #3
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Original Poster
Rep: Reputation: 34
Ok, that seems to have worked. I thank you Alien Bob. I did have to use the select model=ne2k_pci, instead of the model=virtio as the operating system ReactOS brought up a new hardware wizard box but it didn't find any drivers for virtio.

Would you know if using qemu-kvm would help speed up my VM's, even when my CPU does not support Virtualization. I can modprobe kvm, but when I modprobe intel-kvm I get

Code:
modprobe intel-kvm
FATAL: Error inserting kvm_intel kvm-intel.ko: Operation not supported
 
Old 09-21-2012, 07:07 PM   #4
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 780

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
kvm only functions on cpu's that support hardware virtualization. Do a search on kqemu. That works for cpu's that don't support hardware VM's.

john
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 03:36 AM
WFWG 3.11 networking in Qemu? forsaken_pariah Linux - General 1 08-17-2007 12:09 PM
QEMU and networking? Zmyrgel Linux - General 4 10-09-2006 02:12 AM
Qemu networking Again?! depam Linux - Software 6 02-28-2006 09:24 AM

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

All times are GMT -5. The time now is 10:01 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