Host-Only Networking as 2nd adapter, no IP address assigned

Postings relating to old VirtualBox pre-releases
Post Reply
revoman
Posts: 5
Joined: 10. Dec 2010, 19:46
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu

Host-Only Networking as 2nd adapter, no IP address assigned

Post by revoman »

I've been using the VirtualBox 3.2.x series for a long while now. Earlier this week I installed the 4 Beta to test some of the new features. The significant parts of my configuration are as follows:

Host: XP 32-bit
Guest: Ubuntu 10.04_1
Audio: disabled
3d accelleration: enabled
USB support: disabled
NIC1: NAT, 82540EM
NIC2: Host-Only, 82540EM

The problem is that once Ubuntu is started the 2nd adapter does not get an IP address from DHCP. This configuration worked in VBox 3.2.10.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by Perryg »

edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot
revoman
Posts: 5
Joined: 10. Dec 2010, 19:46
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by revoman »

I deleted all but my primary device and rebooted. Ubuntu showed a warning that the "Wired Device Disconnected"..

I've attached a pic of the Nic config window from VBox, and below is ifconfig from ubuntu.


developer@developer-laptop:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:0b:54:28
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe0b:5428/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1691 errors:0 dropped:0 overruns:0 frame:0
TX packets:1724 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:488974 (488.9 KB) TX bytes:366988 (366.9 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:87:3c:fb
inet6 addr: fe80::a00:27ff:fe87:3cfb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:91 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13731 (13.7 KB) TX bytes:3546 (3.5 KB)

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:1145 errors:0 dropped:0 overruns:0 frame:0
TX packets:1145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:576886 (576.8 KB) TX bytes:576886 (576.8 KB)
Attachments
NicConfig.jpg
NicConfig.jpg (72.83 KiB) Viewed 6607 times
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by Sasquatch »

If you're running a server version, then you don't have X nor a network manager to configure the interface. Configure it with /etc/network/interfaces and reboot the VM. Config will then be applied.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
revoman
Posts: 5
Joined: 10. Dec 2010, 19:46
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by revoman »

Thank you for the continued help. I am using the desktop version of Ubuntu and was able to verify the interface is working by configuring a static IP using the NetworkManager Applet inside the guest.

However, I believe the interface (2nd adapter, host-only config) should work when configured as "DHCP" inside the guest. But it is not.

I have been using this particular VM for the last 6 months. Under the 3.2.X releases of VirtualBox everything worked as expected. The 2nd interface (configured as Host-Only) would properly get an IP from the VirtualBox DHCP server. Once I installed the 4.0.1 beta, my virtual machine could no longer retrieve an IP from the VirtualBox DHCP server for that interface config.

Does this still sound like an Ubuntu config error?
ThomasD
Posts: 13
Joined: 2. Jun 2010, 21:47
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Arch Linux x86_64

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by ThomasD »

I have the same issue with an Arch Linux x86_64 guest. Host is Windows 7 64bit.
First adapter is NAT, second is Host-only. On retrieving an IP address for the second, dhcpcd times out.
Things worked in 3.2.8 and before.
Shadowww
Posts: 32
Joined: 27. Nov 2010, 13:38
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Various

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by Shadowww »

Unrelated, but may I ask why you use Intel PRO/1000 MT and not virtio-net? Latter performs way better.
revoman
Posts: 5
Joined: 10. Dec 2010, 19:46
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by revoman »

I didn't know how easy it was to setup virtio for a linux guest. After reading your comment I tried it and have been very pleased with the result.
Rui Baptista
Posts: 63
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux, ...

Re: Host-Only Networking as 2nd adapter, no IP address assigned

Post by Rui Baptista »

Too late for beta :oops: , anyway:

Host-Only is not working with win7-64 host and ubuntu, winXP clients

winXP [ type PCnet-FAST III ]:
1st adapter NAT, 2nd adapter Host-Only: got 169.254.x.x address for H-O, no connection to host (log)
Host-Only adapter alone: 169.254.x.x address, no host
1st adapter Host-Only, 2nd adapter NAT: 169.254.x.x address, no host

ubuntu [ type Intel PRO/1000 ]:
1st adapter NAT, 2nd adapter Host-Only: ERROR (image / log) and, later, got ipv6 address with internet AND host working (log)
Host-Only adapter alone: ipv6 address with NO connection to host
1st adapter Host-Only, 2nd adapter NAT: ipv6 address with internet AND host working


Host-Only Networking as 2nd adapter was working great in 3.2.12

Reverting to 3.2.12 everything went fine, so this is not a config issue

Should a bug be open?


RB
Attachments
report.zip
3 logs and 1 image
(46.23 KiB) Downloaded 48 times
Post Reply