Improve Pimox template seal diagnostics
Homelab Main / deploy (push) Has been cancelled
Details
Homelab Main / deploy (push) Has been cancelled
Details
This commit is contained in:
parent
6525a744fc
commit
b5693b326b
|
|
@ -243,7 +243,7 @@ resource "null_resource" "pimox_template_vm_seal" {
|
|||
guest_host = var.pimox_template_build_host
|
||||
guest_user = var.pimox_template_build_user
|
||||
guest_key_path = var.pimox_template_build_ssh_key_path
|
||||
seal_version = "6"
|
||||
seal_version = "7"
|
||||
timeout = var.pimox_template_build_timeout
|
||||
timeout_seconds = tostring(var.pimox_template_build_timeout_seconds)
|
||||
guest_ip_prefix = var.pimox_template_guest_ip_prefix
|
||||
|
|
@ -294,8 +294,12 @@ sudo '$pimox_qm_bin' status '$vmid'
|
|||
echo 'Pimox VM $vmid config summary:'
|
||||
sudo '$pimox_qm_bin' config '$vmid' | grep -E '^(agent|bios|boot|efidisk0|net0|scsi0|serial0|vga):' || true
|
||||
echo 'Pimox VM $vmid guest-agent network-get-interfaces:'
|
||||
sudo '$pimox_qm_bin' guest cmd '$vmid' network-get-interfaces
|
||||
echo 'If this VM is still in the installer, inspect the serial console on the Pimox host with: sudo $pimox_qm_bin terminal $vmid'" >&2 || true
|
||||
if command -v timeout >/dev/null 2>&1; then
|
||||
sudo timeout 20s '$pimox_qm_bin' guest cmd '$vmid' network-get-interfaces || true
|
||||
else
|
||||
sudo '$pimox_qm_bin' guest cmd '$vmid' network-get-interfaces || true
|
||||
fi
|
||||
echo 'If this VM is still in the installer, inspect the serial console on the Pimox host with: sudo $pimox_qm_bin terminal $vmid'" || true
|
||||
}
|
||||
|
||||
guest_ip_from_agent() {
|
||||
|
|
@ -336,7 +340,7 @@ fi
|
|||
|
||||
deadline=$((SECONDS + timeout_seconds))
|
||||
next_log=$SECONDS
|
||||
next_debug=$((SECONDS + 300))
|
||||
next_debug=$SECONDS
|
||||
while (( SECONDS < deadline )); do
|
||||
if [ -z "$guest_host" ]; then
|
||||
guest_host="$(guest_ip_from_agent || true)"
|
||||
|
|
@ -364,7 +368,7 @@ while (( SECONDS < deadline )); do
|
|||
fi
|
||||
if (( SECONDS >= next_debug )); then
|
||||
debug_pimox_vm
|
||||
next_debug=$((SECONDS + 300))
|
||||
next_debug=$((SECONDS + 60))
|
||||
fi
|
||||
sleep 15
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in New Issue