New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable "Cable Connected" checkbox for VirtualBox Networking while running LinuxKit for VirtualBox #2798

Closed
ajeetraina opened this Issue Dec 5, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@ajeetraina
Contributor

ajeetraina commented Dec 5, 2017

Description

While running LinuxKit OS for VirtualBox, VM comes up well on VirtualBox but the interface under service containers doesn't receive IP address as "Cable Connected" option goes unchecked under Virtualbox > Settings > Network > Advanced option.

Steps to reproduce the issue:

  1. Clone the LinuxKit GITHUB repository
git clone https://github.com/linuxkit/linuxkit
  1. Build LinuxKit Tool
$cd linuxkit
$make
  1. Copy LinuxKit Tool under the right directory:
$cp bin/linuxkit /usr/local/bin/
  1. Build the ISO(under linuxkit/example/docker)
$linuxkit build -format iso-bios --name testbox docker.yml 
  1. Running LinuxKit OS on VirtualBox
$linuxkit run vbox --iso testbox.iso

Describe the results you received:

(ns: getty) linuxkit-0800279b1737:~# ctr tasks exec -t --exec-id 502 docker sh
ctr tasks exec -t --exec-id 502 docker sh
/ # docker version
docker version
Client:
 Version:      17.07.0-ce
 API version:  1.31
 Go version:   go1.8.3
 Git commit:   8784753
 Built:        Tue Aug 29 17:40:27 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.07.0-ce
 API version:  1.31 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   8784753
 Built:        Tue Aug 29 17:46:50 2017
 OS/Arch:      linux/amd64
 Experimental: false
/ # ip addr 
ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 08:00:27:9b:17:37 brd ff:ff:ff:ff:ff:ff
3: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
4: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN qlen 1
    link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
    link/ether 02:42:41:0f:b2:c7 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

No IP address got assigned to eth0.

Describe the results you expected:

/ # ip addr
ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:9b:17:37 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::8c8b:496b:cb80:ecfd/64 scope link
valid_lft forever preferred_lft forever
3: tunl0@NONE: mtu 1480 qdisc noop state DOWN qlen 1
link/ipip 0.0.0.0 brd 0.0.0.0
4: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN qlen 1
link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 02:42:41:0f:b2:c7 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 scope global docker0
valid_lft forever preferred_lft forever

Additional information you deem important (e.g. issue happens only occasionally):
Once you manually enable "Cable Connected" option under VirtualBox > Settings > Network > Advanced , the networking works great.

justincormack added a commit to justincormack/linuxkit that referenced this issue Dec 5, 2017

Connect cable on virtualbox networking
fix linuxkit#2798

Signed-off-by: Justin Cormack <justin.cormack@docker.com>

@rn rn closed this in #2799 Dec 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment