# voxl-emulator won't start

Source: https://forum.modalai.com/topic/536/voxl-emulator-won-t-start
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2021-11-01 21:10:54 UTC by jaredjohansen
Replies: 1 · Views: 1029

## jaredjohansen · 2021-11-01 21:10:54 UTC

I have an Ubuntu 20.04 machine with docker installed.

I have followed [these instructions](https://docs.modalai.com/install-voxl-docker/) to install `voxl-docker`.

I have downloaded the latest voxl-cross, voxl-emulator, and voxl-hexagon from [here](https://developer.modalai.com/asset).  I have used `docker load` to create docker images from each of these tar.gz files.

When I try to run the emulator, it gives me the error below:
```
jared@jared-ubuntu:~/voxl-docker$ docker images 
REPOSITORY          TAG       IMAGE ID       CREATED          SIZE
voxl-hexagon        v1.1      f5790a3358ca   19 minutes ago   6.38GB
voxl-emulator       v1.7      c0709663abe6   20 minutes ago   3.4GB
voxl-cross          v1.1      77eda1fa0a0e   21 minutes ago   1.06GB
roskinetic-xenial   v1.0      bfb82886c74f   21 months ago    1.63GB
registry            0.9.1     56cfd79a53f5   5 years ago      423MB
jared@jared-ubuntu:~/voxl-docker$ voxl-docker -i voxl-emulator:v1.7 -e "/bin/bash"
launching image: voxl-emulator:v1.7 with the following command:
docker run --rm -it --net=host --privileged -w /home/jared --volume=/dev/bus/usb:/dev/bus/usb -e LOCAL_USER_ID=0 -e LOCAL_USER_NAME=root -e LOCAL_GID=0 -v /home/jared/voxl-docker:/home/root:rw -w /home/root voxl-emulator:v1.7 /bin/bash

docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown.
```

As I understand it, It's telling me that there is no such thing as /bin/bash in the container.  I don't really believe that is true, because this [webpage](https://docs.modalai.com/install-voxl-docker/#use-of-voxl-docker-script) uses the `bash` command: `voxl-docker -i voxl-emulator -e "/bin/bash build.sh"`.

Can you help me understand what I am doing wrong (and why this is not working)?

===============

What I am trying to (eventually) do is to build my own docker image (in Ubuntu) that I can `adb push` to my VOXL and run it there.  As I understand it, if I `docker build <path_to_my_own_dockerfile>` on my Ubuntu machine, once I transfer it to the VOXL, it won't work because the architecture is not the same.

If I want to `docker build` on my Ubuntu machine and have it work on the VOXL, I believe I will need to run the voxl-emulator and `docker build` inside of that.  Is that correct?

## Reply by jaredjohansen · 2021-11-01 22:28:21 UTC

Update: I completely [removed docker](https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker) and voxl-docker from my system.

I rebooted, [reinstalled docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04), and [followed these steps to install voxl-docker](https://docs.modalai.com/install-voxl-docker/).

Now, I get a different error (same as [here](https://forum.modalai.com/topic/414/can-t-run-the-voxl-emulator-docker-image/4)) :
```
jared@jared-ubuntu:~/voxl-docker$ voxl-docker -i voxl-emulator -e "/bin/bash"
launching image: voxl-emulator with the following command:
docker run --rm -it --net=host --privileged -w /home/jared --volume=/dev/bus/usb:/dev/bus/usb -e LOCAL_USER_ID=0 -e LOCAL_USER_NAME=root -e LOCAL_GID=0 -v /home/jared/voxl-docker:/home/root:rw -w /home/root voxl-emulator /bin/bash

standard_init_linux.go:228: exec user process caused: exec format error
```
 
I followed the instructions at the [link](https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/).  The first two commands ran without any issues.  I had to modify the last one to fit my architecture:
```
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

jared@jared-ubuntu:~/voxl-docker$ docker run --rm -t amd64/ubuntu uname -m
Unable to find image 'amd64/ubuntu:latest' locally
latest: Pulling from amd64/ubuntu
7b1a6ab2e44d: Pull complete 
Digest: sha256:7cc0576c7c0ec2384de5cbf245f41567e922aab1b075f3e8ad565f508032df17
Status: Downloaded newer image for amd64/ubuntu:latest
x86_64
```

That worked.  Now the voxl-emulator appears to work too:
```
jared@jared-ubuntu:~/voxl-docker$ voxl-docker -i voxl-emulator -e "/bin/bash"
launching image: voxl-emulator with the following command:
docker run --rm -it --net=host --privileged -w /home/jared --volume=/dev/bus/usb:/dev/bus/usb -e LOCAL_USER_ID=0 -e LOCAL_USER_NAME=root -e LOCAL_GID=0 -v /home/jared/voxl-docker:/home/root:rw -w /home/root voxl-emulator /bin/bash

+ USER_ID=0
+ USER_NAME=root
+ GID=0
+ getent group 0
root:x:0:
+ echo 'Starting with UID : 0'
Starting with UID : 0
+ useradd --shell /bin/bash -u 0 -g 0 -o -c '' -M root
useradd: user 'root' already exists
+ addgroup root users
+ export HOME=/home/root
+ HOME=/home/root
+ ls -ld /home/root
drwxrwxr-x 8 james host_group 4096 Nov  1 21:45 /home/root
+ echo 'root ALL=(ALL) NOPASSWD: ALL'
+ ls -l /etc/sudoers.d/
total 8
-rw-r--r-- 1 root root 30 Nov 23  2020 james
-rw-r--r-- 1 root root 29 Nov  1 22:26 root
+ cat /etc/sudoers.d/root
root ALL=(ALL) NOPASSWD: ALL
+ chmod 777 /tmp
+ chmod 711 /usr/bin/sudo
+ chmod +s /usr/bin/sudo
+ ls -l /usr/local/bin/su-exec
-rwxr-xr-x 1 root root 7660 Aug 14  2018 /usr/local/bin/su-exec
+ ls -l /bin/bash
-rwxrwxrwx 1 root root 959344 Aug 12  2018 /bin/bash
+ echo 'exec /usr/local/bin/su-exec root /bin/bash'
exec /usr/local/bin/su-exec root /bin/bash
+ exec /usr/local/bin/su-exec root /bin/bash
bash-4.3# 
```
