LinuxQuestions.org
Visit Jeremy's Blog.
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 06-16-2013, 08:48 AM   #1
TheLibertarian
LQ Newbie
 
Registered: Jun 2013
Location: Copenhagen, Denmark
Posts: 3

Rep: Reputation: Disabled
KVM guests and host cannot see each other


Hi,

I am setting up a simple home server, based on Ubuntu Server, to replace my aging NAS, and several services running on my workstations. I want the host to act as both KVM and file server (serving NFS to the network, as well as the guests). Each guest run one or a few dedicated services; LAMP etc.

I have installed KVM, and added a VM. I used virt-manager to configure the VM - and set up the network interface on eth0 as a bridge. It works fine - the guest gets an ip from my dhcp and all, but it cannot see/ping the host. The host, likewise cannot ping the guest, but both can be pinged from or ping other machines on the LAN.

I guess this is the issue: libvirt: Wiki: Guest can reach outside network, but can't reach host (macvtap)

But following the directions listed there does not solve my issue. The isolated interface shows up in the virt-manager config page for the guest - but I cannot ping the host on 192.168.254.1 or vice versa. Furthermore the isolated interface does not appear if I do a ifconfig on the guest, shouldn't it do that?

I am a Linux newbie (at least when it comes to servers and networking), so I am hoping to resolve my issue, as well as learn a bit. Thanks for your assistance!
 
Old 06-16-2013, 10:25 AM   #2
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 516

Rep: Reputation: 102Reputation: 102
Host: create bridge, transfer eth0's settings to it, remove eth0 settings. Essentially replace the eth0 withh br0 everywhere you need to.
For example i have br0 instead of eth0 configured with IP address and all, vnet0 is the created virtual device for my running VM:

Code:
br0       Link encap:Ethernet  HWaddr 94:de:80:00:8b:0c  
          inet addr:192.168.100.100  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11304671 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11538154 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6552299211 (6.1 GiB)  TX bytes:6074394193 (5.6 GiB)

eth0      Link encap:Ethernet  HWaddr 94:de:80:00:8b:0c  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11326259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11528650 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6704366480 (6.2 GiB)  TX bytes:6078044308 (5.6 GiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:553359 errors:0 dropped:0 overruns:0 frame:0
          TX packets:553359 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2946989760 (2.7 GiB)  TX bytes:2946989760 (2.7 GiB)

vnet0     Link encap:Ethernet  HWaddr fe:54:00:41:d7:a3  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25271 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30262 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:17238694 (16.4 MiB)  TX bytes:5972268 (5.6 MiB)
Set up the VM to use the shared device. This will create a virtual device which will be part of br0. All VMs and the Host will see each other.

PS Make sure you replace eth0 with br0 in EVERY setting including firewalls etc.
 
1 members found this post helpful.
Old 06-16-2013, 11:48 AM   #3
TheLibertarian
LQ Newbie
 
Registered: Jun 2013
Location: Copenhagen, Denmark
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you gradinaruvasile! I set up a "normal" bridge - as you suggested, and now it works - without having to make an isolated network or anything! You just saved my weekend - thanks!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VDE and KVM -- guests and host all on same subnet kfritz Slackware 5 05-21-2012 11:18 PM
kvm and vmware guests are not communicating Gil@LQ Linux - Virtualization and Cloud 6 04-27-2012 11:54 AM
Centos KVM and guests IP thunder11 Linux - Networking 0 11-29-2011 08:56 AM
Your experience with KVM and Windows guests TheR_ Linux - Virtualization and Cloud 1 04-15-2010 09:33 AM
KVM: How to set up a private network between guests and the host kenneho Linux - Virtualization and Cloud 1 01-17-2010 12:19 PM


All times are GMT -5. The time now is 10:52 PM.

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