Template Virtual Machines: Difference between revisions

From Sea of Fate
Jump to navigationJump to search
Created page with "==Introduction== To have a consistent base for '''Virtual Machines''' we need to have some templates we are going to have Debian 13.3 and Mint 22.3 Zena Cinnamon Edition for the desktop ==Debian Gold Master (v1.0)== ===Overview=== The Debian Gold Master is a stripped-down, optimized Proxmox template based on Debian GNU/Linux 13.3 (Trixie). It is designed for rapid deployment of "Sea of Fate" infrastructure services. * Standard User: nigel (Sudoer) * Access: SSH P..."
 
Line 65: Line 65:
* No IP in Proxmox: Ensure the "QEMU Guest Agent" is enabled in the VM Options tab in the Proxmox WebGUI.
* No IP in Proxmox: Ensure the "QEMU Guest Agent" is enabled in the VM Options tab in the Proxmox WebGUI.
* Path Errors: Always use absolute paths (e.g., /usr/sbin/reboot) in scripts to bypass Debian's minimal shell environment.
* Path Errors: Always use absolute paths (e.g., /usr/sbin/reboot) in scripts to bypass Debian's minimal shell environment.
==Mint-22.3-Zena-Cinnamon==

Revision as of 09:44, 2 February 2026

Introduction

To have a consistent base for Virtual Machines we need to have some templates we are going to have Debian 13.3 and Mint 22.3 Zena Cinnamon Edition for the desktop

Debian Gold Master (v1.0)

Overview

The Debian Gold Master is a stripped-down, optimized Proxmox template based on Debian GNU/Linux 13.3 (Trixie). It is designed for rapid deployment of "Sea of Fate" infrastructure services.

  • Standard User: nigel (Sudoer)
  • Access: SSH Passwordless (Authorized keys from Lemon pre-staged)
  • Virtualization: QEMU Guest Agent pre-installed and enabled.
  • DNS: Standardized to 192.168.110.11 with search domains seaoffate.net, seaoffate.uk, seaoffate.local.

Deployment Workflow (How to use)

  • Clone: In Proxmox, right-click the template -> Full Clone.
  • Power On: Start the new VM.
  • SSH: Connect from Lemon (no password required).
    • Note: If you get a "Host Identification Changed" error, run: ssh-keygen -R [New_IP]
  • Initialize: Run the setup script:
sudo clone-init.sh
  • Identify: Provide the new Hostname and Static IP when prompted. The VM will auto-reboot and flip the login banner to "INITIALIZED."

The Initialization Script (/usr/local/bin/clone-init.sh)

This script automates the unique identity of every clone. It performs the following:

  • Sets Hostname in /etc/hostname and /etc/hosts.
  • Configures static networking in /etc/network/interfaces.
  • Regenerates SSH Host Keys to ensure cryptographic uniqueness.
  • Resets Machine-ID to prevent DHCP/log conflicts.
  • Updates MOTD to show the node is active and configured.

Maintenance (How to update the Master)

Every few months, or when a major security vulnerability is announced, the Gold Master should be updated:

  • Right-click Template -> Clone (Name it "Master-Update-Temp").
  • Start VM and log in.
  • Update Packages:
su -
apt update && apt upgrade -y
apt autoremove && apt clean
  • Reset to "Template State":
    • Set /etc/motd back to the WARNING: UNINITIALIZED text
nano /etc/motd

edit the text to read

###########################################################
#                                                         #
#   WARNING: THIS VM HAS NOT BEEN INITIALIZED!            #
#   PLEASE RUN: sudo clone-init.sh                        #
#                                                         #
###########################################################
    • Truncate histories:
cat /dev/null > ~/.bash_history && history -c
  • Shutdown:
sudo /usr/sbin/poweroff
  • Finalize:
    • Delete the old template
    • Convert this updated VM into the new Debian Gold Master

Troubleshooting

  • SSH Connection Refused: Ensure the service is running. If host keys were deleted but not regenerated,
ssh-keygen -A.
  • No IP in Proxmox: Ensure the "QEMU Guest Agent" is enabled in the VM Options tab in the Proxmox WebGUI.
  • Path Errors: Always use absolute paths (e.g., /usr/sbin/reboot) in scripts to bypass Debian's minimal shell environment.


Mint-22.3-Zena-Cinnamon