Page MenuHomeVyOS Platform

'add system image' error if we choose not to copy an active config
Closed, ResolvedPublicBUG

Description

When adding a new system image there is an option to copy an active configuration to the image being installed. If we choose not to copy it, the installation process stops with error:

vyos@vyos:~$ add system image live-image-amd64.hybrid.iso
Validating image compatibility
Validating image checksums
What would you like to name this image? (Default: 2025.09.09-1525-integration) 
There is already an installed image by that name; please choose again
What would you like to name this image? (Default: 2025.09.09-1525-integration) 1111
Would you like to set the new image as the default one for boot? [Y/n] 
An active configuration was found. Would you like to copy it to the new image? [Y/n] n
Cleaning up
Unmounting target filesystems
Removing temporary files
Error: [Errno 2] No such file or directory: '/usr/lib/live/mount/persistence/boot/1111/rw/opt/vyatta/etc/config//config.boot'

vyos@vyos:~$ show system image 
Name                         Default boot    Running
---------------------------  --------------  ---------
2025.09.09-1525-integration  Yes             Yes

As pointed out by @sarthurdev, this issue might relating to 3fe5f8f

Steps to reproduce:

  1. add system image live-image-amd64.hybrid.iso
  2. An active configuration was found. Would you like to copy it to the new image? [Y/n] n

Details

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

Revisions and Commits

rVYOSONEX vyos-1x

Event Timeline

Unknown Object (User) triaged this task as High priority.Sep 17 2025, 11:13 AM

If one chooses not to copy config to new image, according to https://github.com/vyos/vyos-1x/blob/f46bd3ae7d225d67968397cf85887ae64160592a/src/op_mode/image_installer.py#L1105-L1108 , it won't copy default config to f'{target_config_dir}/config.boot' (This behavior is different from install_image, in which it copied the default config to f'{target_config_dir}/config.boot'). So get_cli_kernel_options cannot find the file and raise an error.

To fix this issue, should we copy the default config to f'{target_config_dir}/config.boot' , or check if the file exists before running get_cli_kernel_options?

Have tested Stream 1.5 202510040455
and reproduce this issue again when add rolling (vyos-2025.10.01-0021) image, Stream (1.5 202510050458) image

example:

vyos@vyos:~$ add system image /tmp/vyos-2025.10.01-0021-rolling-generic-amd64.is                                                                                                                                                             o
Validating image compatibility
Validating image checksums
What would you like to name this image? (Default: 2025.10.01-0021-rolling)
Would you like to set the new image as the default one for boot? [Y/n] t
Please respond with yes/y or no/n
Would you like to set the new image as the default one for boot? [Y/n] y
An active configuration was found. Would you like to copy it to the new image? [                                                                                                                                                             Y/n] n
Cleaning up
Unmounting target filesystems
Removing temporary files
Error: [Errno 2] No such file or directory: '/usr/lib/live/mount/persistence/boo                                                                                                                                                             t/2025.10.01-0021-rolling/rw/opt/vyatta/etc/config//config.boot'
vyos@vyos:~$ show version
Version:          VyOS 1.5-stream-202510040455
Release train:    circinus
Release flavor:   generic

It appears that the an unconditional read of get_cli_kernal_options was reintroduced in the subsequent PR here, breaking @c-po 's fix for T7818:

https://github.com/vyos/vyos-1x/pull/4669
https://github.com/vyos/vyos-1x/pull/4669/commits/0f1430ff44c91b4e1dd152f0cf960a62dcb4d032

It was backported for (only) 1.5. I can add a simple fix for @c-po as author of T7818 to review.

jestabro added a commit: Restricted Diffusion Commit.Oct 6 2025, 7:25 PM
Restricted Repository Identity added a commit: Restricted Diffusion Commit.Oct 6 2025, 7:26 PM

This was automatically closed; re-open until confirmed by testing.

Unknown Object (User) closed this task as Resolved.Oct 9 2025, 5:10 PM
Unknown Object (User) moved this task from Open to Finished on the VyOS 1.5 Circinus (1.5-stream-2025-Q3) board.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.