Skip to content
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

Running docker-machine create just hangs with output ending "COM1 connected to /dev/ttys001" #229

Open
semistrict opened this issue Jul 5, 2020 · 15 comments

Comments

@semistrict
Copy link

I created with command:

docker-machine create --driver xhyve xhyve-test

But I get stuck with this output:

(xhyve-test) Waiting for VM to come online...
(xhyve-test) Waiting on a pseudo-terminal to be ready... done
(xhyve-test) Hook up your terminal emulator to /dev/ttys001 in order to connect to your VM
(xhyve-test) linkname (null)
(xhyve-test) COM1 connected to /dev/ttys001

Nothing happens and I can't connect using docker-machine env.

$ docker-machine --version                       
docker-machine version 0.16.2, build bd45ab1

I am on Catalina 10.15.5

I installed docker-machine-driver-xhyve with homebrew:

brew info docker-machine-driver-xhyve
docker-machine-driver-xhyve: stable 0.4.0 (bottled), HEAD
@Fraballand
Copy link

Hello, I've the exact same issue on the exact same config, did you find the answer?

@KamilKopaczyk
Copy link

In my case it's ending with an error: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting.
I've even tried to do the same with docker-machine-driver-xhyve 0.3.3, because as i recall, there were some issues with this driver in the past, but sadly 0.3.3 doesn't work with newer versions of VirtualBox (6.1.8 in my case).

@Fraballand
Copy link

Fraballand commented Sep 17, 2020

Test it on 2 others Macbook with Catalina and still the same problem.... any news? :/

@alehaa
Copy link

alehaa commented Oct 3, 2020

Same problem on macOS 10.15.7 with brew's docker-machine-driver-xhyve version 0.4.0.

@iworker
Copy link

iworker commented Oct 18, 2020

It seems, the problem is in boot2docker.iso

So, the solution works for me:

  1. Download previous version of boot2docker.iso: https://github.com/boot2docker/boot2docker/releases/tag/v19.03.5
  2. Put the file to the $HOME/.docker/machine/cache/boot2docker.iso
  3. Turn off WiFi (or any other way disable Internet temporarily) – the easiest way to prevent auto-upgrading the boot2docker image;
  4. Run docker-machine create;

Profit!

Also, I found a problem with NFS – the previous boot2docker default mount.nfs command doesn't support 4 version.
It's important to solve the problem because it's running exactly after virtual machine DHCP provides IP address in the creation process and if this step failed then the machine will not be created.

So, I solved this problem here along with other problem: https://github.com/iworker/docker-machine-driver-xhyve/tree/disable-vmcs-shadowing

It's not so easy to run make on the branch but it's possible and it will help ;)

@MuhmdRaouf
Copy link

I have the same error too,

@iworker how can I compile your branch mate, i have tried to compile it with no luck at all, can you share the binary file, please !?

@iworker
Copy link

iworker commented Oct 25, 2020

@MuhmdRaouf Hi! I don't think it's a good idea but I attached binary and created release 0.4.1 in my fork so you can try it: https://github.com/iworker/docker-machine-driver-xhyve/releases/tag/v0.4.1

But I still think it's better idea to configure your own golang environment and compile it in your own machine. Probably, it's better to write what errors did you get and trying to resolve it.

@MuhmdRaouf
Copy link

@iworker Hey, Thanks for the binary you're provided is working fine,
So for the compiling part, I would love to be able to do it myself, to be honest, I have followed the instruction in the readme but it doesn't work, I am using Go 1.15.2

[I] ➜ make install
==> Build vendor/build/lib9p/lib9p.a...
==> Build docker-machine-driver-xhyve...
# runtime/cgo
In file included from gcc_darwin_amd64.c:6:
/usr/local/include/pthread.h:331:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:2: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:331:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:34: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:540:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:2: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
/usr/local/include/pthread.h:540:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
/usr/local/include/pthread.h:200:34: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
make: *** [bin/docker-machine-driver-xhyve] Error 2

and I keep getting these type of errors

@MuhmdRaouf
Copy link

I have made a research about how to solve it and I found this :
export CGO_CPPFLAGS="-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-builtin-requires-header"

and when i tried to compile again i get these errors:

[I] ➜ make install
==> Build vendor/build/lib9p/lib9p.a...
==> Build docker-machine-driver-xhyve...
# github.com/zchee/docker-machine-driver-xhyve/vendor/github.com/zchee/libhyperkit
ld: warning: could not create compact unwind for _caml_start_program: dwarf uses DW_CFA_same_value
Undefined symbols for architecture x86_64:
  "_bigstringaf_blit_from_bytes", referenced from:
      _camlAngstrom__Buffering__feed_string_1388 in mirage_block_ocaml.o
      _camlAngstrom__parse_string_2184 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1968 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1970 in mirage_block_ocaml.o
      _camlBigstringaf__of_string_1486 in mirage_block_ocaml.o
      _camlBigstringaf__blit_from_string_1500 in mirage_block_ocaml.o
      _camlBigstringaf__blit_from_bytes_1508 in mirage_block_ocaml.o
      ...
  "_bigstringaf_blit_to_bigstring", referenced from:
      _camlAngstrom__Buffering__compress_1374 in mirage_block_ocaml.o
      _camlAngstrom__Buffering__grow_1376 in mirage_block_ocaml.o
      _camlAngstrom__Buffering__feed_bigstring_1393 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1972 in mirage_block_ocaml.o
      _camlBigstringaf__copy_1470 in mirage_block_ocaml.o
      _camlBigstringaf__blit_1492 in mirage_block_ocaml.o
      _camlBigstringaf__131 in mirage_block_ocaml.o
      ...
  "_bigstringaf_blit_to_bytes", referenced from:
      _camlBigstringaf__fun_1966 in mirage_block_ocaml.o
      _camlBigstringaf__substring_1476 in mirage_block_ocaml.o
      _camlBigstringaf__to_string_1482 in mirage_block_ocaml.o
      _camlBigstringaf__blit_to_bytes_1516 in mirage_block_ocaml.o
      _camlBigstringaf__131 in mirage_block_ocaml.o
  "_bigstringaf_memcmp_bigstring", referenced from:
      _camlBigstringaf__fun_1964 in mirage_block_ocaml.o
      _camlBigstringaf__memcmp_1524 in mirage_block_ocaml.o
      _camlBigstringaf__131 in mirage_block_ocaml.o
  "_bigstringaf_memcmp_string", referenced from:
      _camlBigstringaf__fun_1962 in mirage_block_ocaml.o
      _camlBigstringaf__memcmp_string_1532 in mirage_block_ocaml.o
      _camlBigstringaf__131 in mirage_block_ocaml.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# github.com/zchee/docker-machine-driver-xhyve/vendor/github.com/zchee/libhyperkit
In file included from _cgo_export.c:3:
/usr/local/include/stdlib.h:133:21: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:142:29: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:161:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:275:23: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:277:29: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:310:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:313:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:317:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:320:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:324:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:328:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:332:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:336:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
/usr/local/include/stdlib.h:340:13: warning: type nullability specifier '_Nonnull' is a Clang extension [-Wnullability-extension]
In file included from _cgo_export.c:4:
In file included from xhyve.go:7:
In file included from vendor/github.com/zchee/libhyperkit/include/xhyve/xhyve.h:33:
In file included from vendor/github.com/zchee/libhyperkit/include/xhyve/support/segments.h:40:
In file included from vendor/github.com/zchee/libhyperkit/include/xhyve/support/misc.h:4:
In file included from /usr/local/include/pthread.h:73:
/usr/local/include/pthread/qos.h:115:17: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]
/usr/local/include/pthread/qos.h:116:9: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]
/usr/local/include/pthread/qos.h:187:17: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]
/usr/local/include/pthread/qos.h:188:9: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]

@Fraballand
Copy link

It seems, the problem is in boot2docker.iso

So, the solution works for me:

1. Download previous version of boot2docker.iso: https://github.com/boot2docker/boot2docker/releases/tag/v19.03.5

2. Put the file to the `$HOME/.docker/machine/cache/boot2docker.iso`

3. Turn off WiFi (or any other way disable Internet temporarily) – the easiest way to prevent auto-upgrading the boot2docker image;

4. Run `docker-machine create`;

Profit!

Also, I found a problem with NFS – the previous boot2docker default mount.nfs command doesn't support 4 version.
It's important to solve the problem because it's running exactly after virtual machine DHCP provides IP address in the creation process and if this step failed then the machine will not be created.

So, I solved this problem here along with other problem: https://github.com/iworker/docker-machine-driver-xhyve/tree/disable-vmcs-shadowing

It's not so easy to run make on the branch but it's possible and it will help ;)

Hi @iworker ! your solution worked well for me! thx a lot!

@jaequery
Copy link

Hi i have the same problem. I tried following the instruction:

  • download the previous boot2docker.iso and place it in the ~/.docker/machine/cache folder
  • turn off wifi
  • docker-machine create

But I get this error:

docker-machine create -d xhyve helloworld
Running pre-create checks...
Creating machine...
(helloworld) Unable to get the latest Boot2Docker ISO release version: Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp: lookup api.github.com: no such host
(helloworld) Copying /Users/jae/.docker/machine/cache/boot2docker.iso to /Users/jae/.docker/machine/machines/helloworld/boot2docker.iso...
(helloworld) Creating VM...
Error creating machine: Error in driver during machine creation: exit status 1

Anyone know what this error means?

@iworker
Copy link

iworker commented Dec 19, 2020

@jaequery Hi
Did you try the second part of my instruction?
There is a problem with using 4th version of NFS driver, so I did a commit with forced using of 3rd version.

You have to compile docker-machine-driver-xhyve using this fix and the problem you got probably will be solved :)

(you can also get compiled binary of the driver here if you don't want to compile it by yourself)

@jaequery
Copy link

@iworker thanks. anyway we can get this resolved without resorting to this type of workaround? because, i think this is currently broken for everyone at this point, as i had the same problem on 2 other macbooks (high sierra, catalina).

@iworker
Copy link

iworker commented Dec 19, 2020

@iworker thanks. anyway we can get this resolved without resorting to this type of workaround? because, i think this is currently broken for everyone at this point, as i had the same problem on 2 other macbooks (high sierra, catalina).

I didn't find better way to solve. Probably it's really broken for everyone but mostly people are using Docker for Mac instead of docker-machine. But for me docker-machine is better solution so I tried to find workaround and use it.

gnawhleinad added a commit to gnawhleinad/dev that referenced this issue Jan 2, 2021
- xhyve has an issue with the latest boot2docker.iso... see machine-drivers/docker-machine-driver-xhyve#229
- bump init initial memory
- force clean
@jmissig
Copy link

jmissig commented Oct 7, 2021

It seems, the problem is in boot2docker.iso

So, the solution works for me:

  1. Download previous version of boot2docker.iso: https://github.com/boot2docker/boot2docker/releases/tag/v19.03.5
  2. Put the file to the $HOME/.docker/machine/cache/boot2docker.iso

Thanks this helped get me on the right path. Fortunately this docker-machine driver includes a bunch of the standard driver commandline flags, so I was able to get the machine created by specifying the boot2docker iso explicitly:

docker-machine create -d xhyve --xhyve-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants