Fedora Linux Support Community & Resources Center
  #1  
Old 4th October 2012, 04:55 PM
hashbangbinbash Offline
Registered User
 
Join Date: Oct 2012
Location: London
Posts: 12
linuxfirefox
vm's cannot connect to internet

Hi Forum

Hoping for advise, I have just installed Fedora 17 on my Laptop and installed VMM on it to run virtual machines. I have now got a Redhat vm running on VMM running on Fedora 17, it's all very vanilla and I have made no changes from the default. The laptop connects via a network.

The laptop can connect to the internet, I'm posting from it now, but the virtual machine will not even enable "System eth0", the two green dots spin and spin but in the end the red 'x' remains.

Not sure what to check... how would you proceed?

Last edited by hashbangbinbash; 4th October 2012 at 05:05 PM.
Reply With Quote
  #2  
Old 4th October 2012, 05:45 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfirefox
Re: vm's cannot connect to internet

I gave up on NetworkManager for the same reason.

Turning it off allowed me to configure the network as needed, and to turn on forwarding for the system (this is what is failing, for some reason, NM appears to turn it off).
Reply With Quote
  #3  
Old 4th October 2012, 09:56 PM
trigpoint Offline
Registered User
 
Join Date: Dec 2004
Location: Shropshire, UK
Posts: 699
linuxfirefox
Re: vm's cannot connect to internet

The usual problem is you need to use NAT networking, bridged doesn't work with wifi.
Reply With Quote
  #4  
Old 5th October 2012, 07:02 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfirefox
Re: vm's cannot connect to internet

With me it was the forwarding. Not using bridged. I am using NAT with the internet interface though.
Reply With Quote
  #5  
Old 5th October 2012, 07:37 AM
Dutchy Online
Registered User
 
Join Date: Aug 2011
Posts: 1,009
linuxfirefox
Re: vm's cannot connect to internet

Does the following command bring back a 1 or a 0?
PHP Code:
sysctl net.ipv4.ip_forward 
It should be a one.
You should also check the the virbr0 interface:
PHP Code:
ip addr show virbr0 || ifconfig virbr0 
Reply With Quote
  #6  
Old 5th October 2012, 11:39 AM
hashbangbinbash Offline
Registered User
 
Join Date: Oct 2012
Location: London
Posts: 12
linuxfirefox
Re: vm's cannot connect to internet

Quote:
Originally Posted by Dutchy View Post
Does the following command bring back a 1 or a 0?
PHP Code:
sysctl net.ipv4.ip_forward 
It should be a one.
You should also check the the virbr0 interface:
PHP Code:
ip addr show virbr0 || ifconfig virbr0 
Thanks for assistance all!

Dutchy, on the host I get the following...

Quote:
[root]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
[root]# ip addr show virbr0 || ifconfig virbr0
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether fe:54:00:93:2d:49 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
[root]#
so '1', and 'up'. Also I am using a wired connection (turned off wireless) and 'Virtual Network Default: NAT' is set as the NIC in Virtual Machine Manager. Here's a pic of my connection details in VMM, to me everything looks fine...



The virtual machine should be issued an IP on the internal range via DHCP. Not sure how to check if this service is running on the host. Note that the first time I set this up everything just worked, so not sure why not this time. :-/

---------- Post added at 11:39 AM ---------- Previous post was at 09:40 AM ----------

I wondered if the problem was dhcpd not issuing an IP, so I checked with 'service dhcpd status', got the following result...

dhcpd.service
Loaded: error (Reason: No such file or directory)
Active: inactive (dead)

I figured that maybe I should enable it then so...

# systemctl enable dhcpd.service
Failed to issue method call: No such file or directory

So enabling dhcpd didn't work. Besides, does'nt Virtual Machine Manager not take care of dhcp for vm's by acting as heir dhcp server or something?

Last edited by hashbangbinbash; 5th October 2012 at 09:45 AM.
Reply With Quote
  #7  
Old 5th October 2012, 01:21 PM
anishjp Offline
Registered User
 
Join Date: Sep 2009
Location: Johannesburg, South Africa
Posts: 255
windows_7firefox
Re: vm's cannot connect to internet

Hi

I used to have similar issue with vm machine in KVM connecting to the internet using NAT. This is what I did!

Shut down the virtual machine. Open up the virtual networks window (the picture above). Stop the default connection (press the red button). Start the default connection again (the play button next to stop button). Then start the virtual machine! Network is up!
__________________
Host Machine
OS: Fedora 20, Desktop: Gnome, Kernel: 3.11.fc20.x86_64, Processor: Intel i3-2100 @ 3.10GHz, RAM: 8GB
Motherboard: ASUS P8H61-M LE/USB3, Display: Mecer LCD 1280x1024, Benq LCD 1280x1024, Hisense LCD 1920x Graphics: ATI Radeon HD 5450
Reply With Quote
  #8  
Old 5th October 2012, 02:02 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfirefox
Re: vm's cannot connect to internet

Ignore the sysctl value. Look to see what the actual kernel value is:

cat /proc/sys/net/ipv4/ip_forward

It should be a 1, and may be 0 even if sysctl says it should be a 1.

sysctl uses the file /etc/sysctl.conf for information. This is only loaded into the kernel during boot. Again, the value in the file may not be the value in the system - so look at the real value.
Reply With Quote
  #9  
Old 5th October 2012, 03:27 PM
hashbangbinbash Offline
Registered User
 
Join Date: Oct 2012
Location: London
Posts: 12
linuxfirefox
Re: vm's cannot connect to internet

Thanks all for assistance.

I managed to sort if out by connecting host Laptop directly to the LAN instead of through a Switch. Actually that's wrong, to be more precise: Laptop -> Switch now, and NOT Laptop -> Switch -> Switch).

Not sure why this should have been a problem as the vm was in it's own little NAT world inside the host Laptop, so as far as the outside world is concerned it's the host talking and being talked to, right.

I'm terrible at anyting to do with networking though, it's possible I just got something I have even now failed to properly grasp completely arse about tit.

Last edited by hashbangbinbash; 5th October 2012 at 03:30 PM.
Reply With Quote
Reply

Tags
connect, internet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fc15, bridged networking for VM's. Gangrif Servers & Networking 2 23rd October 2011 08:57 PM
Bridged Networking unreliable in VM's skbenja Servers & Networking 1 1st October 2010 09:41 AM
Linux/Windows and VM's ScottMartin Using Fedora 5 7th September 2007 07:15 PM
unable to connect to internet,able to connect through windows XP Narasimha Servers & Networking 1 4th October 2005 12:16 AM
unable to connect to internet,able to connect through windows XP Narasimha Servers & Networking 0 3rd October 2005 06:35 PM


Current GMT-time: 17:38 (Wednesday, 17-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat