Page 2 of 3

Re: Cannot Connect to internet with Ubuntu guest

Posted: 16. Apr 2012, 00:57
by Perryg
With the guest shut down (not saved state) open the settings for this guest and in the network setting click on the adapter 2 tab and uncheck enabled. If it is already unchecked then let me know.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 16. Apr 2012, 01:08
by surfcast23
I have disabled adapter 2 per your instructions

Re: Cannot Connect to internet with Ubuntu guest

Posted: 17. Apr 2012, 20:33
by surfcast23
retried today with the second adapter disabled and still no connection.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 21. Apr 2012, 22:31
by surfcast23
Does anyone have any suggestions?

Re: Cannot Connect to internet with Ubuntu guest

Posted: 21. Apr 2012, 22:49
by Perryg
Are you sure you deleted the /etc/udev/rules.d/70-persistent-net.rules?
Before you do it again (with the guest shut down and not saved state) Make sure that you have only one network adapter enabled in the guest settings.
Delete the net.rules and shut down the guest, stop VirtualBox wait a minute and try it again.
run ifconfig -a and see if it has only eth0.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 21. Apr 2012, 23:33
by surfcast23
I am positive that I deleted rules.d/70-persistent-net.rules. I checked network settings and there is only one adapter enabled. I have again deleted rules.d/70-persistent-net.rules and only eth0 is showing.

Code: Select all

student@ubuntu:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:97:b8:bd  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:19 Base address:0xd020 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

student@ubuntu:~$ 

Re: Cannot Connect to internet with Ubuntu guest

Posted: 22. Apr 2012, 00:04
by Perryg
OK so now that you have just the one eth0 try running dhclient and see if it will register an address.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 22. Apr 2012, 00:19
by surfcast23
That did it. Thank you so much!. Can you explain how you determined the problem and why the solution worked?

Re: Cannot Connect to internet with Ubuntu guest

Posted: 22. Apr 2012, 00:26
by Perryg
The problem was the network was messed up. Deleting the rules took that out of the equation. Then dhclient requests the dhcp server to give it a new address.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 22. Apr 2012, 00:33
by surfcast23
Thank you again!

Re: Cannot Connect to internet with Ubuntu guest

Posted: 29. Jun 2012, 15:23
by Kamal
surfcast23 wrote:I have disabled adapter 2 per your instructions
Can you please let me know how could you disable adapter 2? I am having the same issue. I have two ethernet connections on my ubuntu guest os.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 29. Jun 2012, 15:26
by Kamal
Perryg wrote:Are you sure you deleted the /etc/udev/rules.d/70-persistent-net.rules?
Before you do it again (with the guest shut down and not saved state) Make sure that you have only one network adapter enabled in the guest settings.
Delete the net.rules and shut down the guest, stop VirtualBox wait a minute and try it again.
run ifconfig -a and see if it has only eth0.
How can I enable only one adapter? I have deleted 70-persistent-net.rules from guest os but still i m getting two ethernet connections named as 'eth0' and 'eth1'. I am also having loopback connection lo.

Below is the vminfo.

Code: Select all

Name:            Ubuntu 10.04.4.1 Server
Guest OS:        Other/Unknown
UUID:            bf9f83a7-80c8-4e23-b0ad-06d82bf81f95
Config file:     /root/VirtualBox VMs/Ubuntu 10.04.4.1 Server/Ubuntu 10.04.4.1 Server.vbox
Snapshot folder: /root/VirtualBox VMs/Ubuntu 10.04.4.1 Server/Snapshots
Log folder:      /root/VirtualBox VMs/Ubuntu 10.04.4.1 Server/Logs
Hardware UUID:   bf9f83a7-80c8-4e23-b0ad-06d82bf81f95
Memory size:     2048MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             on
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           powered off (since 2012-06-29T13:05:19.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0):            SATA Controller
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
Storage Controller Name (1):            IDE Controller
Storage Controller Type (1):            PIIX4
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  2
Storage Controller Port Count (1):      2
Storage Controller Bootable (1):        on
SATA Controller (0, 0): /root/Ubuntu_10_04_4_1_Server.vdi (UUID: a5211900-c9f8-4ee8-b396-8ffe9ada43ba)
IDE Controller (1, 0): Empty
NIC 1:           MAC: 080027C57C53, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0):   name = tcp_2200_22, protocol = tcp, host ip = 192.168.0.1, host port = 2200, guest ip = 192.168.0.2, guest port = 22
NIC 2:           MAC: 080027E456A7, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
VRDE:            enabled (Address 0.0.0.0, Ports 3390, MultiConn: on, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE property: TCP/Ports  = "3390"
VRDE property: TCP/Address = <not set>
VRDE property: VideoChannel/Enabled = <not set>
VRDE property: VideoChannel/Quality = <not set>
VRDE property: VideoChannel/DownscaleProtection = <not set>
VRDE property: Client/DisableDisplay = <not set>
VRDE property: Client/DisableInput = <not set>
VRDE property: Client/DisableAudio = <not set>
VRDE property: Client/DisableUSB = <not set>
VRDE property: Client/DisableClipboard = <not set>
VRDE property: Client/DisableUpstreamAudio = <not set>
VRDE property: H3DRedirect/Enabled = <not set>
VRDE property: Security/Method = <not set>
VRDE property: Security/ServerCertificate = <not set>
VRDE property: Security/ServerPrivateKey = <not set>
VRDE property: Security/CACertificate = <not set>
VRDE property: Audio/RateCorrectionMode = <not set>
USB:             disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
OS type:                             Other
Additions run level:                 0

Guest Facilities:

No active facilities.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 29. Jun 2012, 15:37
by Perryg
@kamal,

The guests NIC is enabled and configured in the guest settings and you should not have the guest running when you make these changes.
You will always have the lo and it will not have a specific eth* because it is available to all NICs involved.

If you need more help with this you need to explain exactly what it is you are trying to do and what you expect the results to be.
I see you have NAT and Host-only which may be proper depending on the above statement.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 29. Jun 2012, 16:27
by Kamal
Perryg wrote:@kamal,

The guests NIC is enabled and configured in the guest settings and you should not have the guest running when you make these changes.
You will always have the lo and it will not have a specific eth* because it is available to all NICs involved.

If you need more help with this you need to explain exactly what it is you are trying to do and what you expect the results to be.
I see you have NAT and Host-only which may be proper depending on the above statement.

Thank you for your response. As I am trying to connect my ubuntu guest os that is running on centos 5.7 host os so that I can access internet of my host os. While making changes I always powered off my guest os. As you can see I have both server os,so I am trying to download packets using wget command but its giving me like unable to resolve host address.

I have used this command

Code: Select all

wget ruby-1.9.2-p290.tar.gz
So I come to know that might be some issue in net connection, so I checked as

Code: Select all

ping -c 5 google 
But its showing unknown host google.

Now I have checked ifconfig -a and its showing eth0,eth1 and lo as output.
curr ipconfig guest.png
curr ipconfig guest.png (11.37 KiB) Viewed 4007 times
Output of my lshw -c network
curr lshw.png
curr lshw.png (8.93 KiB) Viewed 4007 times
same output comes for eth0.

Its shows Network : DISABLED.

Now can you please explain me what can I do to get wget command working that downloads the file. TIA.

Re: Cannot Connect to internet with Ubuntu guest

Posted: 29. Jun 2012, 16:34
by Perryg
Enable the interface. Do you know how in Linux?

Hint: ifup