You are not logged in.

#1 2011-03-17 14:55:47

vendion
Member
From: Tennessee, USA
Registered: 2010-03-10
Posts: 204
Website

Need help getting networking in KVM working

I am tring to get networking on my KVM guests to work, I have tried the bridge method posted in the KVM Wiki Page but all that managed was to knock out the network connection on my host (couldn't obtian a lease from the DHCP server after restarting the network daemon).  I have also tried the VDE2 method posted n the QEMU Wiki Page but the guest OS does not see the network.  The only requirement that I have for the network is that I am able to access the virtual machine from my LAN, or at least from the host machine, as to how I manage this doesn't matter to me.

Last edited by vendion (2011-03-17 15:24:39)

Offline

#2 2011-03-17 16:21:44

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,924
Website

Re: Need help getting networking in KVM working

The default network settings work in Qemu very well. Some caveats: ping doesnt work, and all incoming connections are firewalled, so you have to explicitely enable the ports you want to use with -redir


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#3 2011-03-17 17:09:11

vendion
Member
From: Tennessee, USA
Registered: 2010-03-10
Posts: 204
Website

Re: Need help getting networking in KVM working

Ok so if I use that method then how do I access the vitual machine from my host OS or another machine on the LAN?  Which assuming the addressing differences LAN is on a class c network and the guest OS is on a class a the LAN part is out.  I need to be able to scp files to and from the Guest OS as well as be able to do git push/pulls for the guest OS.

Offline

#4 2011-03-17 17:40:12

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Need help getting networking in KVM working

As user:

vde_switch -daemon

As root:

vde_pcapplug -daemon eth0

As user:

qemu-kvm -cdrom /mnt/vault0/_iso/dsl-4.4.10.iso -boot d -vga vmware  -net nic -net vde

The important parameters are:
-net nic (gives guest a network card)
-net vde (connects all guest network cards to the virtual switch)

This way the guest can access everyone in the real network EXCEPT the host. If you want to access the host you could use a combination of VDE2 and a bridge. I'm not sure how that would work.

Offline

#5 2011-03-17 17:56:13

vendion
Member
From: Tennessee, USA
Registered: 2010-03-10
Posts: 204
Website

Re: Need help getting networking in KVM working

Ok so VDE2 is not what I need, I need the guest OS to be able to access the host everything else on the LAN would be a convenience that I can work around by probably SSHing into the host and from there using SSH to access another machine.

Offline

#6 2011-03-17 20:18:40

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Need help getting networking in KVM working

Yes, I understand you. That's what most people want when working with different guests. It's possible of course, but I haven't looked futher into it.

I'll reply again when I've found a easy way to do it.

Oh, btw, I think the guest can access the host at 10.0.2.2 with the option:

-net user

If you're using SSH you could make a reverse connection.

Offline

Board footer

Powered by FluxBB