Skip to content

Unify Lima user home inside guest for all platforms#3378

Merged
AkihiroSuda merged 1 commit intolima-vm:masterfrom
arixmkii:unify-lima-user-home
Apr 12, 2025
Merged

Unify Lima user home inside guest for all platforms#3378
AkihiroSuda merged 1 commit intolima-vm:masterfrom
arixmkii:unify-lima-user-home

Conversation

@arixmkii
Copy link
Contributor

Fixes #3364

I spent some time trying to understand if this code really makes sense. My conclusion is that it is probably the remains from the times, where the idea of mounting HOST home into GUEST home was explored. Since then there was a decision to have GUEST home separately, because it can be used for Lima GA needs. I could not think of any reason why GUEST home should be different from home directories on other platforms. This change remove all of the Windows specifics for GUEST home directory (keeping all other platform specific parts).

I tested this with integration tests using WSL2 and QEMU https://github.com/arixmkii/qcw/actions/runs/14022917109/job/39274813343

@arixmkii arixmkii force-pushed the unify-lima-user-home branch from 3185091 to b30505b Compare March 24, 2025 17:30
@arixmkii
Copy link
Contributor Author

arixmkii commented Mar 24, 2025

Ok, I see one problem with it now

local username "DOMAINNAME\\Arthu" is not a valid Linux username

So, it would always be /home/lima.linux as host dir, but if this is really a problem, then probably it is better to add OS specific processing to Username trying to extract Username w/o domain instead trying to replicate the Windows Home dir path into Linux path

Create a task for investigation of this.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR unifies the guest home directory across all platforms by removing Windows-specific handling for the guest home directory.

  • Removed Windows-specific logic for transforming the guest home directory in pkg/osutil/user.go.
  • Updated the test in pkg/limayaml/defaults_test.go to always set the home directory using a unified, Linux-style format.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/osutil/user.go Removed Windows-specific home transformation to support a unified guest home path.
pkg/limayaml/defaults_test.go Adjusted test to unconditionally apply the unified home directory format.

@arixmkii arixmkii mentioned this pull request Mar 30, 2025
@AkihiroSuda AkihiroSuda requested a review from a team April 7, 2025 09:09
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 679f248 into lima-vm:master Apr 12, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Test coverage missing for part of User home dir setup login on Windows

3 participants