cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.67k stars 103 forks source link

Fatal error: Duplicate values for key in `tart ip` command #739

Closed ncs29 closed 4 months ago

ncs29 commented 4 months ago

I am using packer to build tart VMs. This was working fine, and suddenly, packer build started failing while waiting for SSH availability in Tart VM.

When I tried to get the VM ip using tart ip <vm> command, I get the below error. However, I am able to fetch the IP from the UI window and use that to ssh into the VM. Can you please help with this?

VM List

╰─ tart list
Source Name                                                                                                              Size State
local  monterey-builder-vm:1.0                                                                                           23   running
local  monterey-vanilla-1                                                                                                23   stopped
oci    ghcr.io/cirruslabs/macos-monterey-vanilla:latest                                                                  25   stopped
oci    ghcr.io/cirruslabs/macos-monterey-vanilla@sha256:a68903a36eea8a2f303ce02951863a48762192eaa80ee03b82ff34f3b65f02d6 25   stopped

Error

╰─ tart ip monterey-builder-vm:1.0
Swift/arm64e-apple-macos.swiftinterface:13885: Fatal error: Duplicate values for key: '5e:36:da:fa:8b:7b'
[1]    23825 trace trap  tart ip monterey-builder-vm:1.0

Version details Tart Version: 2.6.0 (via Homebrew) OS Version: MacOS Sonoma (14.3.1) Hardware: Macbook Pro (M2 Max)

ncs29 commented 4 months ago

Update: this issue is resolved now. Steps to fix:

  1. Stop all running tart VMs
  2. Delete the dhcp leases file (rm -f /var/db/dhcpd_leases)
  3. Start VM