Skip to content

--network lima:shared fails without printing an error when the sudoers file is missing #4167

@AkihiroSuda

Description

@AkihiroSuda
$ limactl start --network lima:shared 
WARN[0000] Template locator "template://_images/ubuntu" should be written "template:_images/ubuntu" since Lima v2.0 
WARN[0000] Template locator "template://_default/mounts" should be written "template:_default/mounts" since Lima v2.0 
? Creating an instance "default" Proceed with the current configuration

$ echo $?
1

Lima just fails without printing an error when --network lima:shared is specified but /etc/sudoers.d/lima is missing.

The error is still printed in the debug log though:

DEBU[0000] Make sure "shared" network is running        
DEBU[0000] "/private/etc/sudoers.d/lima" does not exist; passwordLessSudo error: failed to run [sudo --user root --group wheel --non-interactive true]: exit status 1

Lima v2.0.0-alpha.2, socket_vmnet v1.2.1, macOS 26.0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions