Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/hostagent/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/lima-vm/lima/v2/pkg/ioutilx"
"github.com/lima-vm/lima/v2/pkg/limatype"
"github.com/lima-vm/lima/v2/pkg/sshutil"
)

type mount struct {
Expand Down Expand Up @@ -76,6 +77,10 @@ func (a *HostAgent) setupMount(ctx context.Context, m limatype.Mount) (*mount, e
// 2. these errors still imply additional coms over mux socket, which resulted sftp-server to fail more often statistically during test runs.
// It is reasonable to disable this on Windows if required feature is not fully operational.
rsf.SSHConfig.Persist = false

// HostAgent's `sshConfig` already has some ControlMaster related args in `AdditionalArgs`,
// so it is necessary to remove them to avoid overrides above `Persist=false`.
rsf.SSHConfig.AdditionalArgs = sshutil.DisableControlMasterOptsFromSSHArgs(rsf.SSHConfig.AdditionalArgs)
}
if err := rsf.Prepare(); err != nil {
return nil, fmt.Errorf("failed to prepare reverse sshfs for %q on %q: %w", resolvedLocation, *m.MountPoint, err)
Expand Down
Loading