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_host = var.pimox_template_build_host
|
||||||
guest_user = var.pimox_template_build_user
|
guest_user = var.pimox_template_build_user
|
||||||
guest_key_path = var.pimox_template_build_ssh_key_path
|
guest_key_path = var.pimox_template_build_ssh_key_path
|
||||||
seal_version = "6"
|
seal_version = "7"
|
||||||
timeout = var.pimox_template_build_timeout
|
timeout = var.pimox_template_build_timeout
|
||||||
timeout_seconds = tostring(var.pimox_template_build_timeout_seconds)
|
timeout_seconds = tostring(var.pimox_template_build_timeout_seconds)
|
||||||
guest_ip_prefix = var.pimox_template_guest_ip_prefix
|
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:'
|
echo 'Pimox VM $vmid config summary:'
|
||||||
sudo '$pimox_qm_bin' config '$vmid' | grep -E '^(agent|bios|boot|efidisk0|net0|scsi0|serial0|vga):' || true
|
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:'
|
echo 'Pimox VM $vmid guest-agent network-get-interfaces:'
|
||||||
sudo '$pimox_qm_bin' guest cmd '$vmid' network-get-interfaces
|
if command -v timeout >/dev/null 2>&1; then
|
||||||
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
|
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() {
|
guest_ip_from_agent() {
|
||||||
|
|
@ -336,7 +340,7 @@ fi
|
||||||
|
|
||||||
deadline=$((SECONDS + timeout_seconds))
|
deadline=$((SECONDS + timeout_seconds))
|
||||||
next_log=$SECONDS
|
next_log=$SECONDS
|
||||||
next_debug=$((SECONDS + 300))
|
next_debug=$SECONDS
|
||||||
while (( SECONDS < deadline )); do
|
while (( SECONDS < deadline )); do
|
||||||
if [ -z "$guest_host" ]; then
|
if [ -z "$guest_host" ]; then
|
||||||
guest_host="$(guest_ip_from_agent || true)"
|
guest_host="$(guest_ip_from_agent || true)"
|
||||||
|
|
@ -364,7 +368,7 @@ while (( SECONDS < deadline )); do
|
||||||
fi
|
fi
|
||||||
if (( SECONDS >= next_debug )); then
|
if (( SECONDS >= next_debug )); then
|
||||||
debug_pimox_vm
|
debug_pimox_vm
|
||||||
next_debug=$((SECONDS + 300))
|
next_debug=$((SECONDS + 60))
|
||||||
fi
|
fi
|
||||||
sleep 15
|
sleep 15
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue