Skip to content

[Bug]: TestCLINetwork issue with vmnet when testing prune + run commands #953

@saehejkang

Description

@saehejkang

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Capture the logs with command below

log stream --debug --info --predicate 'subsystem = "com.apple.NetworkSharing"'

Then the set of commands below similar to the prune test

#! /bin/bash -x

container system stop
container system start
container network rm in-use unused
container network create in-use
container network create unused
container run --name in-use-server --network in-use --rm -d -p 127.0.0.1:8000:8000 python:slim python3 -m http.server --bind 0.0.0.0 8000
container ls
container network rm unused
container stop in-use-server
container network rm in-use
container run --name default-server --rm -d -p 127.0.0.1:8000:8000 python:slim python3 -m http.server --bind 0.0.0.0 8000 
sleep 3
curl http://localhost:8000

Current behavior

The curl at the end fails, and the OS logs show that the container interface for default-server didn't get configured.

2025-12-08 13:37:56.572274-0300 0x3a2c3    Debug       0x0                  38322  0    InternetSharing: [com.apple.NetworkSharing:daemon] netrbCreateInterface: network handle was passed in
2025-12-08 13:37:56.572233-0300 0x3a27c    Info        0x0                  38321  0    com.apple.Virtualization.VirtualMachine: (Netrb) [com.apple.NetworkSharing:framework.netrb] _NETRBNetworkStartVirtualMachineInterface: adding virtual interface to network 0x7eac48140
2025-12-08 13:37:56.572285-0300 0x3a2c3    Default     0x0                  38322  0    InternetSharing: [com.apple.NetworkSharing:daemon] netrbCreateInterface: no network related to id
2025-12-08 13:37:56.572315-0300 0x3a27c    Default     0x0                  38321  0    com.apple.Virtualization.VirtualMachine: (Netrb) [com.apple.NetworkSharing:framework.netrb] _NETRBNetworkStartVirtualMachineInterface_block_invoke_2: interface creation failed

Expected behavior

TestCLINetwork pass and the default-server gets configured, when running the commands based on steps for reproduction

Environment

- OS: 26.1
- Xcode: 26.1.1
- Container: Local branch from https://github.com/apple/container/pull/914

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions