lima-vm / lima-vm/lima

Home dir not mounting anymore with 1.2.1 when local username is not a valid Linux username

Open
#3,833 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

I've tried recreating my local VM with lima 1.2.1 (using https://cloud.debian.org/images/cloud/bookworm/20250804-2194/debian-12-genericcloud-arm64-20250804-2194.qcow2) and to my surprise my home is not mounting anymore.

When I create the VM I get:

```
WARN[0000] local username "patryk.malek@abc.com" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]*$"); using "lima" instead
```

and when it creates the VM, host home dir exists in the VM but it's empty:

```
lima
bash: line 1: cd: /Users/patryk.malek@abc.com/project: No such file or directory
lima@lima-lima:/Users/patryk.malek@abc.com$ ls -la
total 8
drwxr-xr-x 2 root root 4096 Aug 14 11:38 .
drwxr-xr-x 3 root root 4096 Aug 14 11:38 ..
```

I've tried mounting the dir to `/home/lima.linux` but that is empty as well:

```
mounts:
# Also tried
# - location: "{{.Home}}"
# writable: true
- location: "/tmp/lima"
writable: true
- location: "{{.Home}}/project"
mountPoint: "/home/lima.linux/project"
writable: true
```

```
lima@lima-lima:~$ pwd
/home/lima.linux
lima@lima-lima:~$ ls -la project/
total 8
drwxr-xr-x 2 lima root 4096 Aug 14 11:38 .
drwxr-xr-x 4 lima root 4096 Aug 14 11:38 ..
```

How do I mount the home dir (or its subdir) now?

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.