-
-
Save dannytech/606a241149716daf22b3aa7586d18f2c to your computer and use it in GitHub Desktop.
Packer ISO Upload Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "proxmox" "windows-10-pro" { | |
proxmox_url = "${var.proxmox_host}/api2/json" | |
insecure_skip_tls_verify = true # temporary fix | |
node = var.proxmox_node | |
username = "deployer@pve!packer" | |
token = var.proxmox_token_secret | |
vm_id = var.vmid | |
template_name = "windows-10-pro" | |
sockets = 1 | |
cores = 4 | |
memory = 8192 | |
os = "win10" | |
# UEFI boot | |
bios = "ovmf" | |
efidisk = "vmstore" | |
# SPICE display adapter | |
vga { | |
type = "qxl" | |
} | |
# Networking | |
network_adapters { | |
model = "virtio" | |
bridge = "vmbr0" | |
} | |
# Paravirtualized storage | |
scsi_controller = "virtio-scsi-single" | |
disks { | |
type = "virtio" | |
cache_mode = "writeback" | |
disk_size = "64G" | |
format = "raw" | |
storage_pool = "vmstore" | |
storage_pool_type = "lvm-thin" | |
io_thread = true | |
} | |
iso_file = "resources:iso/windows-10.iso" | |
# Unattended installation file | |
additional_iso_files { | |
device = "ide3" | |
# Generate image with unattended installer | |
# cd_files = [ | |
# "./windows-10-pro.xml" | |
# ] | |
# cd_label = "autounattend" | |
iso_url = "./autounattend.iso" | |
iso_checksum = "sha1:539d87c4b66ea7bc9770f103e6e7952a97b56008" | |
iso_storage_pool = "resources" | |
unmount = true | |
} | |
# VirtIO paravirtualized Windows drivers | |
additional_iso_files { | |
device = "scsi5" | |
iso_file = "resources:iso/virtio.iso" | |
unmount = true | |
} | |
qemu_agent = true | |
# Provisioner settings | |
communicator = "winrm" | |
winrm_username = var.winrm_username | |
winrm_password = var.winrm_password | |
winrm_insecure = true | |
winrm_use_ssl = true | |
} | |
build { | |
sources = ["source.proxmox.windows-10-pro"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment