Virtualbox in Container, RDP connection to VM running inside VB inside the container does not work

Viewed 188

I created a docker image, where Virtualbox is running inside of a Docker Container (Base Image is a modified Ubuntu-20.04)

I fixed everything regarding creating the image and now my Virtual Machines are running inside the Container. Now I am trying to access these via RDP from the Host (also Ubuntu 20.04), via rdesktop.

The command running the Image is:

docker run -d --privileged --name vbox --device /dev/vboxdrv:/dev/vboxdrv -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /tmp:/tmp -v ~/machines:/machines -p 3389:3389 -it vboxsystemd

The VM started headless with vboxmanage startvm nameofvm --type headless, vrde is on and the port is 3389

I got the IP of the container by docker inspect vbox, then i tried connecting it by typing rdesktop ip:3389

It just says it cannot connect, and I have no idea how I could fix this.

Currently I am only running 1 VM, which I imported from the local Virtualbox, where it is working without any problems. It is also starting without problems inside the container.

Thanks in advance for helping me.

0 Answers
Related