Skip to content
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

launch failed: Cannot open image file for computing hash #4509

Open
konnta0 opened this issue Apr 22, 2024 · 2 comments
Open

launch failed: Cannot open image file for computing hash #4509

konnta0 opened this issue Apr 22, 2024 · 2 comments

Comments

@konnta0
Copy link

konnta0 commented Apr 22, 2024

Summary

When I executed 'microk8s install --mem=24 --cpu=7' got 'launch failed microk8s' message

What Should Happen Instead?

Installation succeeds with microk8s install command.

Reproduction Steps

  1. execute "microk8s install --mem=24 --cpu=7"
    The output at runtime is as follows.
microk8s install --mem=20 --cpu=7

Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
Retrieving image: 4%
launch failed: Cannot open image file for computing hash
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
launch failed: Downloaded image hash does not match
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.
multipass list
No instances found.

Introspection Report

microk8s inspect
MicroK8s is not installed. Please run `microk8s install`.

Can you suggest a fix?

Retrieving image seemed to be very slow.
Launch failed is displayed in about 4% of cases.
Is there a list somewhere of where to get the images?
I'm thinking of trying if I can change it.

@neoaggelos
Copy link
Member

Hi @konnta0

The microk8s installer uses multipass underneath to spawn a VM. It looks like the error is coming from multipass failing to download the VM image.

Can you try to manually start a multipass VM with multipass launch 20.04? I also wonder if the error you are seeing was transient networking issues.

@konnta0
Copy link
Author

konnta0 commented Apr 23, 2024

@neoaggelos
Thank you for your reply!!
When I tried again, it succeeded in acquiring the image but failed to start...

multipass launch 20.04 -n test
Launched: test

multipass list
Name                    State             IPv4             Image
test                    Running           192.168.108.6    Ubuntu 20.04 LTS

microk8s install --mem=20 --cpu=7
Warning: the "--mem" long option is deprecated in favour of "--memory". Please update any scripts, etc.
Launched: microk8s-vm
ping: snapcraft.io: Temporary failure in name resolution
An error occurred when trying to execute 'sudo ping -c 1 snapcraft.io' with 'multipass': returned exit code 2.

multipass list
Name                    State             IPv4             Image
microk8s-vm             Running           192.168.108.7    Ubuntu 22.04 LTS
test                    Running           192.168.108.6    Ubuntu 20.04 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants