Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455902 - app-emulation/virtualbox-4.1.22: Cannot ping from host to guest because of ifconfig location change
Summary: app-emulation/virtualbox-4.1.22: Cannot ping from host to guest because of if...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C)
Depends on:
Reported: 2013-02-06 20:25 UTC by David Parrish
Modified: 2014-02-16 13:31 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description David Parrish 2013-02-06 20:25:04 UTC
It appears that host-only networking broke after the ifconfig binary changed locations from /sbin to /bin.  The temporary fix for me is to symlink ifconfig into /sbin.

The problem I was having was trying to ping the host from the guest os.  I tried two different guests with the same issue.

Reproducible: Always

Steps to Reproduce:
1. Update gentoo system to the point where the ifconfig binary was moved into /bin
2. Use virtualbox to setup a host-only guest.  (I used Vagrant)
3. Try to ping the guest (or if you use Vagrant, ssh into the guest and try to ping the host)
4. Notice that the destination will be unreachable.
Actual Results:  
# ping -c 3 
PING ( 56(84) bytes of data. 
From icmp_seq=1 Destination Host Unreacheable 
From icmp_seq=2 Destination Host Unreacheable 
From icmp_seq=3 Destination Host Unreacheable 

--- ping statistics --- 
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2001ms pipe 3

Expected Results:  
A successful ping.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2013-02-06 21:36:21 UTC
Please provide your emerge --info
Comment 2 David Parrish 2013-02-06 22:15:48 UTC
Portage (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
System uname: Linux-3.6.11-gentoo-x86_64-AMD_Phenom-tm-_II_N970_Quad-Core_Processor-with-gentoo-2.1
Timestamp of tree: Mon, 21 Jan 2013 05:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
CFLAGS="-march=amdfam10 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif git gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv ipv6 jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline sdl session socialweb spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xinerama xml xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5.3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 3 Greg Kubaryk 2013-02-09 02:43:28 UTC
The problem seems to be that =sys-apps/net-tools-1.60_p20120127084908 moved /sbin/ifconfig to /bin/ifconfig, and VirtualBox has a hard-coded path to the old location.  If you check the VirtualBox source:

kurly@smile ~/VirtualBox-4.1.22 $ grep '/sbin/ifconfig' -R src/apps
src/apps/adpctl/VBoxNetAdpCtl.cpp:#define VBOXADPCTL_IFCONFIG_PATH "/sbin/ifconfig"

There is a hard-coded path to the old location.  It is unclear whether the "correct" solution is to patch VirtualBox, add a symlink, or move ifconfig back.  This issue also exists in ~amd64's VirtualBox, which at the time of this writing is 4.2.6.  If you use the latest net-tools, VirtualBox's host-only networking is broken on both amd64 and ~amd64.
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2013-02-09 17:25:46 UTC
+*virtualbox-4.2.6-r1 (09 Feb 2013)
+  09 Feb 2013; Lars Wendler <>
+  virtualbox-4.1.22-r1.ebuild, virtualbox-4.1.24.ebuild,
+  virtualbox-4.2.4-r1.ebuild, -virtualbox-4.2.6.ebuild,
+  +virtualbox-4.2.6-r1.ebuild:
+  Fixed location of ifconfig binary. Thanks to David Parrish for reporting this
+  in bug #455902 and to Greg Kubaryk for pointing out where the fix needs to be
+  applied.
I've revbumped virtualbox-4.2.6 to -r1. Users of older versions please re-emerge the version you're using.
Comment 5 Fabio Rossi 2013-02-09 20:14:44 UTC
what about the virtualbox-bin version?
Comment 6 Matteo 'The Peach' Pescarin 2013-02-10 20:48:16 UTC
(In reply to comment #5)
> what about the virtualbox-bin version?

maybe a new ticket needs to be raised? 
I'm using the -bin version and I've got the same problem.
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2013-02-11 07:37:18 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > what about the virtualbox-bin version?
> maybe a new ticket needs to be raised? 
> I'm using the -bin version and I've got the same problem.

You should report this problem to upstream. There's nothing we can do in the virtualbox-bin package to fix this problem and good luck to convince base-system to move ifconfig back or add a symlink because of a package where's a perfectly useable open source alternative available.