Giter Site home page Giter Site logo

Comments (40)

woutor avatar woutor commented on June 26, 2024 1

Ok, found it. It was the firewall.

I disabled the 'Block all incoming connections' checkbox. I have an IP right now.

Thanks for your help!

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

What is the IP address given by ifconfig in the VM? 192.168.64.X or something different?

Do you have /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist file in your Mac?

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

ifconfig gives the IP address 172.17.42.1. The contents of com.apple.vmnet.plist are as follows:

{
  "Shared_Net_Address" => "192.168.64.1"
  "MAC_IOUE_ARRAY" => [
    0 => {
      "MAC_IOUE_USED" => 1
      "MAC_IOUE" => <aefa1ba0 0592>
    }
  ]
  "Shared_Net_Mask" => "255.255.255.0"
  "MAC_ARRAY" => [
    0 => {
      "MAC_USED" => 1
      "UUID_MAC" => "FDA760BB-5526-2749-88A6-FDD1E2223DDC"
      "MAC_ADDRESS" => <16c1b529 cf32>
      "MAC_TIME_USED" => 2015-10-30 22:20:03 +0000
    }
  ]
}

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

@wjk
The IP address is not for external(host) but internal(Docker).
It should be like 192.168.64.X for eth0 according to com.apple.vmnet.plist.
I think xhyve could not set vmnet(NAT) for your VM correctly.

Could you try a simple example in the original xhyve repository?
https://github.com/mist64/xhyve

$ git clone https://github.com/mist64/xhyve
$ cd xhyve

And uncomment the following line to use eth0.
https://github.com/mist64/xhyve/blob/master/xhyverun.sh#L15

#NET="-s 2:0,virtio-net"

And then run it as follows and ifconfig should be like below.

$ sudo ./xhyverun.sh

tc@box:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr A2:68:E4:45:CF:32
          inet addr:192.168.64.7  Bcast:192.168.64.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3220 (3.1 KiB)  TX bytes:684 (684.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Otherwise it is something wrong with xhyve itself.

BTW,
com.apple.vmnet.plist file format is XML on OSX 10.10.
So it seems something has been changed on OSX 10.11.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

I guess you need xhyve compiled on OSX 10.11 from the repository, not from Homebrew.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Hi @if-kenn ,
I need your help. How about your experience on OSX 10.11?

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Ah, Homebrew version has already been compiled in your OSX... Sorry I'm not familiar with Homebrew.
Hmm...

from boot2docker-xhyve.

if-kenn avatar if-kenn commented on June 26, 2024

I will try and check it out on my El Cap this weekend.

Sent from my iPhone

On Oct 30, 2015, at 4:18 PM, A.I. [email protected] wrote:

Ah, Homebrew version has already been compiled in your OSX... Sorry I'm not familiar with Homebrew.
Hmm...


Reply to this email directly or view it on GitHub.

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

@ailispaw BTW, that file is still XML; the format I gave above is the output of plutil -p, which dumps a property list in a human-readable format. See man plutil for details.

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

When I run a hand-compiled xhyve, ifconfig gives me the following output. Note especially that eth0 gives no IP address. I suspect something deeper is wrong here.

eth0      Link encap:Ethernet  HWaddr B6:2D:D2:0A:CF:32  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1631 (1.5 KiB)  TX bytes:1710 (1.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

@wjk Oh, I've never known plutil. That's good to know.

With the original xhyve example, it will take several seconds to take IP address from DHCP server normally.
Please make sure it and also take a look at /var/db/dhcpd_leases after that.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

If there is still no IP address and no dhcpd_leases, it may be a deeper thing as you said.

You would do better to open an issue at xhyve repository.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Anyway, I still wait for @if-kenn 's reply.

from boot2docker-xhyve.

if-kenn avatar if-kenn commented on June 26, 2024

So I have not had the time to setup a boot2docker-xhyve environment this weekend (I previously moved away from boot2docker since I wanted to be closer to the metal and not have vboxfs killing performance).

I can confirm that the following environment works great for a full LEMP stack:

  • Mac OSX El Capitan (10.11.1)
  • xhyve 0.2.0 (homebrew)
  • DockerRoot 1.1.0
  • docker-root-xhyve 1.1.1

It also seems to be working great on the following:

  • Mac OSX El Capitan (10.10.5)
  • xhyve 0.2.0 (homebrew)
  • DockerRoot 1.0.8
  • docker-root-xhyve 1.1.1

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

@if-kenn How did you do that, again? I tried the exact setup you did, and not only did the guest VM panic immediately (it said something about trying to kill pid 1), I got the exact same “cannot find /var/db/dhcpd_leases” error that started this whole mess!

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Thanks @if-kenn , that's enough for now. It's almost same between boot2docker-xhyve and docker-root-xhyve from the view of xhyve.
How about /var/db/dhcpd_leases on El Capitan (10.11.1)?

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

nlf/dhyve#37 (comment)
There is not an exactly same but similar issue in dhyve repository.
It might be helpful for you. @wjk

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

Actually, I got Docker to work using QEMU. I’m going to be using that program from now on to run my Docker workloads. Thank you for your help nonetheless @ailispaw. If it’s OK with you I would like to close this issue.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

@wjk That's good to know it works for you.
Please let me know if you have something with docker-root and QEMU, though I don't have much experiences with QEMU. :p

Closing is up to you, but I'd like to let it open for someday, someone.

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

Fair enough; I will leave this issue open.

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

Hi,

I tried to run boot2docker-xhyve on El Capitan. The VM starts, but is does not get an IP address:

eth0      Link encap:Ethernet  HWaddr 16:C1:B5:29:CF:32  
          inet6 addr: fe80::14c1:b5ff:fe29:cf32/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:669 (669.0 B)  TX bytes:1784 (1.7 KiB)

Apparently, the dchp_leases file cannot be found:

MacBook-Pro:boot2docker-xhyve wouter$ make ip
awk: can't open file /var/db/dhcpd_leases
 source line number 17

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Hi @woutor,

I see inet6 addr in your output of ifconfig eth0 instead of inet addr.
I guess there is something different in your network configuration.
How about /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist?

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

Hi @ailispaw,

This is my /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>MAC_ARRAY</key>
    <array>
        <dict>
            <key>MAC_ADDRESS</key>
            <data>
            FsG1Kc8y
            </data>
            <key>MAC_TIME_USED</key>
            <date>2016-01-26T11:14:46Z</date>
            <key>MAC_USED</key>
            <false/>
            <key>UUID_MAC</key>
            <string>FDA760BB-5526-2749-88A6-FDD1E2223DDC</string>
        </dict>
        <dict>
            <key>MAC_ADDRESS</key>
            <data>
            MnDLVs8y
            </data>
            <key>MAC_TIME_USED</key>
            <date>2016-01-26T10:24:01Z</date>
            <key>MAC_USED</key>
            <false/>
            <key>UUID_MAC</key>
            <string>5CB21FA0-193A-5947-A47A-2E353E51807D</string>
        </dict>
    </array>
    <key>MAC_IOUE_ARRAY</key>
    <array>
        <dict>
            <key>MAC_IOUE</key>
            <data>
            iliMxlv/
            </data>
            <key>MAC_IOUE_USED</key>
            <false/>
        </dict>
    </array>
    <key>Shared_Net_Address</key>
    <string>192.168.64.1</string>
    <key>Shared_Net_Mask</key>
    <string>255.255.255.0</string>
</dict>
</plist>

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Hmm, it looks same as mine.
something else... may be NAT setting

How about /etc/bootpd.plist before and after booting up the VM?

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

My /etc/bootpd.plist before booting the VM:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>bootp_enabled</key>
    <false/>
    <key>detect_other_dhcp_server</key>
    <false/>
    <key>dhcp_enabled</key>
    <false/>
    <key>dhcp_ignore_client_identifier</key>
    <true/>
    <key>use_server_config_for_dhcp_options</key>
    <false/>
</dict>
</plist>

After booting the VM:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Subnets</key>
    <array>
        <dict>
            <key>_creator</key>
            <string>com.apple.NetworkSharing</string>
            <key>allocate</key>
            <true/>
            <key>dhcp_domain_name_server</key>
            <array>
                <string>192.168.64.1</string>
            </array>
            <key>dhcp_router</key>
            <string>192.168.64.1</string>
            <key>interface</key>
            <string>bridge100</string>
            <key>lease_max</key>
            <integer>86400</integer>
            <key>lease_min</key>
            <integer>86400</integer>
            <key>name</key>
            <string>192.168.64/24</string>
            <key>net_address</key>
            <string>192.168.64.0</string>
            <key>net_mask</key>
            <string>255.255.255.0</string>
            <key>net_range</key>
            <array>
                <string>192.168.64.2</string>
                <string>192.168.64.254</string>
            </array>
        </dict>
    </array>
    <key>bootp_enabled</key>
    <false/>
    <key>detect_other_dhcp_server</key>
    <array>
        <string>bridge100</string>
    </array>
    <key>dhcp_enabled</key>
    <array>
        <string>bridge100</string>
    </array>
    <key>dhcp_ignore_client_identifier</key>
    <true/>
    <key>ignore_allow_deny</key>
    <array>
        <string>bridge100</string>
    </array>
    <key>use_server_config_for_dhcp_options</key>
    <false/>
</dict>
</plist>

Btw:

MacBook-Pro:~ wouter$ cat /var/db/dhcpd_leases
cat: /var/db/dhcpd_leases: No such file or directory

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

How are they after booting up?

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

Sorry, just added that

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Oh, that looks good. still no /var/db/dhcpd_leases?

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

Nope..

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Hmm..

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Could you try https://github.com/ailispaw/docker-root-xhyve and see /var/log/messages in the VM?

from boot2docker-xhyve.

woutor avatar woutor commented on June 26, 2024

Note that I have disabled all my Sharing options in my Mac settings and also have enabled my firewall to block all incoming connections. I will check if changing those settings helps..

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

@woutor Sounds nice. Thanks. :)

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

All my Sharing options are disabled, too. But no firewall on my end.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Wow!! I'm happy to hear that. But it's strange, isn't it?
Thank you so much for your trying.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Hi @wjk,
How about your case?

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

If the "Block all incoming connections" is checked in the Firewall Options...

The firewall will block all sharing services, such as file sharing, screen sharing, Messages Bonjour, and iTunes music sharing. If you want to allow sharing services, click “Firewall Options…” and deselect the “Block all incoming connections” checkbox.

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

Just "Firewall: On" is fine for xhyve's vmnet and dhcpd to work.

from boot2docker-xhyve.

wjk avatar wjk commented on June 26, 2024

@ailispaw Honestly, I haven’t used boot2docker in months. I switched to Vagrant when I realized there is no easy way to mount my source directory in a Docker image that (a) doesn’t require constantly rebuilding images (which wastes disk space) and (b) makes two-way transfer of files between container and host OS possible. (My use-case for Docker was an easy-to-setup Linux VM for cross-development purposes.)

from boot2docker-xhyve.

ailispaw avatar ailispaw commented on June 26, 2024

@wjk
Yeah, I use Vagrant + VirtualBox + DockerRoot for my projects mainly, too.

But boot2docker-xhyve and docker-root-xhyve mount /Users in the VM by NFS.
So they can solve (a) and (b) like docker run -v $(pwd):/host ... in your Mac directly.

from boot2docker-xhyve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.