canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.54k stars 635 forks source link

start failed: cannot start VM without an image #3410

Open pchar opened 4 months ago

pchar commented 4 months ago

Describe the bug cannot start VM cp for example

❯ multipass list Name State IPv4 Image

cp Stopped -- Ubuntu 22.04 LTS

❯ multipass start cp start failed: cannot start VM without an image

Expected behavior What did you expect to happen? the vm should start ...

files seams to be present on file system /var/root/Library/Application Support/multipassd/qemu/vault/instances/cp jupiter:cp root# ls -l total 7880320 -rw-r--r-- 1 root wheel 2336 Feb 18 13:50 0001.snapshot.json -rw-r--r-- 1 root wheel 2362 Feb 18 13:51 0002.snapshot.json -rw-r--r-- 1 root wheel 2 Feb 18 13:51 snapshot-count -rw-r--r-- 1 root wheel 2 Feb 18 13:51 snapshot-head -rw-r--r-- 1 root wheel 4249878528 Feb 18 13:51 ubuntu-22.04-server-cloudimg-arm64.img

Additional info

Additional context Add any other context about the problem here.

ricab commented 4 months ago

Hi @pchar, it looks like Multipass is unable to use the image for that VM for some reason. Do you do or remember anything particular on your system before that started happening? Did you do anything with regard to permissions of that directory or above? We would need to take a look at your logs to try to understand what is going on.

pchar commented 4 months ago

No I don't remember nothing special, but im playing with kubernates and the same stuff happens on my laptop and on my desktop, the log files is not showing (at least for me anything special ) other stuff if I tail -f the log file and I exec the command multipass start cp ( my vm ) nothing is logged into the /Library/Logs/Multipass/multipassd.log multipassd.log

seams that the command return in error immediately without and delay ...

❯ m list Name State IPv4 Image primary Stopped -- Ubuntu 22.04 LTS cp Stopped -- Ubuntu 22.04 LTS worker Suspended -- Ubuntu 22.04 LTS ❯ time multipass start cp start failed: cannot start VM without an image multipass start cp 0.03s user 0.01s system 85% cpu 0.043 total

ricab commented 4 months ago

Hi @pchar, it looks like your cloud-init-config.iso file went missing somehow. It should be present in the instance's directory, which you listed above. Any idea how that could have happened?

ricab commented 4 months ago

Also, I see that you got this problem with cp and worker. If you remember anything special about those two instances (e.g. any special operations you did with them both), please let us know. If there is a bug in Multipass causing those files to be removed, we need to figure out what triggers it.

pchar commented 4 months ago

indeed all cloud-init-config.iso are missing also for primary and I just strarted as mistake and stopped

jupiter:instances root# /opt/homebrew/bin/tree . |-- cp | |-- 0001.snapshot.json | |-- 0002.snapshot.json | |-- snapshot-count | |-- snapshot-head | -- ubuntu-22.04-server-cloudimg-arm64.img |-- primary |-- ubuntu-22.04-server-cloudimg-arm64.img -- worker -- ubuntu-22.04-server-cloudimg-arm64.img

I will delete everything and try to log my command I'm pretty sure to be able to reproduce it because it's happens already 3 times before opening the bug report.

Now that I know which files track should be more easy to reproduce. thanks for your reply I will keep you updated as soon I run again into this issue

-P

ricab commented 4 months ago

OK, thank you for letting us know.

townsend2010 commented 3 months ago

Since there has been no update on this for a few weeks, I'm going to close. Please either reopen this or open a new issue if you have this problem again. Thanks!

eljakim commented 2 months ago

I have this issue continuously: multipass deletes the cloud-ini-config.iso file.

I then launch a new image, copy that file to /var/root/Library/Application Support/multipassd/qemu/vault/instances/INSTANCENAME and all is well again.

Then a week later, the file magically disappears again.

I have not been able to figure out at what point it deletes the file. I can do a couple of reboots, no issues, and then suddenly, file is gone again.

This is happening on

ricab commented 2 months ago

Hi @eljakim, when you next notice this happening, can you please provide logs? Thank you!

eljakim commented 2 months ago

Hi @ricab

I have gone through the logs that I still had. What I have done is

I have not deleted any lines in the middle. So everything you see is completely consecutive from the logs.

I did change the name of the instance to redactedinstancename and the home folder to redacteduserdir.

No other changes have been made.

Does this help?

multipassd.log

ricab commented 2 months ago

Thank you @eljakim. Unfortunately, your logs don't have any indication as to what is removing that cloud-init iso either.

As in the case of the OP, it happened as the daemon restarted, after a successful shutdown, when trying to start a previously running instance. In your case, there were also some connectivity problems.

Do you remember what you did around that time? For example, Did you restore a time machine snapshot? Change directory permissions? Run a cleanup tool?

Anything we could use to try to reproduce would be great.