Update menu VM

This commit is contained in:
MacRimi 2025-05-07 21:42:50 +02:00
parent 1e98059760
commit 305b2823b7
6 changed files with 16 additions and 16 deletions

View File

@ -78,7 +78,7 @@ function start_vm_configuration() {
while true; do
OS_TYPE=$(dialog --backtitle "ProxMenux" \
--title "$(translate "Select System Type")" \
--menu "$(translate "Choose the type of virtual system to install:")" 18 70 8 \
--menu "\n$(translate "Choose the type of virtual system to install:")" 18 70 8 \
1 "$(translate "Create") VM System NAS" \
2 "$(translate "Create") VM System Windows" \
3 "$(translate "Create") VM System Linux" \

View File

@ -41,13 +41,13 @@ function select_virtual_disk() {
VIRTUAL_DISKS=()
# Loop to add multiple disks
local add_more_disks=true
while $add_more_disks; do
msg_info "Detecting available storage volumes..."
# Get list of available storage
STORAGE_MENU=()
while read -r line; do
TAG=$(echo $line | awk '{print $1}')
@ -57,7 +57,7 @@ function select_virtual_disk() {
STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
done < <(pvesm status -content images | awk 'NR>1')
# Check that storage is available
VALID=$(pvesm status -content images | awk 'NR>1')
if [ -z "$VALID" ]; then
msg_error "Unable to detect a valid storage location."
@ -66,7 +66,7 @@ function select_virtual_disk() {
fi
# Select storage
if [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]}
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
@ -90,7 +90,7 @@ function select_virtual_disk() {
fi
# Request disk size
DISK_SIZE=$(whiptail --backtitle "ProxMenuX" --inputbox "$(translate "System Disk Size (GB)")" 8 58 32 --title "VIRTUAL DISK" --cancel-button Cancel 3>&1 1>&2 2>&3)
if [ $? -ne 0 ]; then
@ -109,18 +109,18 @@ function select_virtual_disk() {
DISK_SIZE="32"
fi
# Store the configuration in the disk list
VIRTUAL_DISKS+=("${STORAGE}:${DISK_SIZE}")
# Ask if you want to create another disk
if ! whiptail --backtitle "ProxMenuX" --title "$(translate "Add Another Disk")" \
--yesno "$(translate "Do you want to add another virtual disk?")" 8 58; then
add_more_disks=false
fi
done
# Show summary of the created disks
if [ ${#VIRTUAL_DISKS[@]} -gt 0 ]; then
msg_ok "Virtual Disks Created:"

View File

@ -33,7 +33,7 @@ function select_linux_iso() {
while [[ "$EXIT_FLAG" != "yes" ]]; do
if [[ "$LANGUAGE" == "es" ]]; then
# Menú en español formateado manualmente
CHOICE=$(dialog --clear \
--backtitle "ProxMenux" \
--title "Opciones de instalación de Linux" \
@ -45,7 +45,7 @@ function select_linux_iso() {
4 "Volver al menú principal" \
3>&1 1>&2 2>&3)
else
# Menú multilingüe con traducción
local desc1 desc2 desc3 back
desc1="$(translate "Install with traditional method")"
desc2="$(translate "Install with Cloud-Init script")"
@ -240,7 +240,7 @@ function select_linux_other_scripts() {
2)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/docker-vm.sh)"
# Mostrar credenciales
whiptail --title "Docker VM Info" \
--msgbox "$(translate "Default Login Credentials:\n\nUsername: root\nPassword: docker")" 12 50
;;

View File

@ -4,7 +4,7 @@
# ProxMenux - NAS ISO Selector (Dialog Edition)
# ==============================================================
# Configuración Base
BASE_DIR="/usr/local/share/proxmenux"
UTILS_FILE="$BASE_DIR/utils.sh"
VENV_PATH="/opt/googletrans-env"
@ -35,7 +35,7 @@ function select_nas_iso() {
--menu "\n$(translate "Select the NAS system to install:")" 18 70 10 \
"${NAS_OPTIONS[@]}" 3>&1 1>&2 2>&3)
# Si se pulsa ESC o Cancelar
[[ $? -ne 0 ]] && return 1
case "$NAS_TYPE" in

View File

@ -84,7 +84,7 @@ if [[ ! -f "$CONVERTER/convert.sh" ]]; then
cd "$TMP_DIR" || exit 1
fi
# Crear script de descarga uup_download_linux.sh
cat > uup_download_linux.sh <<EOF
#!/bin/bash
mkdir -p files

View File

@ -110,7 +110,7 @@ function apply_default_vm_config() {
function configure_vm_advanced() {
header_info
# Obtener el siguiente ID libre
NEXTID=$(pvesh get /cluster/nextid 2>/dev/null || echo "100")
[[ -z "$MAC" ]] && MAC=$(generate_mac)