Hello again,
after a break I'm back at setting up my new home lab using Proxmox 8.3, OpenTofu 1.9.0 and Ansible.
My old setup was hyper-v core, Satellite Katello for unattended provisioning using PXE boot and tftp.
It took me some time to find out a way to replicate that workflow with my new setup. But with kvm_arguments I can sort of provision the same way.
The problem that I ran into now is that I get stuck in an infinite loop with the installer starting again after a reboot.
my tf file looks as follows:
My kickstart file as follows:
The only way to break the loop is to go into the BIOS in the proxmox GUI and load from the scsi0 disk.
I tried to read the reference documentation : https://registry.terraform.io/provi...docs/resources/virtual_environment_vm#order-1
But could not really find a solution there. Also it's unclear to me what the startup order number represents. I could not find any reference on that any where.
All help appreciated.
after a break I'm back at setting up my new home lab using Proxmox 8.3, OpenTofu 1.9.0 and Ansible.
My old setup was hyper-v core, Satellite Katello for unattended provisioning using PXE boot and tftp.
It took me some time to find out a way to replicate that workflow with my new setup. But with kvm_arguments I can sort of provision the same way.
The problem that I ran into now is that I get stuck in an infinite loop with the installer starting again after a reboot.
my tf file looks as follows:
Code:
resource "proxmox_virtual_environment_vm" "rocky_vm" {
name = "rocky-vm-02"
node_name = "VMHOST1"
kvm_arguments = "-kernel /mnt/rocky/isolinux/vmlinuz -initrd /mnt/rocky/isolinux/initrd.img -append 'inst.ks=http://192.168.178.75/ks.cfg inst.cmdline quiet inst.once'"
cpu {
cores = 4
type = "host"
}
memory {
dedicated = 16348
}
network_device {
bridge = "vmbr0"
}
startup {
order = "1"
}
disk {
datastore_id = "VMDISK1"
file_format = "qcow2"
interface = "scsi0"
size = 150
}
disk {
datastore_id = "VMDISK1"
file_format = "qcow2"
interface = "scsi1"
size = 100 # Adjust the size as needed
}
cdrom {
enabled = true
file_id = "VMDISK1:iso/Rocky-9.5-x86_64-dvd.iso"
}
}
My kickstart file as follows:
Code:
# Basic system configuration
lang en_US.UTF-8
keyboard sg
timezone UTC
# Installation source
# Assuming you're using the Rocky Linux DVD
cdrom
# Authentication
rootpw --iscrypted $6$randomsalt$randomhashhere
authselect --enableshadow --passalgo=sha512
# Network information (using DHCP)
network --bootproto=dhcp --device=link --activate
# Your existing partitioning scheme
zerombr
clearpart --all --initlabel
part /boot --fstype="ext4" --size=512
part /boot/efi --fstype="fat" --size=512
part pv.01 --size=1 --grow --ondisk=sda
volgroup vg_root --pesize=4096 pv.01
logvol / --fstype="ext4" --size=45000 --vgname=vg_root --name=lv_root
logvol /tmp --fstype="ext4" --size=1024 --vgname=vg_root --name=lv_tmp
logvol /var --fstype="ext4" --size=50120 --vgname=vg_root --name=lv_var
logvol /home --fstype="ext4" --size=512 --vgname=vg_root --name=lv_home
logvol swap --fstype="ext4" --size=16384 --vgname=vg_root --name=lv_swap
part pv.02 --size=1 --grow --ondisk=sdb
volgroup drbdpool --pesize=4096 pv.02
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
# Run the text install
text
# Skip X configuration
skipx
# Firewall configuration
firewall --enabled --service=ssh
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx
# Reboot after installation
reboot --eject
# Package selection
%packages
@core
%end
# Post-installation script
%post
# Add any post-installation commands here
%end
The only way to break the loop is to go into the BIOS in the proxmox GUI and load from the scsi0 disk.
I tried to read the reference documentation : https://registry.terraform.io/provi...docs/resources/virtual_environment_vm#order-1
But could not really find a solution there. Also it's unclear to me what the startup order number represents. I could not find any reference on that any where.
All help appreciated.
Last edited: