If the minimum requirements are not met, the TUI installer will create a
popup notifying you that the install might not work and then exits the
installer.
While the GUI also creates such a popup, it will not exit the installer.
This patch adapts the behavior of the GUI: the TUI creates a popup
warning you that min spec is not met but doesn't abort the install.
Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
[T: fix conflict in context and drop intermediate variable ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
.map_err(|err| format!("Failed to retrieve runtime environment info: {err}"))?
};
- system::has_min_requirements(&runtime_info)?;
-
runtime_info.disks.sort();
if runtime_info.disks.is_empty() {
Err("The installer could not find any supported hard disks.".to_owned())
}
}
+ if state.runtime_info.total_memory < 1024 {
+ display_setup_warning(
+ siv,
+ concat!(
+ "Less than 1 GiB of usable memory detected, installation will probably fail.\n\n",
+ "See 'System Requirements' in the documentation."
+ ),
+ );
+ }
+
if state.setup_info.config.product == ProxmoxProduct::PVE && !state.runtime_info.hvm_supported {
display_setup_warning(
siv,
use std::{fs::OpenOptions, io::Write, process::Command};
-use crate::setup::{KeyboardMapping, RuntimeInfo};
-
-pub fn has_min_requirements(info: &RuntimeInfo) -> Result<(), String> {
- if info.total_memory < 1024 {
- return Err(concat!(
- "Less than 1 GiB of usable memory detected, installation will probably fail.\n\n",
- "See 'System Requirements' in the documentation."
- )
- .to_owned());
- }
-
- Ok(())
-}
+use crate::setup::KeyboardMapping;
pub fn set_keyboard_layout(kmap: &KeyboardMapping) -> Result<(), String> {
Command::new("setxkbmap")