Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CentOS KVM Client Networking Setup

Posted on 2014-02-23
8
Medium Priority
?
804 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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.
Suggested Courses

610 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