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

start failed: cannot start VM without an image #3410

Open
pchar opened this issue Feb 18, 2024 · 11 comments
Open

start failed: cannot start VM without an image #3410

pchar opened this issue Feb 18, 2024 · 11 comments
Assignees

Comments

@pchar
Copy link

pchar commented Feb 18, 2024

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

  • OS: 14.2.1

  • multipass version

    multipass   1.13.1+Mac
    multipassd  1.13.1+Mac
    
  • multipass info cp
    Name: cp
    State: Stopped
    Snapshots: 2
    IPv4: --
    Release: --
    Image hash: f1c6fc0bb527 (Ubuntu 22.04 LTS)
    CPU(s): --
    Load: --
    Disk usage: --
    Memory usage: --
    Mounts: /Users/pch/Sharing => /mnt/Sharing
    UID map: 501:default
    GID map: 20:default

  • multipass get local.driver
    qemu

Additional context
Add any other context about the problem here.

@pchar pchar added bug needs triage Issue needs to be triaged labels Feb 18, 2024
@ricab
Copy link
Collaborator

ricab commented Feb 19, 2024

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
Copy link
Author

pchar commented Feb 19, 2024

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
Copy link
Collaborator

ricab commented Feb 19, 2024

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
Copy link
Collaborator

ricab commented Feb 19, 2024

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
Copy link
Author

pchar commented Feb 19, 2024

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
Copy link
Collaborator

ricab commented Feb 19, 2024

OK, thank you for letting us know.

@townsend2010 townsend2010 removed the needs triage Issue needs to be triaged label Mar 18, 2024
@townsend2010
Copy link
Collaborator

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
Copy link

eljakim commented Apr 23, 2024

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

  • MacBook Pro 2023
  • Apple M2 Max
  • 32GB
  • Sonoma 14.4.1
  • multipass 1.13.1+mac
  • multipassd 1.13.1+mac

@ricab ricab reopened this Apr 23, 2024
@ricab
Copy link
Collaborator

ricab commented Apr 23, 2024

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

@eljakim
Copy link

eljakim commented Apr 23, 2024

Hi @ricab

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

  • delete everything until the penultimate proper start of the image before things failed
  • delete everything after the first failure

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
Copy link
Collaborator

ricab commented Apr 23, 2024

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.

@ricab ricab self-assigned this Apr 26, 2024
@ricab ricab added the question label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants