Installing on MacOS

Hi,

I’m following MicroK8s - Zero-ops Kubernetes for developers, edge and IoT

When I run microk8s install on Mac OS (Big Sur), I’m having the following output.
Does this mean, the docs are outdated?
How can I fix this?

warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
[2023-06-23T18:50:53.776] [error] [qemu-system-x86_64] Process operation timed out
[2023-06-23T18:50:53.777] [error] [qemu factory] Qemu failed to start: program: qemu-system-x86_64; error: Process operation timed out
launch failed: The following errors occurred:
microk8s-vm: timed out waiting for response
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.

Am I the only one having this issue?

Looks like there is already a multipass VM called microk8s-vm, thus the install operation is failing. Could it be from a previous failed installation attempt?

In any case, ensure you have picked up everything important from microk8s-vm and then try the following:

# delete VM
multipass delete microk8s-vm
multipass purge

# reinstall
microk8s install
2 Likes

Thanks a lot!
This solved the issue.

Interestingly enough I’ve tried the above and it didn’t work for me

❯ clear
❯ multipass info --all
Name:           microk8s-vm
State:          Unknown
IPv4:           --
Release:        --
Image hash:     9930a57427ad (Ubuntu 18.04 LTS)
CPU(s):         --
Load:           --
Disk usage:     --
Memory usage:   --
Mounts:         --
❯ multipass delete microk8s-vm
❯ multipass purge
❯ multipass info --all

❯ microk8s install
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: The following errors occurred:
microk8s-vm: timed out waiting for response
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release. Please update any scripts, etc.
launch failed: instance "microk8s-vm" already exists
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.

What message did you have when you ran following commands?

multipass delete microk8s-vm
multipass purge

Literally no message (which is kind of frustrating) - the above code dump was copied verbatim out of my iTerm window

What if you try with another terminal?
Or you could also try with WSL.

Sorry for missing notification on this thread, @bradtho this sounds like a multipass issue, please create an issue on GitHub - canonical/multipass: Multipass orchestrates virtual Ubuntu instances if possible. Thanks!

As for recovery, I would imagine nuking the existing multipass installation and doing everything from the start is the best bet.