colima icon indicating copy to clipboard operation
colima copied to clipboard

Setting LIMA_WORKDIR breaks `colima start`

Open bparker98 opened this issue 1 year ago • 1 comments

Description

When you have LIMA_WORKDIR set to a path that is not in the colima VM, it breaks running colima start

For example:

INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0000] creating and starting ...                     context=vm
WARN[0025] error caching dependencies for mantic-debs: error retrieving OS version from vm: error running [lima sh -c grep "^UBUNTU_CODENAME" /etc/os-release | cut -d= -f2], output: "bash: line 1: cd: /home/eabrpar.linux/git: No such file or directory", err: "exit status 1"  context=vm
WARN[0025] falling back to normal package install        context=vm
> bash: line 1: cd: /home/eabrpar.linux/git: No such file or directory
FATA[0026] error starting vm: error at 'creating and starting': error installing packages using mantic-debs: exit status 1 

Unsetting LIMA_WORKDIR fixes the issue.

Colima should probably unset LIMA_WORKDIR to prevent this from causing issues.

Version

colima version 0.6.9 git commit: c3a31ed05f5fab8b2cdbae835198e8fb1717fd0f limactl version 0.22.0 qemu-img version 9.0.1 Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

  • [ ] macOS Intel <= 13 (Ventura)
  • [ ] macOS Intel >= 14 (Sonoma)
  • [ ] Apple Silicon <= 13 (Ventura)
  • [X] Apple Silicon >= 14 (Sonoma)
  • [ ] Linux

Output of colima status

❯ colima status FATA[0000] error retrieving current runtime: empty value

Reproduction Steps

LIMA_WORKDIR=/home/username.linux/git colima start --cpu 6 --memory 8 --mount-type virtiofs --vm-type=vz --vz-rosetta

Expected behaviour

I expect the colima vm to start

Additional context

No response

bparker98 avatar Jun 24 '24 20:06 bparker98