Solved

CentOS KVM Client Networking Setup

Posted on 2014-02-23
8
728 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 25

Accepted Solution

by:
Zephyr ICT earned 500 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
 
LVL 13

Expert Comment

by:Sandy
ID: 39884846
Agree.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

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

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 500 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now