Closed candlerb closed 5 years ago
I think there's a mismatch between where the mgmt container wants things mounted, and the VM rancher/vm-rancheros
container.
Looking at the CGI, the VM container is started using volumes_from
. But if I manually start the VM container with the shared volume mounted under /ranchervm/vm
, it works:
docker run -e "RANCHER_VM=true" --cap-add NET_ADMIN -v \
/var/lib/rancher/vm:/ranchervm/vm --device /dev/kvm:/dev/kvm \
--device /dev/net/tun:/dev/net/tun rancher/vm-rancheros
OK, I see what the problem is - the published VM images are outdated, and do not reflect what's in the git repository.
In git, image/base/startvm has
VNC="-vnc unix:/vm/$DOCKERID/vnc"
echo VNC server will listen on Unix socket /vm/$DOCKERID/vnc
and in image/base/Dockerfile this is copied to /var/lib/rancher/startvm
But in the running container started from rancher/vm-rancher
on docker hub, /var/lib/rancher/startvm
says:
VNC="-vnc unix:/ranchervm/vm/$DOCKERID/vnc"
echo VNC server will listen on Unix socket /ranchervm/vm/$DOCKERID/vnc
I think just pushing rebuilt images would fix this. (An opportunity to update vm-ubuntu to 16.04 as well...)
VNC console support was refactored as part of the migration to Kubernetes. There is also a new UI with clearly visible console/novnc button.
(This is with docker
17.09.0~ce-0~ubuntu
under Ubuntu 16.04)I start RancherVM management GUI as per instructions - except on a different port since I'm already using 8080 for rancher:
Then I connect to
<dockerhost>:8123
, click on "create instance", and the instance is created fine. However in the instance listing, there is no option to connect to its console; only "Stop" is offered.But the article shows that I should see a "Console" link for running containers:
If I look inside the container:
... I see that the VNC socket is being written under a path under
/ranchervm
. However, this path is not accessible to the management container as far as I can tell.That is, the path
/ranchervm
is in its own, randomly-named docker volume. The directory/vm
, which is shared between the management container and the VM container (and is/var/lib/rancher/vm
on the host), is empty.Any suggestions for where I should look?