lima-vm / lima-vm/lima

Fail to start VM when user is not valid Linux username

Open
#407 4 comments 3 reactions 1 assignee Claimed by @alexandear View on GitHub
bug
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

Hi,
My current username on my company's laptop is `DOUGLAS`.
At startup, using this command: `limactl start default`, I have this log message:

`local user "DOUGLAS" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" username instead`

And then the startup script freezes in the `ssh` requirement step :

```
INFO[0026] SSH Local Port: 60022
INFO[0026] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0055] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0065] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0075] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
```

Looking at the `/Users/DOUGLAS/.lima/default/serial.log` file I can see those errors in the log file:

```
[ 10.971908] cloud-init[653]: 2021-11-10 20:08:02,846 - util.py[WARNING]: Failed to create user lima
[ 10.978792] cloud-init[653]: 2021-11-10 20:08:02,853 - util.py[WARNING]: Running module users-groups () failed
```
and little after

```
[ 23.293950] cloud-init[1092]: + sudo -iu lima XDG_RUNTIME_DIR=/run/user/502 systemctl --user enable --now dbus
[ 23.308990] cloud-init[1092]: sudo: unknown user: lima
[ 23.310206] cloud-init[1092]: sudo: error initializing audit plugin sudoers_audit
[ 23.311112] cloud-init[1092]: LIMA| WARNING: Failed to execute /mnt/lima-cidata/boot/40-install-containerd.sh
[ 23.312583] cloud-init[1092]: LIMA| Exiting with code 1
```

Here is the complete [serial.log.zip](https://github.com/lima-vm/lima/files/7518478/serial.log.zip) log file to help you with this issue.

Using another, user whose name fits the regex (I tried with `talend_comprod`), works on the same laptop.

Thanks for your help

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.