traderepublic / Cilicon

🛠️ Self-Hosted ephemeral macOS CI on Apple Silicon
MIT License
969 stars 29 forks source link

"home" could not be copied #28

Closed torarnv closed 1 year ago

torarnv commented 1 year ago
image

After running for the first time.

torarnv commented 1 year ago

Also, this, which looks worrying:

image
torarnv commented 1 year ago

The default config has vmClonePath: /Users/torarne/vmclone, but it looks like the code expects it to be / terminated, otherwise it tries to create /Users/torarne/vmclonehome, /Users/torarne/vmcloneusr, etc

torarnv commented 1 year ago

This is scary:

image
Marcocanc commented 1 year ago

Would you mind sharing your full cilicon.yml file so I can try to look into it (feel free to redact any confidential info)?

torarnv commented 1 year ago

I installed the app, ran it for the first time, got this:

image

Entered a local tart VM name (ventura-vanilla:13.4) based on

❯ tart list
Source Name                         Size Running
local  monterey-vanilla:12.6        18   false
local  sonoma-vanilla:14.0-23A5257q 31   false
local  sonoma-vanilla:14.0-beta     18   false
local  ventura-vanilla:13.4         16   false

Which generated:

❯ cat ~/cilicon.yml
provisioner:
  type: script
  config:
    run: echo Hello World && sleep 10 && echo Shutting down
hardware:
  ramGigabytes: 8
  display:
    width: 1920
    height: 1200
    pixelsPerInch: 80
  connectsToAudioDevice: false
directoryMounts: []
source: ''
vmClonePath: /Users/torarne/vmclone
editorMode: false
retryDelay: 3
sshCredentials:
  username: admin
  password: admin

Which put this in my home dir:

drwxr-xr-x@   2 torarne  staff     64 Jun 27 16:19 vmclone
lrwxr-xr-x@   1 torarne  staff     25 Jun 27 12:08 vmclonehome -> /System/Volumes/Data/home
drwxr-xr-x@   3 torarne  staff     96 Jun 27 16:19 vmcloneusr
Marcocanc commented 1 year ago

That'll likely be the issue. If you want to use a local (non-cached OCI) image from tart you will need to enter its path (~/.tart/vms/...). It doesn't currently support taking names directly as used in tart but it would be a good addition in the future. I will probably add a validation of the entered path before proceeding in the future.

torarnv commented 1 year ago

Ah, that fixed it yes! Thanks! A very strange failure mode though :D Would perhaps make sense to fix/improve regardless of whether plain named tart images are supported. Perhaps a quick check whether the path exists if it's not an oci image.

torarnv commented 1 year ago

The problem seemed to be that source: '' was empty, so it tried to clone home. It's now source: ~/.tart/vms/ventura-vanilla:13.4

Marcocanc commented 1 year ago

Great, is it working? If so we can close the issue.

torarnv commented 1 year ago

Yepp, works for me now :) Thanks!