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

Provide the size of the disk image, along with the checksum and url #1586

Open
afbjorklund opened this issue May 27, 2023 · 6 comments
Open

Comments

@afbjorklund
Copy link
Member

afbjorklund commented May 27, 2023

Description

I know that one can ask the server, but maybe it is down or slow.

When we automate the checksumming ("digest"), we could have it populate the byte size as well ?

images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/22.10/release-20230413/ubuntu-22.10-server-cloudimg-amd64.img"
  arch: "x86_64"
  size: 762445824
  digest: "sha256:d46438111d7a6dfcdfb2e1fb76762a79d56f09dc308cc9ab2300effc0078fd5b"
- location: "https://cloud-images.ubuntu.com/releases/22.10/release-20230413/ubuntu-22.10-server-cloudimg-arm64.img"
  arch: "aarch64"
  size: 739573760
  digest: "sha256:e1865c2ebc531600ae6012d86fa2dae5846e7801cdcdbcf90d9c830218ef4ae9"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/22.10/release/ubuntu-22.10-server-cloudimg-amd64.img"
  arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/22.10/release/ubuntu-22.10-server-cloudimg-arm64.img"
  arch: "aarch64"

A disk size of "0" would just mean that we don't know, before contacting (or that the image is generic)

@afbjorklund
Copy link
Member Author

The reason for this was the question of "which template has the bigger images, ubuntu or debian"

@AkihiroSuda
Copy link
Member

Any reason not to just use comment lines?

@afbjorklund
Copy link
Member Author

afbjorklund commented May 27, 2023

Wouldn't that make the parsing harder ? I'm imaging some kind of tool or visualization, similar to what we currently do for du

So far the workaround was more in the lines of curl --head, once you figure out the URL to use for the template that you want.

@afbjorklund
Copy link
Member Author

Like if you want to use some parsing construct, avoid hitting the remote server for known information....

limactl info | yq '.templates[] | select(.name == "debian") | .location' | xargs yq .images

@AkihiroSuda
Copy link
Member

I'm fine to add the size field, but I expect it to happen after this:

Otherwise maintaining the templates will be even much harder.

@afbjorklund
Copy link
Member Author

afbjorklund commented May 28, 2023

I'm not sure how important disk size really is, these days.

If one really wanted to complicate things, it could even record the uncompressed* size (like apt shows you)
But in general, I think you want to have plenty of disk space (10G+) available when running virtual machines.

* this would only make sense for compressed images

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