LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware Qemu Networking (http://www.linuxquestions.org/questions/slackware-14/slackware-qemu-networking-4175428355/)

Stragonian 09-21-2012 06:03 AM

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
-------------------------

Alien Bob 09-21-2012 06:34 AM

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

Stragonian 09-21-2012 04:51 PM

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


AlleyTrotter 09-21-2012 07:07 PM

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


All times are GMT -5. The time now is 11:29 PM.