Commit Graph

23 Commits

Author SHA1 Message Date
Christoph Heiss
386c7f8bd4 auto: answer: add option to poweroff the machine instead of reboot
Fixes #5880 [0].

Add a new option `global.reboot_mode` to the answer file, which allows
users to optionally power off the machine after a successful
installation, instead of rebooting.

The option is completely backwards-compatible, i.e. defaults to
"reboot", keeping the current behaviour.

This can be useful for certain scenarios, such as being able to
provision a stack of servers using the auto-installer and afterwards
being able to work on the servers without time pressure, such as e.g.
removing the installation medium, before booting them into the OS for
the first time [1].

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=5880
[1] https://forum.proxmox.com/threads/deploying-multiple-proxmox-host-easily.156129/post-721166

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2025-04-04 11:01:55 +02:00
Christoph Heiss
dc46056376 common: setup: read locale info as shipped by the installer directly
Now that we have a pre-generated `locale-info.json` available, skip
generating one on-the-fly and just read that one.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-12-10 18:00:24 +01:00
Aaron Lauterer
74e54c4d8d low-level: add dump-udev command
Fetches UDEV device properties prepended with 'E:' for NICs and disks.
The result is stored in its own JSON file.

This information is needed to filter for specific devices. Mainly for
the auto-installer for now.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
 [ TL: rework Udev module to avoid external dependencies, keep those
   in the Sys modules ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-22 14:31:37 +02:00
Aaron Lauterer
436cc19fd6 low-level: write final installation config to /tmp
This helps to know how the system was set up in steps after the
installation. For example in debug mode or when using post commands in
the automatic/unattended installation.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-22 14:31:37 +02:00
Christoph Heiss
479b052450 low-level: initialize UI backend for 'dump-env' subcommand too
Some detection routines might try to log things and call some
Proxmox::Ui functions all the way down, so just initialize it with the
stdio backend to avoid errors.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-02-23 14:19:56 +01:00
Christoph Heiss
b8504bbe5c low-level: align wording of finish message
The other case uses "Installation finished [..]", thus use the same
wording here too.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-02-06 14:22:52 +01:00
Christoph Heiss
091c64a753 low-level, tui: count down auto-reboot timeout
The GUI installer already has the same functionality, with this the TUI
installer gains the same. It is a nice touch anyway, primarily to
indicate to the user that the installer is not frozen or similar.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-11-11 14:08:41 +01:00
Christoph Heiss
04b0033cd9 low-level: avoid open-coding config reading, parsing and merging
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-11-11 14:08:41 +01:00
Christoph Heiss
4b4dfa12e0 low level: testmode: take path to disk image instead of using /dev/null
.. in exactly the same way GUI and TUI installer do, streamlining them.

Up until now, testing the TUI installer often involved hand-editing the
`run-env-info.json` to put some proper disk sizes > 0 in place. This
makes this process a lot easier.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-11-09 14:44:51 +01:00
Thomas Lamprecht
11fd703fe3 move location of runtome env file into ISO env
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:32:12 +02:00
Christoph Heiss
ac5522a1b4 low level: simulate reboot in test session
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:17:46 +02:00
Christoph Heiss
5ab640a142 low level: fix test-session progress
In a8fbe0ff, the protocol was changed; such that the TUI now multiplies
the value by 100. Thus divide it here by 100 before sending it off.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:37:13 +02:00
Thomas Lamprecht
e3e27c9cbb low level: drop extra exit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:08:58 +02:00
Thomas Lamprecht
a8fbe0ff55 add Finished UI² message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:02:53 +02:00
Thomas Lamprecht
b6e671a6db low-level: report errors and implement autor-reboot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 17:39:32 +02:00
Thomas Lamprecht
140f3f407f low level: support actual installation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:01:34 +02:00
Thomas Lamprecht
5c3d53f5f5 low-level: add dummy install with prompt and message test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 12:37:54 +02:00
Thomas Lamprecht
8b39b0aa72 low level: init stdio based UI-interface
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 21:49:00 +02:00
Thomas Lamprecht
57feade1a6 low-level: drop outdated comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:40:03 +02:00
Thomas Lamprecht
db97dbacaf low-level: dump runtime enviroment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:38:14 +02:00
Thomas Lamprecht
92c7b5c916 low level installer: init a per-command log
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:20:38 +02:00
Thomas Lamprecht
026620be2f rename Env to ISOEnv
in preparation of adding a runtime env module

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 13:26:38 +02:00
Thomas Lamprecht
989191f030 add initial basic version of proxmox-low-level-installer tool
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 10:29:52 +02:00