LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 11-12-2011, 12:01 AM   #1
raindog308
LQ Newbie
 
Registered: Dec 2010
Posts: 20

Rep: Reputation: 0
debian kvm - how to bridge?


I'm trying to setup kvm on Debian Squeeze. I created a VM (in virt-manager) running Windows XP and I can get out to the Internet from it just fine. But I can't get into the VM (ping, RDP, etc.)

To me this screams "you're NATting". But I thought I'd setup bridging...

So here is the hosts's /etc/network/interfaces, minus comments:


Code:
auto lo br0
iface lo inet loopback

allow-hotplug eth1
iface eth1 inet manual
iface br0 inet static
        bridge_ports eth1
        address 192.168.11.100
        network 192.168.11.0
        netmask 255.255.255.0
        broadcast 192.168.11.255
        gateway 192.168.11.1
        bridge_stp on
        bridge_maxwait 0
        bridge_fd 0
The host is 192.168.11.100 and my router is 192.168.11.1. Host talks to the LAN just fine. I want the guest in this case to be 192.168.11.150, and if I setup its NIC in the guest, as I say, I can browse the web from the guest. But no pinging or RDP.

I think I have the bridge right:

Code:
# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.00044b008bbf       yes             eth1
eth1 in this case is correct.

Here is part of the XML:

Code:
    <interface type='bridge'>
      <mac address='52:54:00:04:35:c4'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
When the guest is running, this is what I see in ifconfig -a:

Code:
br0       Link encap:Ethernet  HWaddr 00:04:4b:00:8b:bf
          inet addr:192.168.11.100 Bcast:192.168.11.255  Mask:255.255.255.0
          inet6 addr: fe80::204:4bff:fe00:8bbf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44912471 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27431724 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:19277522011 (17.9 GiB)  TX bytes:76564829455 (71.3 GiB)

eth1      Link encap:Ethernet  HWaddr 00:04:4b:00:8b:bf
          inet6 addr: fe80::204:4bff:fe00:8bbf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44913082 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27869792 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20031714700 (18.6 GiB)  TX bytes:78643818982 (73.2 GiB)
          Interrupt:29 Base address:0xe000

vnet0     Link encap:Ethernet  HWaddr fe:54:00:04:35:c4
          inet6 addr: fe80::fc54:ff:fe04:35c4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1651 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1280 (1.2 KiB)  TX bytes:2112563 (2.0 MiB)
I'm not intentionally using any ipv6.

How can I get bridged networking (in the sense that the guest appears on the network as 192.168.11.150)?
 
Old 11-12-2011, 03:31 PM   #2
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 836

Rep: Reputation: 91
you will not see vnet0 as .150, but if you set the IP inside the guest, it should work. The bridge seems right, though if the brctl show output is from the time the guest is running, you should see vnet0 there as well.
 
Old 11-13-2011, 04:41 PM   #3
raindog308
LQ Newbie
 
Registered: Dec 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Should...but doesn't :-)

I guess kvm doesn't work right in debian. Next up is Virtualbox.
 
Old 11-14-2011, 11:07 AM   #4
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 836

Rep: Reputation: 91
kvm sure works fine for me, but I use RHEL and Fedora. If you'd like to try another distro, I could provide you with the configs
 
  


Reply

Tags
kvm


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kvm wireless bridge network shogun1234 Debian 5 08-13-2012 03:01 PM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
Starting KVM with public bridge as normal user under Debian/Ubuntu sfxpt Linux - Virtualization and Cloud 3 02-10-2011 08:37 AM
kvm bridge on cent os question riegersteve Linux - Virtualization and Cloud 1 07-14-2010 01:43 PM
Kvm using wireless bridge, how michaelux Linux - Virtualization and Cloud 1 06-07-2010 08:48 AM


All times are GMT -5. The time now is 01:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration