Configure LUKS and root password via kernel boot options
This commit is contained in:
parent
9d6ce38c8e
commit
cea8812dbd
4 changed files with 38 additions and 9 deletions
|
|
@ -73,10 +73,18 @@ def main() -> int:
|
|||
proxmox_skip_tls_verify = (
|
||||
get_variable_default(variables_common, "proxmox_skip_tls_verify") or False
|
||||
)
|
||||
default_luks_passphrase = get_variable_default(
|
||||
variables_common, "default_luks_passphrase"
|
||||
)
|
||||
proxmox_node = get_variable_default(variables, "proxmox_node")
|
||||
template_vm_id = get_variable_default(variables, "template_vm_id")
|
||||
|
||||
_ = proxmox_api_url, proxmox_node, template_vm_id, credentials
|
||||
_ = (
|
||||
proxmox_api_url,
|
||||
proxmox_node,
|
||||
template_vm_id,
|
||||
credentials,
|
||||
)
|
||||
|
||||
server_event = threading.Event()
|
||||
|
||||
|
|
@ -232,7 +240,9 @@ def main() -> int:
|
|||
)
|
||||
if remaining:
|
||||
time.sleep(1)
|
||||
for char in "packer":
|
||||
if not default_luks_passphrase:
|
||||
raise RuntimeError("default_luks_passphrase not set")
|
||||
for char in default_luks_passphrase:
|
||||
send_key(char)
|
||||
time.sleep(0.1)
|
||||
send_key("ret")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue