Skip to content

Instantly share code, notes, and snippets.

#### Contents of the preconfiguration file
# Language
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i console-setup/ask_detect boolean false
# Keyboard
d-i keyboard-configuration/variant select USA
d-i keyboard-configuration/layout select USA
# LOCALE
d-i debian-installer/locale string en_US
# KEYBOARD
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string fr
# USER
d-i passwd/user-fullname string Madalynn
d-i passwd/username string madalynn
@jmmeacham
jmmeacham / toss
Created February 20, 2022 00:34
toss
# Don't set this before Set-ExecutionPolicy as it throws an error
$ErrorActionPreference = "stop"
# Remove HTTP listener
Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse
# Create a self-signed certificate to let ssl work
$Cert = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "packer"
New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $Cert.Thumbprint -Force
{
"builders": [
{
"type": "proxmox-clone",
"proxmox_url": "https://x:8006/api2/json",
"username": "x@ldap",
"password": "x",
"node": "proxmox01",
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodledb';
```
root@9b436d85ab20:/builder# PACKER_LOG=1 packer build no-vars.json
```
```
2021/03/23 16:17:20 [INFO] Packer version: 1.7.0 [go1.15.8 linux amd64]
2021/03/23 16:17:20 [TRACE] discovering plugins in /usr/bin
2021/03/23 16:17:20 [TRACE] discovering plugins in /root/.packer.d/plugins
2021/03/23 16:17:20 [TRACE] discovering plugins in .
2021/03/23 16:17:20 [INFO] PACKER_CONFIG env var not set; checking the default config file path
{
"clone_vm": "image-test",
"iso_file": "LabImages:iso/en_windows_10_business_editions_version_1809_updated_jan_2020_x64_dvd_09d06013.iso",
"proxmox_skip_tls_verify": "No",
"proxmox_host": "proxmox01",
"proxmox_skip_tls_verify": "1",
"proxmox_url": "https://proxmox.---:8006/api2/json",
"proxmox_username": "---@ldap",
"proxmox_password": "---",
"storage_pool": "LabImages",
```
{
"variables": {
"username": "{{ env `proxmox_username`}}",
"password": "{{ env `proxmox_password`}}",
"proxmox_url": "{{ env `proxmox_url`}}",
"proxmox_node": "proxmox01",
"insecure_skip_tls_verify": "true",
"winrm_username": "{{ user `winrm_username` }}",
root@9b436d85ab20:/builder# PACKER_LOG=1 packer build windows-10.json
2021/03/23 14:16:50 [INFO] Packer version: 1.7.0 [go1.15.8 linux amd64]
2021/03/23 14:16:50 [TRACE] discovering plugins in /usr/bin
2021/03/23 14:16:50 [TRACE] discovering plugins in /root/.packer.d/plugins
2021/03/23 14:16:50 [TRACE] discovering plugins in .
2021/03/23 14:16:50 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/03/23 14:16:50 [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2021/03/23 14:16:50 [WARN] Config file doesn't exist: /root/.packerconfig
2021/03/23 14:16:50 [INFO] Setting cache directory: /builder/packer_cache
2021/03/23 14:16:50 Deleting kv.Value:
{
"variables": {
"username": "{{ user `proxmox_username`}}",
"password": "{{ user `proxmox_password`}}",
"proxmox_url": "{{ user `proxmox_url`}}",
"proxmox_node": "proxmox01",
"insecure_skip_tls_verify": "true",
"winrm_username": "{{ user `winrm_username` }}",
"winrm_password": "{{ user `winrm_password` }}",