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

Support to configure the mirror url of cloud image #717

Closed
adglkh opened this issue Apr 10, 2019 · 2 comments · Fixed by #2632
Closed

Support to configure the mirror url of cloud image #717

adglkh opened this issue Apr 10, 2019 · 2 comments · Fixed by #2632

Comments

@adglkh
Copy link

adglkh commented Apr 10, 2019

The user experience of using multipass in China is not quite good.

  • The process of cloud image download from the official site https://cloud-images.ubuntu.com is interrupted quite often.
  • I also hit the issue from time to time in poor network conditions Network timeout too aggressive #386
  • If i was lucky enough, the whole process to download an image from the above URL would take 1~2h, which is really painful.

So I'm wondering if there's a way to configure mirrors in multipass so that I can use something like the URL[1] as a mirror to boost the image download speed.
That could be really helpful for multipass users in China.

Thanks
Gary

[1] https://mirrors.tuna.tsinghua.edu.cn/ubuntu-cloud-images/

@Saviq
Copy link
Collaborator

Saviq commented Apr 10, 2019

Hey @adglkh,

Certainly, this would be a welcome addition. #276 needs to be solved before, though, so we can authenticate the images downloaded.

@townsend2010 townsend2010 linked a pull request Jun 30, 2022 that will close this issue
@townsend2010 townsend2010 added this to the 1.11.0 milestone Jun 30, 2022
bors bot added a commit that referenced this issue Jul 29, 2022
2632: Download image from mirror site r=townsend2010 a=rim99

Hi team, I would like to present a PR for issue: #717

**Feature: mirror of cloud images**

By setting `local.image.mirror`, users can download images from mirror sites instead of the official one. The feature can be disabled by leaving the config empty.

**Implementation**

When updating product versions, it will choose the manifest from mirror site if possible. Since mirror sites is syncing with official site periodically, the latest version in official site may not exist in mirror sites.

Only if the content of a version is *identical* to the same version from official site, it will be updated into the `manifests` cache of `UbuntuVMImageHost` instance.

2673: Fix inconsistent `list` output r=townsend2010 a=sharder996

Fixes `list` output so that all formats output `release` + `image` for the `release` field. eg.
```
ubuntu:build$ multipass list --format yaml
foo:
  - state: Running
    ipv4:
      - 10.3.183.81
    release: Ubuntu 20.04 LTS
persuasive-ruff:
  - state: Deleted
    ipv4:
      []
    release: Not Available
```
Fixes #2464 

Co-authored-by: rim99 <[email protected]>
Co-authored-by: sharder996 <[email protected]>
bors bot added a commit that referenced this issue Jul 29, 2022
2632: Download image from mirror site r=townsend2010 a=rim99

Hi team, I would like to present a PR for issue: #717

**Feature: mirror of cloud images**

By setting `local.image.mirror`, users can download images from mirror sites instead of the official one. The feature can be disabled by leaving the config empty.

**Implementation**

When updating product versions, it will choose the manifest from mirror site if possible. Since mirror sites is syncing with official site periodically, the latest version in official site may not exist in mirror sites.

Only if the content of a version is *identical* to the same version from official site, it will be updated into the `manifests` cache of `UbuntuVMImageHost` instance.

Co-authored-by: rim99 <[email protected]>
@bors bors bot closed this as completed in #2632 Jul 29, 2022
@wusphinx
Copy link

when you visit https://mirrors.tuna.tsinghua.edu.cn/ubuntu-cloud-images/ , you can't find the directory release, which will cause something wrong as below:

launch failed: Remote "release" is unknown or unreachable. If image mirror is enabled, please confirm it is valid.

but, you can try the following commands

multipass set local.image.mirror=https://mirrors.cloud.tencent.com/ubuntu-cloud-images/

it works fine.

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

Successfully merging a pull request may close this issue.

4 participants