Skip to content

VM readiness check fails on WSL mirrored networking #280

@lstocchi

Description

@lstocchi

When starting a VM on WSL when having the mirrored networking set, it fails to verify ssh

> .\bin\macadam-windows-amd64.exe start twsl4
machine did not transition into running state: ssh error: machine is not listening on ssh port

However if you execute

> .\bin\macadam-windows-amd64.exe ssh twsl4

everything works as expected.

There is a known WSL/mirrored issue that makes call to localhost really slow
microsoft/WSL#10844
microsoft/WSL#10855

When attempting to connect by name "localhost" (which is what we do in macadam), the IPv6 address ::1 is likely resolved first. But mirrored networking does not support IPv6 localhost address ::1 (https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking).
The suggestions is to replace localhost to 127.0.0.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Ready for review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions