-
Notifications
You must be signed in to change notification settings - Fork 461
Description
Summary
When attempting to run an Alpine Linux Docker container as a GNS3 Docker VM node, the startup sequence fails because the GNS3 server attempts to modify the container's /etc/hosts file using an operation that involves moving/renaming, which is blocked as /etc/hosts is mounted as a tmpfs volume by Docker.
Environment
- GNS3 Version: GNS3 3.0.5 (GUI and Server)
- Operating System (GNS3 Server): [Arch Linux 6.17.9]
- Podman Version: [5.7.0]
- Docker Image Used:
alpine:latest
Steps to Reproduce
- Create a new project in GNS3 3.0.5.
- Add a Docker VM node using the Alpine Linux image.
- Set the Start Command for the node to a simple shell:
shor/bin/sh. - Start the node.
Expected Behavior
The Alpine container should start successfully, execute the /bin/sh command, and be ready to use (e.g., allowing console access).
Actual Behavior (Error)
The node fails to start, and the GNS3 server logs display an error indicating that the move/rename operation on /etc/hosts failed because the resource is busy.
GNS3 Server Log Output:
2025-12-03 17:23:25 ERROR gns3server.compute.docker.docker_vm:637 sed: can't move '/etc/hostsiBgJfa' to '/etc/hosts': Resource busy
2025-12-03 17:23:25 ERROR gns3server.compute.docker.docker_vm:637 / #
2025-12-03 17:23:25 ERROR gns3server.api.routes.compute:133 Compute node error: sed: can't move '/etc/hostsiBgJfa' to '/etc/hosts': Resource busy
Container File System State (Observed inside the container):
The /etc/hosts file is mounted as a tmpfs volume:
/ # mount | grep /etc/hosts
run on /etc/hosts type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
Is there a way to fix this behavior?