LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 10-03-2012, 08:40 PM   #1
mglaris
LQ Newbie
 
Registered: Oct 2012
Location: Denton, TX
Distribution: CentOS
Posts: 3

Rep: Reputation: Disabled
KVM Guest network unable to connect to Host in CentOS-6.3


Howdy,

I am attempting to create a VM using KVM under a CentosOS 6.2 host. I have worked on it for days and have tried dozens of potential solutions from various forums and web pages, but so far none have worked.

The basic setup is that I am running CentoOS 6.2 (kernel version 2.6.32-279.5.1.el6.x86_64) with virtualization enabled. I have created (and recreated) several Windows 7 and Cent-OS 6.3 clients, but none of the clients can access the host, let alone the Internet. The clients do not need to be visible from the Internet, but do need to be able to connect to the host. Internet access would be nice, but is not absolutly required.

The machine is a HP-Envy 17 3D laptop. I have an ethernet adapter (RealTek RTL8139C) that is not used, per se, and a wireles adapter that I use to connect to the internet. From the research I have sone thus far, it does not seem possible to use the wireless adapter in bridge. I am hoping that I can connect the VM's to eth0 and then setup a static route from eth0 to the wireless adapter.

At this point, I cannot even get from the Guest to the Host.

Running ifconfig yields the following:

eth0 Link encap:Ethernet HWaddr E4:11:5B:32:B4:29
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:9808 errors:0 dropped:0 overruns:0 frame:0
TX packets:9808 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40679561 (38.7 MiB) TX bytes:40679561 (38.7 MiB)

virbr0 Link encap:Ethernet HWaddr 52:54:00:42:67:59
inet addr:192.168.200.1 Bcast:192.168.200.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4225 (4.1 KiB)

virbr1 Link encap:Ethernet HWaddr 52:54:00:81:55:44
inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4225 (4.1 KiB)

vnet0 Link encap:Ethernet HWaddr FE:54:00:BC:32:51
inet6 addr: fe80::fc54:ff:febc:3251/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:109 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:14196 (13.8 KiB) TX bytes:468 (468.0 b)

wlan0 Link encap:Ethernet HWaddr 24:77:03:51:83:B4
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2677:3ff:fe51:83b4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10495 errors:0 dropped:0 overruns:0 frame:0
TX packets:4246 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4119294 (3.9 MiB) TX bytes:1144339 (1.0 MiB)



running brctl show yields:

bridge name bridge id STP enabled interfaces
br0 8000.e4115b32b429 no eth0
vnet0
virbr0 8000.525400426759 yes virbr0-nic
virbr1 8000.525400815544 yes virbr1-nic


At this point, I don't even know what questions to ask, and am hoping that someone who has more experience with VM and network setup can help me get this configured. I am a programmer by profession (30 years) and an Ok linux admin (as least the basic stuff) but this kind of configuration is outside or anything I've done before. Any and all help will be appreciated.

Mike Laris
mglaris@gmail.com
 
Old 10-04-2012, 05:25 AM   #2
cultavix
Member
 
Registered: Feb 2004
Location: England
Distribution: RedHat
Posts: 39

Rep: Reputation: 15
How do you want the guest to connect to machines outside of the Host?

If you want your VM to act like another device on the network then use Bridged. To do this, you will need to create a bridged adapater which will be tied to the host adapater which is on the network you want to connect to.
 
Old 10-04-2012, 07:47 AM   #3
mglaris
LQ Newbie
 
Registered: Oct 2012
Location: Denton, TX
Distribution: CentOS
Posts: 3

Original Poster
Rep: Reputation: Disabled
Allowing the guest to connect to machines outside of the host would be nice, but not absolutly required. I am taking a "one step at a time approach", so just getting the gest to be able to see the host, and the host see the guest would be huge.

That being said, I have tried to setup a bridge, but either did not do it right, or I have some other issue that is preventing it from working. I used the "brctl" command to create a bridge device, br0, that is connected to the eth0 physical device. When seting up the VM I can select NT or Routed, and can select the device. I have tried multiple options here, none of which have worked. I can respond with more details tonight when can run another test.
 
Old 10-04-2012, 08:14 AM   #4
cultavix
Member
 
Registered: Feb 2004
Location: England
Distribution: RedHat
Posts: 39

Rep: Reputation: 15
In this rare case I actually recommend that you use the GUI tool that is built in to KVM.

So if you right click "localhost (QEMU)" and go to "details", then go over to network adapters, click the + symbol for a new adapter, then select Bridge, then add the adapter you want to bridge.... then just add it to your guest.

I used to do it manually myself but some reason having a problem with it on 6.3? It could just be me.

Good luck
 
Old 10-04-2012, 07:13 PM   #5
mglaris
LQ Newbie
 
Registered: Oct 2012
Location: Denton, TX
Distribution: CentOS
Posts: 3

Original Poster
Rep: Reputation: Disabled
Well, that worked rather well. I was not able to get a bridge working, but I was able to get NAT working. I don't know why the bridge is not working, but I will attempt to setup a static route from eth0 to the wireless adapter. I have done that before, between normal (non-wireless) NIC's so I hope I can do it in this scenario as well.

Thank you very much for your help. I did not even know about the detail page for the guest until your post made me examine things a bit more closely. I'll post how things proceed from here.
 
Old 10-05-2012, 05:01 AM   #6
cultavix
Member
 
Registered: Feb 2004
Location: England
Distribution: RedHat
Posts: 39

Rep: Reputation: 15
Good luck!!
 
  


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
RHEL6 KVM Host / guest network doesn't chrism01 Linux - Virtualization and Cloud 2 08-19-2012 09:33 PM
[SOLVED] Host OS unable to connect to Guest OS (virtual machines) in VMware vikas027 Linux - Virtualization and Cloud 18 08-16-2012 08:15 AM
Unable to connect Windows host with guest ubuntu via network pawan613 Linux - General 4 11-27-2011 04:06 PM
Virtualbox CentOS Guest can not connect to Internet from XP Host sokha Linux - Virtualization and Cloud 2 03-30-2010 11:28 PM
Sun VirtualBox: Guest is Unable to Connect to Host By Hostname Cottonwoody Linux - Virtualization and Cloud 5 11-13-2009 11:31 AM


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