LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 07: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, 09:25 AM   #2
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
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, 10: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!
 
Old 02-10-2019, 11:51 AM   #4
spawn000
LQ Newbie
 
Registered: Feb 2019
Posts: 1

Rep: Reputation: Disabled
Can you elaborate a bit more on this. Sorry I am a noob when it comes to networking but I am trying to figure out the same problem.
 
  


Reply



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 10:18 PM
kvm and vmware guests are not communicating Gil@LQ Linux - Virtualization and Cloud 6 04-27-2012 10:54 AM
Centos KVM and guests IP thunder11 Linux - Networking 0 11-29-2011 07:56 AM
Your experience with KVM and Windows guests TheR_ Linux - Virtualization and Cloud 1 04-15-2010 08:33 AM
KVM: How to set up a private network between guests and the host kenneho Linux - Virtualization and Cloud 1 01-17-2010 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

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