Update home assistant supervisor from virsh guest console

Posted by Bruce Liu on August 24, 2024 , updated on August 25, 2024

🏷️ Tags: home assistant , virsh , Ubuntu , Docker , ghcr , DaoCloud

homeassistant migrates image registry from Docker Hub to Github container registry. For example, the image link of supervisor changes from home-assistant/amd64-hassio-supervisor:2024.08.0 to ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0. It is very difficult to access ghcr.io directly in China. Therefore, it is impossible to directly update supervisor, etc. This post show a temporary solution based on DaoCloud/public-image-mirror.

Set up a ready-to-go ghcr image source

Open a sync-image issue.

Place the image sorce as a title with the format of <domian>/<owner>/<image>:<tag>. For example, ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0. Mark the checkbox. And wait one or two minutes. You will received a email with the following content.

镜像 ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0 同步完成 请使用 m.daocloud.io/ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0 替代源镜像

Let’s go to pull the image with the new source.

Update supervisor from a guest console

Open a guest console via virsh.

virsh console hass

root

Pull the supervisor image from the alternative source.

docker pull m.daocloud.io/ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0

Add the recognizable tags.

docker tag "m.daocloud.io/ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0" "ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0"
docker tag "ghcr.io/home-assistant/amd64-hassio-supervisor:2024.08.0" "ghcr.io/home-assistant/amd64-hassio-supervisor:latest"

Stop current hassio_supervisor container.

docker stop hassio_supervisor

And reboot homeassistant os. hassos-supervisor script will recreate the container automatically. The deprecated images will be removed automatically as well.

Useful commands

Normal method to update hassio_supervisor.

ha su update or ha supervisor update

Check jobs running on haos.

ha job info

List all containers:

docker ps -a

List images:

docker images

References


Share on:

« PREVIOUS: Set up an application-level proxy via proxychains
NEXT: Update home assistant operating system from virsh guest console »