-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start colima, when path of home folder contains BLANK #724
Comments
I just completed a patch for Colima to use the XDG_Base_Dirs specification if things like XDG_CONFIG_HOME are defined in the environment. It also falls back on using the Go stdlib os.UserConfigDir() and os.UserCacheDir(), which should point to your ~/Library/Application Support and ~/Library/Caches folders on macOS, if you're not using the XDG... I haven't yet tested it on a HOME with spaces in the path, but I'll take a look. |
As a work-around, you can try setting the environment variable
as this may be a problem in the upstream Lima tool, rather than in Colima. |
It is most likely an upstream issue. @bigguyong can you share the generated lima config located at |
I think you are setting I know for a fact that having spaces in |
I'm wondering if you are using If you just want to specify the path to qemu, then a better mechanism (IMO) would be to simply put the directory for the binaries at the front of the |
xxxx@c0496 ~ % cat
|
Ooh, I may see a problem here, not sure.The shell variable $FILE is not inside quotation marks in that sed command. Depends which shell is running that, but could trip on the spaces in the path to the .colima directory.----On May 29, 2023, at 12:45 AM, Patrick Gu ***@***.***> wrote:
~/.lima/colima/lima.yaml
***@***.*** ~ % cat /.lima/colima/lima.yaml
vmType: qemu
arch: aarch64
images:
- location: https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.5/alpine-lima-clm-3.18.0-aarch64.iso
arch: aarch64
digest: sha512:84c93e8aaa09446618bf87daa993e260da69b50e95670aed5df6671b2cff9464810752cbf70f6ee5ddf9d3e1c91d98104b3c573cc024c5f0687ad3f4d2e93ebc
- location: https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.5/alpine-lima-clm-3.18.0-x86_64.iso
arch: x86_64
digest: sha512:f761b807fe9ba345968df72c07f8c5abcae0c4a44976fe5595c0ff748ef693841221a70e663986c700b027cea32b7cac24d5490d4c721593c39f2b8840c362a2
cpus: 2
memory: 2GiB
disk: 60GiB
mounts:
- location: ""
writable: true
- location: /tmp/colima
writable: true
mountType: reverse-sshfs
containerd:
system: false
user: false
dns:
- 192.168.107.1
firmware:
legacyBIOS: false
hostResolver:
enabled: false
hosts:
host.docker.internal: host.lima.internal
portForwards:
- guestPortRange:
- 0
- 0
guestSocket: /var/run/docker.sock
hostPortRange:
- 0
- 0
hostSocket: /Users/AAAAAA BB/.colima/default/docker.sock
proto: tcp
- guestPortRange:
- 0
- 0
guestSocket: /var/run/docker.sock
hostPortRange:
- 0
- 0
hostSocket: /Users/AAAAAA BB/.colima/docker.sock
proto: tcp
- guestIPMustBeZero: true
guestIP: 0.0.0.0
guestPortRange:
- 1
- 65535
hostIP: 0.0.0.0
hostPortRange:
- 1
- 65535
proto: tcp
- guestIP: 127.0.0.1
guestPortRange:
- 1
- 65535
hostIP: 127.0.0.1
hostPortRange:
- 1
- 65535
proto: tcp
provision:
- mode: system
script: sysctl -w fs.inotify.max_user_watches=1048576
- mode: user
script: sudo usermod -aG docker $USER
- mode: system
script: grep -q "^rc_env_allow" /etc/rc.conf || echo 'rc_env_allow="*"' >> /etc/rc.conf
- mode: system
script: |
#!/usr/bin/env sh
# set -x
FILE=/etc/network/interfaces
BACKUP="$FILE.bak"
# this only happens one in the beginning
if [ ! -f "$BACKUP" ]; then
cp "$FILE" "$BACKUP"
fi
# reset the network file
cp "$BACKUP" "$FILE"
validate_ip() {
# Add basic IP address validation, make sure it is in 192.168.106.0/24 subnet
echo $1 | grep -q -E "^192.168.106.(([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$"
return $?
}
update_iface_to_static() {
# update the interface from dhcp to static ip address
local IFACE=$1
local IP_ADDRESS=$2
local FILE=$3
sed -i "/iface $IFACE inet dhcp/d" $FILE
sed -i "/^auto $IFACE/a iface $IFACE inet static\n address $IP_ADDRESS\n netmask 255.255.255.0\n gateway 192.168.106.1\n" $FILE
}
set_iface_to_dhcp() {
# update interface to using dhcp
local IFACE=$1
cat >>$FILE <<EOF
auto $IFACE
iface $IFACE inet dhcp
EOF
}
set_iface_to_static() {
local IFACE=$1
local IP_ADDRESS=$2
# default subnet is 192.168.106.0/24
# default gateway is 192.168.106.1
cat >>$FILE <<EOF
auto $IFACE
iface $IFACE inet static
address $IP_ADDRESS
netmask 255.255.255.0
gateway 192.168.106.1
EOF
}
written() (
grep -q "^auto ${1}" "${FILE}"
)
vmnet() (
IFACE="col0"
if written $IFACE; then
if [ "$IFACE" == "col0" ]; then
update_iface_to_static $IFACE $COLIMA_IP $FILE
fi
exit 0;
fi
if [ "$IFACE" == "col0" ]; then
if [ -n "$COLIMA_IP" ]; then
if validate_ip "$COLIMA_IP"; then
set_iface_to_static $IFACE $COLIMA_IP
else
set_iface_to_dhcp
fi
else
set_iface_to_dhcp
fi
else
set_iface_to_dhcp
fi
)
gvproxy() (
IFACE=$(ifconfig -a | grep 'HWaddr 5A:94:EF:3C:99:E6' | awk -F' ' '{print $1}')
if written $IFACE; then exit; fi
cat >>$FILE <<EOF
auto $IFACE
iface $IFACE inet static
address 192.168.107.2
netmask 255.255.255.0
gateway 192.168.107.1
metric 200
EOF
)
vmnet
gvproxy
service networking restart
- mode: system
script: mkmntdirs && mount -a
- mode: system
script: readlink /sbin/fstrim || fstrim -a
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Description
Unable to start colima, seems caused by the home folder's path, it contains a BLANK. For privacy reason, I replace the path name of home folder to "AAAAA BB"
{"level":"debug","msg":"Creating iso file /Users/AAAAA BB/.lima/colima/cidata.iso","time":"2023-05-24T17:31:03+08:00"}
{"level":"debug","msg":"Using /var/folders/rk/35js3v794kq79srwrx20mj800000gp/T/diskfs_iso3638406399 as workspace","time":"2023-05-24T17:31:03+08:00"}
{"level":"debug","msg":"Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon.","time":"2023-05-24T17:31:03+08:00"}
{"level":"debug","msg":"OpenSSH version 9.0.1 detected","time":"2023-05-24T17:31:04+08:00"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing [email protected] and [email protected]","time":"2023-05-24T17:31:04+08:00"}
{"level":"warning","msg":"Specifying args ([BB/.colima/_wrapper/3a9197e1ca3cd2da076da2b473d7a7eb118e2cca/bin/qemu-system-aarch64]) via $QEMU_SYSTEM_AARCH64 is supported only for debugging!","time":"2023-05-24T17:31:04+08:00"}
{"level":"fatal","msg":"exec: "/Users/AAAAA": stat /Users/AAAAA: no such file or directory","time":"2023-05-24T17:31:04+08:00"}
Version
Colima Version: 0.5.5
Lima Version:0.15.1
Qemu Version:8.0.0
Operating System
Output of
colima status
FATA[0000] colima is not running
Reproduction Steps
Expected behaviour
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: