Docker Community Forums

Share and learn in the Docker community.

Is it possible to ssh to the xhyve machine?


(Synic) #1

I’ve got a process eating all my resources, it’d be helpful to finding it if I could run ps fax on the host VM.

Using the VM container
(Rohinton Kazak) #2

Hi not sure about ssh, but you can enter the xhyve based vm with the
following command;


note: I have tried to setup alternative ‘escape’ sequences to exit out of
the vm but I am
having trouble doing so.

No docker0 interface on Mac OSX 10.3 high Sierra
(Tobias Gesellchen) #3

I use CTRL+A CTRL+\ followed by “y” to exit the vm and the screen session.

(Rohinton Kazak) #4

Hi, Thanks for the information.

(Ktwalrus) #5

I use:

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh

to enter the docker VM on my Mac.

Once in the VM, you can use tools like ‘top’ to watch the processes running in the VM. The VM is a stripped down version of Alpine Linux so you can even install any debugging tools you want using the Alpine package manager.

(Walker Lee) #6

I build a minimize nsenter image, it’s only 582kB.

docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n sh

(Setrar) #7

I use halt to shutdown the xhyve vm. Docker stops and restarts by itslef

(Foucault DE BONNEVAL) #8

I made a Sysdig image to introspect that kind of issue :

(Rui Ma) #9

It’s awesome ! Thanks a lot !

(Deanunnotech) #10

Thanks this wordked for me!!

(Juber) #11

just to add to detach use ‘ctrl-a’ ‘d’

(P711) #12

This leaves a screen session behind, and if you create a new one screen starts to misbehave by losing characters, probably a flow control problem?

Anyway, Ctrl-A Ctrl-\ y works better. What works even better is @walkerlee’s solution.

(Andy Madge) #13

In some recent release of Docker the location seems to have changed. It’s now:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty