From 864c3443a89300ebbc6900243ef59ad7a8c63d61 Mon Sep 17 00:00:00 2001 From: kneutron <50146127+kneutron@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:38:34 -0600 Subject: [PATCH] Add files via upload --- proxmox/proxmox-mkiso-unattended-install.sh | 46 +++++++++++++++++++ .../proxmox-sync-windows-time-beyond-48hrs.sh | 2 +- proxmox/proxmox-unattended-install.toml | 30 ++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 proxmox/proxmox-mkiso-unattended-install.sh create mode 100644 proxmox/proxmox-unattended-install.toml diff --git a/proxmox/proxmox-mkiso-unattended-install.sh b/proxmox/proxmox-mkiso-unattended-install.sh new file mode 100644 index 0000000..e3a0e96 --- /dev/null +++ b/proxmox/proxmox-mkiso-unattended-install.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +#cd /mnt/toshtera10-xfs +#pwd + +# XXX TODO EDITME +#isopath=/var/lib/vz/template/iso +isopath=/mnt/seatera4-xfs/template/iso + +useiso=proxmox-ve_8.2-1.iso +answerfile=/root/proxmox-unattended-install.toml + +echo "$(date) - Preparing $isopath/$useiso using $answerfile" +time proxmox-auto-install-assistant prepare-iso $isopath/$useiso --fetch-from iso --answer-file $answerfile + +#ls -lrth |tail -n 5 +#pwd + +date; + +exit; + +# REF: https://pve.proxmox.com/wiki/Automated_Installation + +# test vm config for pve install +BEGIN /etc/pve/qemu-server/126.conf +balloon: 2048 +bios: ovmf +boot: order=virtio0;ide2 +cores: 2 +cpu: host,flags=+aes +efidisk0: local-lvm:vm-126-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M +ide2: dir1:iso/proxmox-ve_8.2-1-auto-from-iso.iso,media=cdrom,size=1364160K +machine: q35 +memory: 4096 +meta: creation-qemu=8.1.5,ctime=1714504207 +name: pve-test-unattended-install +net0: virtio=BC:24:11:B5:12:C2,bridge=vmbr0,queues=2 +numa: 0 +ostype: l26 +scsihw: virtio-scsi-single +smbios1: uuid=0fc8815d-9727-480f-818c-0f390b19f8c7 +sockets: 1 +tablet: 0 +vga: virtio +virtio0: tosh10-xfs-multi:126/vm-126-disk-0.qcow2,backup=0,cache=writeback,discard=on,iothread=1,size=256G diff --git a/proxmox/proxmox-sync-windows-time-beyond-48hrs.sh b/proxmox/proxmox-sync-windows-time-beyond-48hrs.sh index 061a881..8367082 100644 --- a/proxmox/proxmox-sync-windows-time-beyond-48hrs.sh +++ b/proxmox/proxmox-sync-windows-time-beyond-48hrs.sh @@ -34,5 +34,5 @@ if [[ "$phase" == "post-start" ]]; then echo "vm guest service not running" exit 1 fi - +fi # REF: https://forum.proxmox.com/threads/windows-vm-time-not-updated-after-hibernate-resume.110517/page-2#post-624212 diff --git a/proxmox/proxmox-unattended-install.toml b/proxmox/proxmox-unattended-install.toml new file mode 100644 index 0000000..74d289d --- /dev/null +++ b/proxmox/proxmox-unattended-install.toml @@ -0,0 +1,30 @@ +# This is the answer file for proxmox pve unattended install to VM (for testing) +# ext4 + LVM boot/root +# REF: https://pve.proxmox.com/wiki/Automated_Installation#Overview +# 2024.Apr kneutron +# xxx TODO EDITME before running ' proxmox-mkiso-unattended-install.sh ' +[global] +keyboard = "en-us" +country = "us" +fqdn = "pveauto.testinstall" +mailto = "root@localhost" +timezone = "America/Denver" +root_password = "123456" + +[network] +source = "from-dhcp" + +[disk-setup] +filesystem = "ext4" +lvm.hdsize = 238 +# for "256GB" disk - even if disk is bigger than this, pve lvm will only use this much and rest can be used for ZFS +#lvm.hdsize = "119" +# for "128GB" disk - REF: https://platinumdatarecovery.com/hard-drive-capacity-calculator +lvm.swapsize = 2 +# ^^ in GB +lvm.maxroot = 40 +# GB +lvm.minfree = 2 +# Leave 2GB of space for future growth / safety factor +#disk_list = ["sda"] +disk_list = ["vda"]