Skip to content

Alpine Docker VM Fails to Start Due to /etc/hosts Move Operation Error #3765

@Manu-bytes

Description

@Manu-bytes

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

  1. Create a new project in GNS3 3.0.5.
  2. Add a Docker VM node using the Alpine Linux image.
  3. Set the Start Command for the node to a simple shell: sh or /bin/sh.
  4. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions