Skip to content

[lxd] long startup delay due to image refresh #2516

@Saviq

Description

@Saviq

When the cached image is out of date, Multipass will try and update it on startup, causing a significant delay until instances are accessible.

$ snap remove --purge multipass
multipass removed

$ snap install multipass --stable
multipass 1.8.0 from Canonical✓ installed

$ sudo multipass set local.driver=lxd

$ multipass start
Launched: primary                                                               
Mounted '/home/michal' into 'primary:Home'                                      

$ multipass launch daily:devel;
Launched: absolute-shiner                                                       

$ multipass ls                 
Name                    State             IPv4             Image
primary                 Running           10.16.50.113     Ubuntu 20.04 LTS
absolute-shiner         Running           10.16.50.93      Ubuntu 22.04 LTS
                              
$ snap refresh multipass --channel candidate
multipass (candidate) 1.9.0-rc.442+g6301a89d from Canonical✓ refreshed

$ multipass ls                              
No instances found.

# after some seconds

$ multipass ls
Name                    State             IPv4             Image
primary                 Running           10.16.50.113     Ubuntu 20.04 LTS
absolute-shiner         Running           10.16.50.93      Ubuntu 20.04 LTS

A number of potential improvements:

  • only invalidate the images (next instance launch will require a downloaded image)
  • defer the image update
  • run the image update in parallel (that would probably be the ultimate fix)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions