Open vcarus opened 8 years ago
@vcarus Thanks issue :) I small fix your comment. sorry.
and, I will investigate the cause from now. Please wait a little :)
Thanks for the comment. I`m working on it just now for the bad markdown.
Still here :)
@vcarus I think your displayed,
rdmsr to register 0x570 on vcpu 0
This means that xhyve is launch properly.
So the cause does not seem to match the contents of the /var/db/dhcpd_leases
.
Could you check whether you have a a6:2e:4b:e:cf:32
in /var/db/dhcpd_leases
?
@vcarus FYI, normal /var/db/dhcpd_leases
contents,
$ cat /var/db/dhcpd_leases
{
name=boot2docker
ip_address=192.168.64.2
hw_address=1,de:5f:75:68:cf:32
identifier=1,de:5f:75:68:cf:32
lease=0x56ab0fb6
}
{
name=boot2docker
ip_address=192.168.64.10
hw_address=1,da:bf:6a:77:cf:32
identifier=1,da:bf:6a:77:cf:32
lease=0x56aa386a
}
{
name=boot2docker
ip_address=192.168.64.9
hw_address=1,ea:2:b7:57:cf:32
identifier=1,ea:2:b7:57:cf:32
lease=0x56aa327c
}
{
name=boot2docker
ip_address=192.168.64.8
hw_address=1,3e:da:82:1d:cf:32
identifier=1,3e:da:82:1d:cf:32
lease=0x56aa3193
}
{
name=boot2docker
ip_address=192.168.64.7
hw_address=1,2a:6d:b:2b:cf:32
identifier=1,2a:6d:b:2b:cf:32
lease=0x56aa20ba
}
{
name=boot2docker
ip_address=192.168.64.6
hw_address=1,4e:a7:12:3a:cf:32
identifier=1,4e:a7:12:3a:cf:32
lease=0x56aa201e
}
{
name=boot2docker
ip_address=192.168.64.5
hw_address=1,8a:ae:d:7f:cf:32
identifier=1,8a:ae:d:7f:cf:32
lease=0x56aa1dab
}
{
name=boot2docker
ip_address=192.168.64.4
hw_address=1,a:ce:f2:5d:cf:32
identifier=1,a:ce:f2:5d:cf:32
lease=0x56aa1d0a
}
{
name=boot2docker
ip_address=192.168.64.3
hw_address=1,1a:cd:41:7e:cf:32
identifier=1,1a:cd:41:7e:cf:32
lease=0x56aa0174
}
nope, it just like this
$ cat /var/db/dhcpd_leases { name=android-2600b9cc922c07dc ip_address=192.168.2.3 hw_address=1,30:75:12:7c:8c:cc identifier=1,30:75:12:7c:8c:cc lease=0x55ff919b } { name=powerdeMBP ip_address=192.168.2.2 hw_address=1,34:36:3b:c6:77:74 identifier=1,34:36:3b:c6:77:74 lease=0x55f9f492 }
@vcarus Why wonder not.. :(
Could you try to make a few times VM, or If you have a Go
environment, would you rebuilding the binary by make
?
e.g.
$ go get github.com/zchee/docker-machine-driver-xhyve
$ cd $GOPATH/src/github.com/zchee/docker-machine-driver-xhyve
$ make
$ make install
@vcarus I missed. Reopen.
Should I rebuild /var/db/dhcpd_leases or somehow? It seems strange because powerdeMBP is no my Mac`s name, just like one of my friends.
I got docker-machine-driver-xhyve by homebrew and GO environment is OK. And I try to make a few times VM.
So I should try to install on go get now?
@vcarus
Yes, I am very interested in what is android-2600b9cc922c07dc
and powerdeMBP
.
Why do you have any clue whether there is it?
So I should try to install on go get now?
If you install by Homebrew, it binary is 0.2.2 stable. I fixed some a bug after release 0.2.2.
android-2600b9cc922c07dc and powerdeMBP seems like one of my Sony phone and one Mac of my friend.
I just uninstall homebrew version of docker-machine-driver-xhyve. And rebuilding the binary by make. Same problem here.
(dockerhost) DBG | Not there yet 60/60, error: IP not found for MAC aa:d7:ab:2d:cf:32 in DHCP leases Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
@vcarus Hmm...
Mac OS X might have been used to sharing folder(?) the /var/db/dhcpd_leases
.
Could you try backup and delete /var/db/dhcpd_leases
, and re-create VM?
e.g.
$ sudo mv /var/db/dhcpd_leases{,.bak}
# Exists check
$ ls /var/db/dhcpd_leases.bak
$ sudo touch /var/db/dhcpd_leases
$ docker-machine -D create --driver xhyve dockerhost
Thanks, I will try it later. Time to get supper :)
@vcarus Have a good time at a supper :)
@zchee Sorry to have a feedback so late. I try to delete /var/db/dhcpd_leases and re-create VM just like you told. Nothing help.
(dockerhost) DBG | Not there yet 60/60, error: IP not found for MAC e6:b7:61:25:cf:32 in DHCP leases Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Same here.
:(
@vcarus What is the result of this command that's now in the state?
$ cat /var/db/dhcpd_leases
empty here.
@vcarus Hmm... This case may be the same as https://github.com/zchee/docker-machine-driver-xhyve/issues/9 but, I do not know yet how to solve :(
BTW, Can you start a successful xhyve? e.g.
git clone https://github.com/mist64/xhyve
cd xhyve
make
and, please edit xhyverun.sh
to this.
#!/bin/sh
# Linux
KERNEL="test/vmlinuz"
INITRD="test/initrd.gz"
CMDLINE="earlyprintk=serial console=ttyS0"
MEM="-m 4G"
SMP="-c 4"
NET="-s 2:0,virtio-net"
#IMG_CD="-s 3,ahci-cd,/somepath/somefile.iso"
#IMG_HDD="-s 4,virtio-blk,/somepath/somefile.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"
ACPI="-A"
#UUID="-U deadbeef-dead-dead-dead-deaddeafbeef"
# Linux
build/xhyve $ACPI $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $UUID -f kexec,$KERNEL,$INITRD,"$CMDLINE"
This script is launch tiny core linux with vmnet.framework
shared network.
(�- //\ Core is distributed with ABSOLUTELY NO WARRANTY. v/ www.tinycorelinux.com
tc@box:~$ Switched to clocksource tsc
Seems xhyve works OK.
@vcarus OK.
Could you post result of this commands?
In tiny core linux
ifconfig
ping google.com
In host (OS X) with other terminal. It remains running the tiny core linux.
cat /var/db/dhcpd_leases
If result of ifconfig
is
eth0 Link encap:Ethernet HWaddr 82:FE:20:2A:CF:32
inet addr:192.168.64.11 Bcast:192.168.64.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:881 (881.0 B) TX bytes:342 (342.0 B)
There should be the IP is in /var/db/dhcpd_leases
.
{
name=box
ip_address=192.168.64.11
hw_address=1,82:fe:20:2a:cf:32
identifier=1,82:fe:20:2a:cf:32
lease=0x56ad1b67
}
Sorry google is blocked right here in China, I ping Baidu instead.
ifconfig eth0 Link encap:Ethernet HWaddr 8A:B1:92:49:CF:32 inet addr:192.168.64.3 Bcast:192.168.64.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20 errors:0 dropped:0 overruns:0 frame:0 TX packets:25 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3834 (3.7 KiB) TX bytes:8550 (8.3 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)
tc@box:~$ ping baidu.com PING baidu.com (180.149.132.47): 56 data bytes 64 bytes from 180.149.132.47: seq=0 ttl=46 time=52.792 ms 64 bytes from 180.149.132.47: seq=1 ttl=46 time=52.665 ms 64 bytes from 180.149.132.47: seq=2 ttl=46 time=52.056 ms 64 bytes from 180.149.132.47: seq=3 ttl=46 time=52.994 ms 64 bytes from 180.149.132.47: seq=4 ttl=46 time=51.391 ms ^C --- baidu.com ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 51.391/52.379/52.994 ms
On my host OS
$ cat /var/db/dhcpd_leases { name=box ip_address=192.168.64.3 hw_address=1,8a:b1:92:49:cf:32 identifier=1,8a:b1:92:49:cf:32 lease=0x56ad1bf2 } { name=boot2docker ip_address=192.168.64.2 hw_address=1,e6:b7:61:25:cf:32 identifier=1,e6:b7:61:25:cf:32 lease=0x56ad18fd }
@vcarus Oh, Why do you have it?
{
name=boot2docker
ip_address=192.168.64.2
hw_address=1,e6:b7:61:25:cf:32
identifier=1,e6:b7:61:25:cf:32
lease=0x56ad18fd
}
It maybe successful launch docker-machine-driver-xhyve
(dockerhost) DBG | Not there yet 60/60, error: IP not found for MAC e6:b7:61:25:cf:32 in DHCP leases Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
xhyve goes OK. I am not so sure about how boot2docker works. I have checked homebrew, boot2docker not installed. VM still cannot be created, strange things...
@vcarus Hmm...
However, If there is name=boot2docker
in /var/db/dhcpd_leases
, docker-machine-driver-xhyve
seems certainly is writing to /var/db/dhcpd_leases
.
Other causes, it does not be able to parse the /var/db/dhcpd_leases
.
but we will succeed, it is strange...
for ((i = 0; i < 100; i++)); do ( echo "count $i" && cat /var/db/dhcpd_leases && sleep ); done;
It is a simple monitoring /var/db/dhcpd_leases
command. 100 repeat.
Could you create VM with the run this command in another terminal window?
@vcarus If you do not get the IP when result of cat
command has changed , it's docker-machine-driver-xhyve
bug.
@zchee Maybe you missed 1 after sleep? for ((i = 0; i < 100; i++)); do ( echo "count $i" && cat /var/db/dhcpd_leases && sleep 1); done;
I delete /var/db/dhcpd_leases, and re-create VM again with the script running in another terminal window. Sorry to find the result of cat command never changed. /var/db/dhcpd_leases keep empty during the creating.
@vcarus Hmm. Why wonder was able to create one-time :(
I will do my best to your successful launching xhyve. but, sorry, information is too little. So, If you have a time, Do you take a screen cast that two of the window is displaying?
I will be away for one day to a meeting. Just leave my Mac for one second... Maybe I will try later. Have a good day :)
@vcarus OK :) I look forward of your screencast.
Have this same issue
https://asciinema.org/a/5bk3emo1o9qfl7t07nq9632qj
Sorry for coming so late...
@vcarus Certainly, the file seems to empty... I do not know why succeeded in writing once :( https://github.com/zchee/docker-machine-driver-xhyve/issues/91#issuecomment-176956229
I have not yet implemented the cleanup of vment
, so when I want to the cleanup of vmnet
, will remove /var/db/dhcpd_leases
and restart OS X.
But still I was successful on next launch.
and @stonevil, Please give some time to think about it.
@zchee Hmm...thanks anyway. I'll keep on watching it too.
@vcarus BTW, Are you familiar with the use of lldb
or gdb
or delve
?
lldb
(or Apple swift lldb
) now supports Go debugging if build from trunk.
gdb
is official support of golang.
delve
is a debugger for the Go.
This problem is not reproduced in my environment. Currently there is no way of debugging :(
So, If you have a time, I'm glad if you try to analysis...
@zchee I really hope to do some debug stuff, but as a beginner of Golang... :( Maybe I shall learn and try it later.
I plan to have a look at https://github.com/nlf/dlite . There may have another solution.
@vcarus Thanks :)
dlite
is also parse /var/db/dhcpd_leases
when GetIP()
.
https://github.com/nlf/dlite/blob/master/utils/hosts.go#L35
Because If you successful launch use dlite
, docker-machine-driver-xhyve
will have something bug
@zchee I have not try dlite yet. Well, due to the same GetIP(), thanks for saving some time for me :)
@vcarus NP :)
have the exact same issue, dlite works fine on the same host
@nocive That's interesting. I'll research dlite internal source. Thanks for the advice and information.
@zchee additional info, both dlite legacy and latest dlite beta (2.0.0-beta8) work
Also, dlite seems to rely on /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address to figure out which subnet to use and which ip to assign to its VM.
@nocive Thanks again :) BTW, sorry I'm never used dlite. What means dlite legacy?
The dlite creator is in the process of refactoring the entire codebase. Old versions of dlite 1.x are significantly different from the new version still in beta phase (2.x). Current master branch is already 2.x.
Good news tho... just managed to successfully create the VM, it seems it just fails when you pass custom options to xhyve (cpus, memory, disk size). Simply using docker-machine -D -d xhyve test
works fine.
@zchee false alarm, the problem was on my side, I was passing --xhyve-memory 4
assuming it was in GB which was causing the entire thing to fail. All works fine now, sorry for the noise in this thread.
@nocive Ah! got it! but I'm glad to heard that :) Thanks for try to use the my xhyve-driver!
No no, thank you for your hard work on this :) :trophy:
@zchee After so many months, I try the repo again. A successful launch~
Got no idea how this happened, but very happy to see it run.
BTW, has official Docker used xhyve itself? What's the advantage of this repo for this time?
the same question, my /var/db/dhcpd_leases
{
name=minikube
ip_address=192.168.64.2
hw_address=1,c2:a5:4e:a:cf:32
identifier=1,c2:a5:4e:a:cf:32
lease=0x5b0ff3fa
}
whether the boot2docker
part is required?
thank you so much
Got a problem here just like #9 But I got no idea how to solve it.
I cannot create a vm.
I run
Then it goes
Here is my environment.
How could I fix it? Thx.