Template Virtual Machines: Difference between revisions
From Sea of Fate
Jump to navigationJump to search
Wikisailor (talk | contribs) |
Wikisailor (talk | contribs) |
||
| Line 68: | Line 68: | ||
==Mint-22.3-Zena-Cinnamon== | ==Mint-22.3-Zena-Cinnamon== | ||
Created: Feb 2026 | OS: Linux Mint 22.3 (Ubuntu 24.04.3 Base) | Kernel: 6.14+ | |||
===Proxmox Hardware Configuration=== | |||
* BIOS OVMF (UEFI) Modern standard for Mint 22.3 | |||
* Machine q35 Better PCIe bus handling for VirtIO | |||
* Display VirtIO-GPU Crucial: Required for Cinnamon 6.6 performance | |||
* CPU x86-64-v2-AES (or Host) Minimum 2 Cores for a smooth desktop | |||
* Memory 4096 MiB 2GB is minimum, 4GB is the "comfort" sweet spot | |||
* Network VirtIO (paravirtualized) Standard bridge (vmbr0) | |||
* Guest Agent Enabled Checkbox in 'Options' tab must be ON | |||
* Added Serial port | |||
===Installed Optimizations=== | |||
* QEMU Guest Agent: Installed (apt install qemu-guest-agent) for graceful shutdowns and IP reporting. | |||
* SPICE vdagent: Installed and modified with a 5-second boot delay (via systemd override) to fix VirtIO-GPU clipboard sync issues. | |||
* Cloud-Init: Fully configured. | |||
** User: nigel (Primary Admin) | |||
** Network Renderer: Forced to NetworkManager for desktop compatibility. | |||
* Apt Repositories: Fixed manual pathing for Ubuntu Noble and Mint Zena to prevent 404 errors. | |||
* Access Credentials | |||
** Default User: nigel | |||
** SSH Keys Preloaded: Grape (Windows), Lemon, Raisin. | |||
** Console: Supports SPICE (for Desktop/Clipboard) and xterm.js (via Serial Port 0). | |||
===Maintenance Commands=== | |||
If we ever need to update the base template, run these before converting back: | |||
* Update: | |||
sudo apt update && sudo apt upgrade -y | |||
* Clean: | |||
sudo cloud-init clean --logs | |||
* Generalize: | |||
sudo truncate -s 0 /etc/machine-id | |||
*Final Seal: | |||
history -c && sudo shutdown -h now | |||
===How to Deploy a New VM from Template=== | |||
====Cloning the Template==== | |||
* Right-click the Mint-22.3-Zena-Cinnamon template in the Proxmox sidebar. | |||
* Select Clone. | |||
* Mode: * Linked Clone: Uses very little disk space (reaches back to the template for data). Best for standard desktops. | |||
** Full Clone: Completely independent copy. Best if you plan on deleting the template later. | |||
*Assign a VM ID and a Name (e.g., Mint-Workstation-01). | |||
* Click Clone. | |||
====Customizing Identity (Hostname & IP)==== | |||
Revision as of 09:59, 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
Created: Feb 2026 | OS: Linux Mint 22.3 (Ubuntu 24.04.3 Base) | Kernel: 6.14+
Proxmox Hardware Configuration
- BIOS OVMF (UEFI) Modern standard for Mint 22.3
- Machine q35 Better PCIe bus handling for VirtIO
- Display VirtIO-GPU Crucial: Required for Cinnamon 6.6 performance
- CPU x86-64-v2-AES (or Host) Minimum 2 Cores for a smooth desktop
- Memory 4096 MiB 2GB is minimum, 4GB is the "comfort" sweet spot
- Network VirtIO (paravirtualized) Standard bridge (vmbr0)
- Guest Agent Enabled Checkbox in 'Options' tab must be ON
- Added Serial port
Installed Optimizations
- QEMU Guest Agent: Installed (apt install qemu-guest-agent) for graceful shutdowns and IP reporting.
- SPICE vdagent: Installed and modified with a 5-second boot delay (via systemd override) to fix VirtIO-GPU clipboard sync issues.
- Cloud-Init: Fully configured.
- User: nigel (Primary Admin)
- Network Renderer: Forced to NetworkManager for desktop compatibility.
- Apt Repositories: Fixed manual pathing for Ubuntu Noble and Mint Zena to prevent 404 errors.
- Access Credentials
- Default User: nigel
- SSH Keys Preloaded: Grape (Windows), Lemon, Raisin.
- Console: Supports SPICE (for Desktop/Clipboard) and xterm.js (via Serial Port 0).
Maintenance Commands
If we ever need to update the base template, run these before converting back:
- Update:
sudo apt update && sudo apt upgrade -y
- Clean:
sudo cloud-init clean --logs
- Generalize:
sudo truncate -s 0 /etc/machine-id
- Final Seal:
history -c && sudo shutdown -h now
How to Deploy a New VM from Template
Cloning the Template
- Right-click the Mint-22.3-Zena-Cinnamon template in the Proxmox sidebar.
- Select Clone.
- Mode: * Linked Clone: Uses very little disk space (reaches back to the template for data). Best for standard desktops.
- Full Clone: Completely independent copy. Best if you plan on deleting the template later.
- Assign a VM ID and a Name (e.g., Mint-Workstation-01).
- Click Clone.