finch icon indicating copy to clipboard operation
finch copied to clipboard

finch vm init errors on macOS Ventura

Open leighmcculloch opened this issue 2 years ago • 5 comments

Describe the bug

Running finch vm init results in errors.

Steps to reproduce

finch vm init

Expected behavior

Finch vm is initialized.

Screenshots or logs

❯ finch vm init
INFO[0000] binaries directory doesn't exist             
INFO[0000] Requesting root access to finish network dependency configuration 
Password:
INFO[0005] sudoers file not found: %!w(*fs.PathError=&{open /etc/sudoers.d/finch-lima 2}) 
ERRO[0005] Dependency error: failed to install dependencies: [Failed to finish installing rootful dependencies which are needed for external network access within the guest OS. Boot will continue, but container exposed ports will not be accessible from macOS.: [error changing owner of directory /opt/finch, err: exit status 1, stderr: sudo: chown: command not found
]] 
INFO[0005] Initializing and starting Finch virtual machine... 
ERRO[0025] Finch virtual machine failed to start, debug logs: time="2022-12-06T22:46:27-08:00" level=info msg="Terminal is not available, proceeding without opening an editor"
time="2022-12-06T22:46:27-08:00" level=info msg="Starting socket_vmnet daemon for \"finch-shared\" network"
time="2022-12-06T22:46:27-08:00" level=info msg="Attempting to download the image from \"/Applications/Finch/os/Fedora-Cloud-Base-37-1.7.aarch64.qcow2\"" digest="sha256:cc8b0f49bc60875a16eef65ad13e0e86ba502ba3585cc51146f11f4182a628c0"
time="2022-12-06T22:46:28-08:00" level=info msg="Downloaded the image from \"/Applications/Finch/os/Fedora-Cloud-Base-37-1.7.aarch64.qcow2\""
time="2022-12-06T22:46:30-08:00" level=info msg="Attempting to download the nerdctl archive from \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\"" digest="sha256:e4c9b9434c88847f4d18f8b84c0d073555e4c949546cfa8a21e719de67afdf70"

49.85 MiB / 187.53 MiB (26.58%) ? p/s
105.54 MiB / 187.53 MiB (56.28%) 11.14 MiB/s
160.52 MiB / 187.53 MiB (85.60%) 11.13 MiB/s
187.53 MiB / 187.53 MiB (100.00%) 15.09 MiB/stime="2022-12-06T22:46:48-08:00" level=info msg="Downloaded the nerdctl archive from \"https://github.com/containerd/nerdctl/releases/download/v1.0.0/nerdctl-full-1.0.0-linux-arm64.tar.gz\""
time="2022-12-06T22:46:48-08:00" level=error msg="[hostagent] failed to run [system_profiler SPNetworkDataType -json]: stdout=\"\", stderr=\"\": exec: \"system_profiler\": executable file not found in $PATH" fields.level=fatal
time="2022-12-06T22:46:48-08:00" level=fatal msg="host agent process has exited: exit status 1" 
FATA[0025] exit status 1                                

Additional context Add any other context about the problem here.

leighmcculloch avatar Dec 07 '22 06:12 leighmcculloch

exec: "system_profiler": executable file not found in $PATH

You may need /usr/sbin in the $PATH

AkihiroSuda avatar Dec 07 '22 07:12 AkihiroSuda

Fixed in

  • https://github.com/lima-vm/lima/pull/1226

AkihiroSuda avatar Dec 07 '22 07:12 AkihiroSuda

We will fix this in an upcoming release after upstream fix is merged.

vsiravar avatar Dec 07 '22 18:12 vsiravar

Thanks @vsiravar. Looks like upstream is merged now.

leighmcculloch avatar Dec 08 '22 06:12 leighmcculloch

Thanks @leighmcculloch , we will include this in our next release. I will leave a note on this ticket when we have the next release.

vsiravar avatar Dec 08 '22 17:12 vsiravar

@leighmcculloch This is fixed in version v0.2.0. I ran a sanity test on macOS13

 % brew reinstall --cask finch
 % finch vm init
INFO[0000] binaries directory doesn't exist             
INFO[0000] Requesting root access to finish network dependency configuration 
INFO[0000] sudoers file not found: open /etc/sudoers.d/finch-lima: no such file or directory 
INFO[0002] Initializing and starting Finch virtual machine... 

 % finch version 
Client:
 Version:	v0.2.0
 OS/Arch:	linux/arm64
 GitCommit:	16b894813b74f8ce97a21ff9cf170df86b70d861
 nerdctl:
  Version:	v1.1.0
  GitCommit:	18944bc70784dfa83010d37054d75487a58ab581
 buildctl:
  Version:	v0.10.6
  GitCommit:	0c9b5aeb269c740650786ba77d882b0259415ec7

Server:
 containerd:
  Version:	v1.6.12
  GitCommit:	a05d175400b1145e5e6a735a6710579d181e7fb0
 runc:
  Version:	1.1.4
  GitCommit:	v1.1.4-0-g5fd4c4d1

 % sw_vers
ProductName:		macOS
ProductVersion:		13.0
BuildVersion:		22A380

Hope this helps.

vsiravar avatar Jan 12 '23 17:01 vsiravar

Closing because of no response. Feel free to reopen.

ningziwen avatar Apr 03 '23 21:04 ningziwen