kvm and virtualbox no network connection - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Network Problems (https://www.linux-noob.com/forums/forum-58.html) +--- Thread: kvm and virtualbox no network connection (/thread-260.html) |
kvm and virtualbox no network connection - inittux - 2011-11-21 I reinstalled my whole system cuz I wanted some changes. So I reinstalled kvm and installed a virtual pc. However I do not get a network connection, my virtualpc doesn't get an ip adress. I checked to see if kvm created a bridge and it did: virbr0 Link encap:Ethernet HWaddr 52:54:00:FB:2B:21 I tried creating a bridge manually that causing the loss of all my network connections but I made a backup of the config file luckily. I then tried doing selecting a different virtual network card in kvm for my virtualpc. Same results. I then thought, well let's try installing virtualbox again and see what happens. So I create my virtual pc and install a system and I have the same thing, my virtual pc doesn't get an ip. Not in any network setting. So I figured that the problem is not with kvm and not with virtualbox. But be something else on my system, but find it strange after a fresh install this happens. I don't want an answer, cuz I'd like to figure this out myself but just writing it out to think it through. Cuz I want to be able to learn to fix things myself. So I know it's not the virtual software that's not working right, but have to look somewhere towards my networkcard/network connection. You can reply for tips, but I'll post as soon as I get a bit further. kvm and virtualbox no network connection - hybrid - 2011-11-21 What does ifconfig suggest about your network interfaces? Perhaps the bridge interfaces show up there, and there might be some useful information in that output. kvm and virtualbox no network connection - inittux - 2011-11-21 Code: eth0 Link encap:Ethernet HWaddr F4:6D:04:E5:A7:9B I did look it through but couldn't find anything strange kvm and virtualbox no network connection - hybrid - 2011-11-21 Hmmm... particular odd that virbr0 claims to have an IP address! Is it just the guest that won't get an IP address? Can you configure the guest manually with the given IP address there to get network access (it might be a KVM/VirtualBox DHCP server not running perhaps?)? kvm and virtualbox no network connection - inittux - 2011-11-21 Quote:Hmmm... particular odd that virbr0 claims to have an IP address! Is it just the guest that won't get an IP address? Can you configure the guest manually with the given IP address there to get network access (it might be a KVM/VirtualBox DHCP server not running perhaps?)? Nope won't work either.Yeah it's just the guest not getting an ip Still find it strange that it was working and after a fresh install it no longer worked [img]<___base_url___>//public/style_emoticons/default/huh.png[/img] And on top of that now whenever I bootup a virtualbox machine my whole system crashes so I removed virtualbox and continuing with kvm. I did check my virtual networks in kvm and it shows the following: device name: default device: vbr0 network: 192.168.122.0/24 dhcp start: 192.168.122.2 dhcp stop: 192.168.122.254 fowarding NAT So the bridge is getting an ip, it's not able to distribute an ip for some reason. Will look some more for a virtual dhcp service. kvm and virtualbox no network connection - inittux - 2011-11-23 I did try setting a static ip and when I restart my network my ip shows up but I get no network connection. Setup in the same network as my host/desktop but with a different ip. So I know now that the virtual network card is working. The bridge gets an ip, but it's not giving out ip's. I did check /etc/sysconfig/network-scripts and there's no ifcfg-br0 file there, which I find strange cuz I would think the bridge needs that file. But if the bridge wasn't setup right by kvm it shouldn't get an ip either. Something to think about for myself. kvm and virtualbox no network connection - inittux - 2011-11-24 I found a useful post which brought me to the following information http://wiki.centos.org/HowTos/KVM#head-8424c473b52c407c62d08e8a37406821d05f5862 And I came across the original kvm network document which looks similar to the centos. http://www.linux-kvm.org/page/Networking Will try it out and post the results. kvm and virtualbox no network connection - inittux - 2011-12-01 I went through the kvm quickstart one more time and this time I did it correctly. My birdge is working. I thought it wasn't at first cuz as soon as you setup the brige. The network icon shows there's no network connection. Because I have it setup right now I have a network/internet connection now and my bridge is activated. Code: ~]$ ifconfig Only I setup my vm network card too and rebooted the network on the vm. Still get no ip on my vm though. At least I'm one step further now. Will look into it more later. kvm and virtualbox no network connection - inittux - 2011-12-01 Seems like I didn't understand kvm quite correctly. I mentioned on SLF and seems like I have two bridges now br0(made by me, direct bridge to internet) and vbr0(made by kvm, uses nat). I have two options, I can use vbr0 or br0. Since vbr0 is the default one made by kvm. I'm going to delete the one I made by restore the file ifcfg-eth0 and removing ifcfg-br0. Then restart networking. Then I'll just have to play around with the vm nic settings as far as I understanding it correctly. Here's the post for those who are interested. kvm and virtualbox no network connection - inittux - 2011-12-02 I got it to work with some help from SLF people and using the redhat deployment guide. The important thing to know is that when you install kvm and related software it automatically makes a bridge named(virbr0), this bridge uses NAT networking. So you can connect to internet but others can't connect to your vm. The second bridge is a bridge that's directly connected to your host nic. You can assign this bridge to a vm and others on your network will be able to connect to your vm. Here's the guide how to set that up. The other important thing is how you setup your vm nic. I tried setting up a static but couldn't get that to work and I was confused about nic network configuration. So I got the Red Hat Deployment Guide to help me out. I got it setup and reboot my vm network and now I have network/internet connection. Also I had to # out a rule in my /etc/sysconfig/iptables cuz it blocked my vm from accessing the network on my host. This line: -A FORWARD -j REJECT --reject-with icmp-host-prohibited I'm still going to figure out to get it to work with static ip just to know how to do it. But I can assign ip's to mac's in my router. So not much of a problem. It took a while and some help but I did learn from it :) here's to post on the SLF Cheers!! |