?
Solved

CentOS KVM Client Networking Setup

Posted on 2014-02-23
8
Medium Priority
?
790 Views
Last Modified: 2014-03-03
I need some help setting up networking to a KVM Client machine.

I have a laptop with 16GB of RAM, On which CentOS 6.5 is installed, I am accessing the internet via my Wifi. My "wlan0" attributes are (There is no ifcfg-wlan0 in my /etc/sysconfig/network-scripts/ )

wlan0     Link encap:Ethernet  HWaddr 00:25:9C:F4:BB:40  
          inet addr:192.168.1.120  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::225:9cff:fef4:bb40/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3320703 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1811549 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4755265211 (4.4 GiB)  TX bytes:189692669 (180.9 MiB)

i have installed KVM and configured a virtual network "virbr0", which is a default virtual network in KVM.Here is the info
Network : 192.168.122.0/24
DHCP start : 192.168.122.2
DHCP end : 192.168.122.254

#ifconfig on the server shows
virbr0    Link encap:Ethernet  HWaddr 52:54:00:91:1E:AE  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2030 (1.9 KiB)  TX bytes:1818 (1.7 KiB)


Now I have installed a CentOS KVM virtual machine(Client), I dont have any networking configured so how do configure networking on this client so that I can access internet.

THank you
0
Comment
Question by:aanya247
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 25

Accepted Solution

by:
Zephyr ICT earned 2000 total points
ID: 39881798
Is your VM getting a DHCP address from the virbr0? Is your nic enabled on this VM (eg: if you check the ifcfg-eth0 on the VM, does it show as BOOTPROTO=dhcp and ONBOOT=yes)?

Do you want your VM's to be on the same network as your host or?? ...

In any case, most of the time WLAN will not work with bridging, the adapters (most if not all) do not support it.

So if you want your VM to be on the same network as your host you'll need to create a bridge, but you'll need to use eth0 or similar for it ... There's a "workaround" that "might" work explained here ("Alternative setup (might not work, but it's brilliant)") , if you insist on using WLAN... It routes the traffic from a virtual network adapter to eth(x).
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39881815
Most important,, network adapter should be bridged with host adapter so it can connect to outer world.

TY/SA
0
 

Author Comment

by:aanya247
ID: 39884759
My VM is getting the DHCP address and I don't want my VM to be on the same network as my host. Since my laptop is connected to my router and accessing the outside network looks like even if I create a bridge between wlan0 and virbr0, Will this work...So that way my VM can access external network via the bridge, wlan0.
0
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
LVL 13

Expert Comment

by:Sandy
ID: 39884846
Agree.
0
 

Author Comment

by:aanya247
ID: 39884852
Ok let me try it
0
 
LVL 88

Expert Comment

by:rindi
ID: 39885058
If you don't want the VM to be on the same network segment as your host, select NAT under the NIC in the VM's properties. Also make sure you select a "Device Model" NIC that the VM is most likely to have a driver for, for example rtl8139 is common.
0
 

Author Comment

by:aanya247
ID: 39893993
For some reason the bridge didn't work
0
 
LVL 25

Assisted Solution

by:Zephyr ICT
Zephyr ICT earned 2000 total points
ID: 39897115
Are you trying to bridge a Wireless NIC? As I said, this doesn't work with most Wifi cards ... You'll have to use a package called parprouted ...

More info: http://yalb.blogspot.be/2012/04/wireless-bridging-for-kvm.html
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question