Fix Pimox template disk boot
Homelab Main / deploy (push) Has been cancelled
Details
Homelab Main / deploy (push) Has been cancelled
Details
This commit is contained in:
parent
b5693b326b
commit
b5a16b805f
|
|
@ -124,7 +124,7 @@ resource "null_resource" "pimox_template_vm_create" {
|
||||||
pimox_user = var.pimox_user
|
pimox_user = var.pimox_user
|
||||||
ssh_key_path = var.pimox_ssh_key_path
|
ssh_key_path = var.pimox_ssh_key_path
|
||||||
qm_bin = var.pimox_qm_bin
|
qm_bin = var.pimox_qm_bin
|
||||||
builder_version = "9"
|
builder_version = "10"
|
||||||
vmid = tostring(var.pimox_template_vmid)
|
vmid = tostring(var.pimox_template_vmid)
|
||||||
name = var.pimox_template_name
|
name = var.pimox_template_name
|
||||||
cores = tostring(var.pimox_template_cores)
|
cores = tostring(var.pimox_template_cores)
|
||||||
|
|
@ -224,7 +224,7 @@ if [ -n "${self.triggers.cpu_affinity}" ]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
sudo "$qm_cmd" start "$vmid"
|
sudo "$qm_cmd" start "$vmid"
|
||||||
sudo "$qm_cmd" set "$vmid" --boot "order=scsi0;net0"
|
sudo "$qm_cmd" set "$vmid" --boot "order=scsi0"
|
||||||
EOT
|
EOT
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -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 = "7"
|
seal_version = "8"
|
||||||
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
|
||||||
|
|
@ -404,7 +404,7 @@ resource "null_resource" "pimox_template_vm_finalize" {
|
||||||
pimox_user = var.pimox_user
|
pimox_user = var.pimox_user
|
||||||
ssh_key_path = var.pimox_ssh_key_path
|
ssh_key_path = var.pimox_ssh_key_path
|
||||||
qm_bin = var.pimox_qm_bin
|
qm_bin = var.pimox_qm_bin
|
||||||
finalizer_version = "2"
|
finalizer_version = "3"
|
||||||
vmid = tostring(var.pimox_template_vmid)
|
vmid = tostring(var.pimox_template_vmid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,7 +451,7 @@ if ! sudo "$qm_cmd" status "$vmid" | grep -q 'status: stopped'; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo "$qm_cmd" set "$vmid" --boot "order=scsi0;net0"
|
sudo "$qm_cmd" set "$vmid" --boot "order=scsi0"
|
||||||
sudo "$qm_cmd" template "$vmid"
|
sudo "$qm_cmd" template "$vmid"
|
||||||
EOT
|
EOT
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ d-i clock-setup/utc boolean true
|
||||||
d-i time/zone string ${timezone}
|
d-i time/zone string ${timezone}
|
||||||
d-i partman-auto/disk string ${template_disk}
|
d-i partman-auto/disk string ${template_disk}
|
||||||
d-i partman-auto/method string regular
|
d-i partman-auto/method string regular
|
||||||
|
d-i partman-partitioning/choose_label string gpt
|
||||||
|
d-i partman-partitioning/default_label string gpt
|
||||||
d-i partman-auto/choose_recipe select atomic
|
d-i partman-auto/choose_recipe select atomic
|
||||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||||
d-i partman/choose_partition select finish
|
d-i partman/choose_partition select finish
|
||||||
|
|
@ -30,6 +32,7 @@ d-i pkgsel/include string ${template_package_list}
|
||||||
d-i pkgsel/update-policy select none
|
d-i pkgsel/update-policy select none
|
||||||
popularity-contest popularity-contest/participate boolean false
|
popularity-contest popularity-contest/participate boolean false
|
||||||
d-i grub-installer/only_debian boolean true
|
d-i grub-installer/only_debian boolean true
|
||||||
|
d-i grub-installer/force-efi-extra-removable boolean true
|
||||||
d-i grub-installer/bootdev string ${template_disk}
|
d-i grub-installer/bootdev string ${template_disk}
|
||||||
d-i preseed/late_command string wget -O /target/usr/local/sbin/homelab-golden-node-prepare.sh ${provisioning_script_url}; chmod 0755 /target/usr/local/sbin/homelab-golden-node-prepare.sh; in-target /usr/local/sbin/homelab-golden-node-prepare.sh; wget -O /target/usr/local/sbin/homelab-prepare-template.sh ${prepare_template_script_url}; chmod 0755 /target/usr/local/sbin/homelab-prepare-template.sh
|
d-i preseed/late_command string wget -O /target/usr/local/sbin/homelab-golden-node-prepare.sh ${provisioning_script_url}; chmod 0755 /target/usr/local/sbin/homelab-golden-node-prepare.sh; in-target /usr/local/sbin/homelab-golden-node-prepare.sh; wget -O /target/usr/local/sbin/homelab-prepare-template.sh ${prepare_template_script_url}; chmod 0755 /target/usr/local/sbin/homelab-prepare-template.sh
|
||||||
d-i finish-install/reboot_in_progress note
|
d-i finish-install/reboot_in_progress note
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ variable "pimox_template_scsi0" {
|
||||||
|
|
||||||
variable "pimox_template_efidisk0" {
|
variable "pimox_template_efidisk0" {
|
||||||
type = string
|
type = string
|
||||||
default = "local:1,efitype=4m,pre-enrolled-keys=1"
|
default = "local:1,efitype=4m,pre-enrolled-keys=0"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "pimox_template_replace_existing" {
|
variable "pimox_template_replace_existing" {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue