Page MenuHomeVyOS Platform

Upgrading images on machines withour hardware UUIDs causes loss of all containers
Closed, ResolvedPublic

Description

Attempting to reconfigure the container will prompt the following message:

[ container ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 155, in run_script
    script.generate(c)
  File "/usr/libexec/vyos/conf_mode/container.py", line 569, in generate
    host_ident = get_host_identity()
                 ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/network.py", line 67, in get_host_identity
    uuid = cmd(f"cat /sys/class/dmi/id/product_uuid").strip().replace("-", "").lower()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 189, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: None cat /sys/class/dmi/id/product_uuid
returned: 
exit code: 1

[[container]] failed
Commit failed
Warning: you have uncommitted changes that will not be saved.
Version:          VyOS 2025.09.27-0018-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Sat 27 Sep 2025 00:18 UTC
Build UUID:       af6c0769-8971-4f88-a9e4-e81f5aa7e246
Build commit ID:  137b20e4253f02

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal
Secure Boot:      disabled

Hardware vendor:  empty
Hardware model:   empty
Hardware S/N:     empty
Hardware UUID:    Unknown

Copyright:        VyOS maintainers and contributors

Details

Version
v2025.09.27-0018-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

immtelecom triaged this task as Urgent! priority.
immtelecom created this object in space S1 VyOS Public.
immtelecom updated the task description. (Show Details)

Does it show something after the upgrade?
sudo cat /sys/class/dmi/id/product_uuid

@immtelecom It looks like the assumption that product UUID is always available is incorrect. Out of curiosity, what kind of a machine is it? Could you show us the output of show version?

I found the same issue on KVM machines spawned with qemu-kvm by hand but I wonder where else there's no product UUID.

Proposed fix: https://github.com/vyos/vyos-1x/pull/4774

immtelecom@vyos:~$ show version 
Version:          VyOS 2025.09.27-0018-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Sat 27 Sep 2025 00:18 UTC
Build UUID:       af6c0769-8971-4f88-a9e4-e81f5aa7e246
Build commit ID:  137b20e4253f02

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal
Secure Boot:      disabled

Hardware vendor:  empty
Hardware model:   empty
Hardware S/N:     empty
Hardware UUID:    Unknown

Copyright:        VyOS maintainers and contributors
immtelecom@vyos:~$ sudo cat /sys/class/dmi/id/product_uuid
cat: /sys/class/dmi/id/product_uuid: No such file or directory
immtelecom@vyos:~$ sudo ls -l /sys/class/dmi/id
lrwxrwxrwx 1 root root 0 Sep 30 08:40 /sys/class/dmi/id -> ../../devices/virtual/dmi/id
immtelecom@vyos:~$ sudo ls -l /sys/class/dmi/id/
total 0
-r--r--r-- 1 root root 4096 Oct  5 02:39 bios_date
-r--r--r-- 1 root root 4096 Oct  5 02:39 bios_release
-r--r--r-- 1 root root 4096 Sep 30 08:40 bios_vendor
-r--r--r-- 1 root root 4096 Oct  5 02:39 bios_version
-r--r--r-- 1 root root 4096 Oct  5 02:39 board_asset_tag
-r--r--r-- 1 root root 4096 Oct  5 02:39 board_name
-r-------- 1 root root 4096 Oct  5 02:39 board_serial
-r--r--r-- 1 root root 4096 Sep 30 08:40 board_vendor
-r--r--r-- 1 root root 4096 Oct  5 02:39 board_version
-r--r--r-- 1 root root 4096 Oct  5 02:39 chassis_asset_tag
-r-------- 1 root root 4096 Oct  5 02:39 chassis_serial
-r--r--r-- 1 root root 4096 Oct  5 02:39 chassis_type
-r--r--r-- 1 root root 4096 Oct  5 02:39 chassis_vendor
-r--r--r-- 1 root root 4096 Oct  5 02:39 chassis_version
-r--r--r-- 1 root root 4096 Oct  5 02:39 ec_firmware_release
-r--r--r-- 1 root root 4096 Sep 30 08:40 modalias
drwxr-xr-x 2 root root    0 Sep 30 12:43 power
-r--r--r-- 1 root root 4096 Oct  5 02:39 product_family
-r--r--r-- 1 root root 4096 Sep 30 08:40 product_name
-r-------- 1 root root 4096 Sep 30 08:41 product_serial
-r--r--r-- 1 root root 4096 Oct  5 02:39 product_sku
-r--r--r-- 1 root root 4096 Sep 30 08:40 product_version
lrwxrwxrwx 1 root root    0 Sep 30 08:40 subsystem -> ../../../../class/dmi
-r--r--r-- 1 root root 4096 Sep 30 08:40 sys_vendor
-rw-r--r-- 1 root root 4096 Sep 30 08:40 uevent
immtelecom@vyos:~$ sudo cat /sys/class/dmi/id/product_*
empty
empty
empty
empty
empty
Unknown Object (User) changed the task status from Open to In progress.Oct 6 2025, 9:39 AM
Unknown Object (User) assigned this task to dmbaturin.

Confirmed fixed after upgrade to v2025.10.05-0020-rolling

immtelecom@vyos:~$ show container
CONTAINER ID  IMAGE                            COMMAND     CREATED        STATUS        PORTS       NAMES
7d6bb011c820  docker.io/library/debian:latest              6 minutes ago  Up 6 minutes              debian
immtelecom@vyos:~$ show version 
Version:          VyOS 2025.10.05-0020-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Sun 05 Oct 2025 00:20 UTC
Build UUID:       b9a040b9-78f8-4b86-b1ab-38efcfb8fda8
Build commit ID:  144538046e1902

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal
Secure Boot:      disabled

Hardware vendor:  empty
Hardware model:   empty
Hardware S/N:     empty
Hardware UUID:    Unknown

Copyright:        VyOS maintainers and contributor
Viacheslav closed this task as Resolved.EditedOct 7 2025, 4:20 AM
Viacheslav moved this task from Need Triage to Backport Candidates on the VyOS Rolling board.

@immtelecom, thanks for confirming and bug report.

dmbaturin renamed this task from container: lost all containers after upgrade to v2025.09.27-0018-rolling to Upgrading images on machines withour hardware UUIDs causes loss of all containers.Nov 12 2025, 5:46 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.