Terraform Runs Slowly Inside Lima VM (`read udp 127.0.0.1:36068->127.0.0.53:53: i/o timeout`)
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Host OS: macOS 12.3.1
Host arch: arm64
Lima version: 0.9.2
Lima VM OS: Ubuntu 21.10
Lima VM arch: arm64
Attempting to run terraform plan or apply inside a lima VM is very slow while terraform calculates the state of the environment. The code repository is cloned inside the VM (so the performance is not related to file sharing between the host OS and the VM). Just to see if I could narrow down the issue, I tried overriding the VM DNS settings in /etc/resolv.conf to my local router instead of 127.0.0.53 and the issue was fixed. Not sure why the systemd-resolved queries would be so much slower. The difference is very noticeable, with terraform plan taking minutes instead of seconds.
Contributor guide
Assessment
This issue has not been assessed yet.