containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
22.4k stars 2.31k forks source link

support download vm image manually before machine init #23012

Closed LeiYangGH closed 2 weeks ago

LeiYangGH commented 2 weeks ago

Feature request description

i'm new user and following podman-for-windows but stuck on podman machine init

PS C:\Users\user> podman machine init
Downloading VM image: v20240616181311-5.1-rootfs-amd64.tar.zst [>------------------------------------------------] 3.2MiB / 162.2MiB
Error: stream error: stream ID 5; PROTOCOL_ERROR; received from peer
PS C:\Users\user>

for some reason the network may be extremely slow, and i can download things before machine init.

Suggest potential solution

A clear and concise description of what you want to happen.

so want some options to specify local downloaded files in init command, of course, need documents on what files should be downloaded. thanks!

Have you considered any alternatives?

setting proxy may solve but it's more difficult for me.

Additional context

in china we are blocked from many websites.

Luap99 commented 2 weeks ago

This is already supported, you can use --image option to specify a local disk image https://docs.podman.io/en/latest/markdown/podman-machine-init.1.html#image

For WSL you can download the images from here: https://github.com/containers/podman-machine-wsl-os/releases

LeiYangGH commented 2 weeks ago

This is already supported, you can use --image option to specify a local disk image https://docs.podman.io/en/latest/markdown/podman-machine-init.1.html#image

For WSL you can download the images from here: https://github.com/containers/podman-machine-wsl-os/releases

thanks, will try soon.

LeiYangGH commented 2 weeks ago

works!

PS C:\Users\user> podman machine init --image "C:\Users\user\Downloads\5.1-rootfs-amd64.tar.zst"
Extracting compressed file: podman-machine-default-amd64: done
Importing operating system into WSL (this may take a few minutes on a new WSL install)...
Configuring system...
Machine init complete
To start your machine run:

        podman machine start

PS C:\Users\user> podman machine start
Starting machine "podman-machine-default"

This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:

        podman machine set --rootful

API forwarding listening on: npipe:////./pipe/docker_engine

Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
PS C:\Users\user>