cirruslabs / tart

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

`tart list` questions #776

Closed bartekpacia closed 3 months ago

bartekpacia commented 3 months ago
$ tart list --help
OVERVIEW: List created VMs

I deleted all my VMs under ~/.tart/vms (it is now empty). However tart list (which should only show VMs, as per --help message) still seems to be showing that I have one VM, even though it is an image? Please see an example below:

$ tart list
Source Name                                                                                                          Disk Size State
oci    ghcr.io/cirruslabs/macos-sonoma-xcode:15.3                                                                    90   59   stopped
oci    ghcr.io/cirruslabs/macos-sonoma-xcode@sha256:03e19261894c588f9d478a7cd948992a025c66518189abeb9df501bcdd5ea568 90   59   stopped
$ ls -lAhF ~/.tart/cache/OCIs/ghcr.io/cirruslabs/macos-sonoma-xcode
total 0
lrwxr-xr-x  1 bartek  staff   140B Mar 25 23:41 15.3@ -> /Users/bartek/.tart/cache/OCIs/ghcr.io/cirruslabs/macos-sonoma-xcode/sha256:03e19261894c588f9d478a7cd948992a025c66518189abeb9df501bcdd5ea568
drwxr-xr-x  5 bartek  staff   160B Mar 25 23:41 sha256:03e19261894c588f9d478a7cd948992a025c66518189abeb9df501bcdd5ea568/
  1. Is tart list supposed to show VM images? Perhaps tart vm list and tart image list would be a bit more user-friendly?

  2. tart list shows 2 images, but in fact the first one (ghcr.io/cirruslabs/macos-sonoma-xcode:15.3) is a symlink to ghcr.io/cirruslabs/macos-sonoma-xcode@sha256:03e19261894c588f9d478a7cd948992a025c66518189abeb9df501bcdd5ea568. Is this expected?

fkorotkov commented 3 months ago

tart list shows images from both local and oci "sources". You can use both types of sources for clone command but yon only run local images.

As for the symlinks, yes, it is expected since you can use @sha256 variant for cloning. This is similar to how Docker images are stored via a hash and a human-readable tag.

bartekpacia commented 3 months ago

Thank you for an insanely quick answer!