Skip to content

Instantly share code, notes, and snippets.

@vincentkelleher
Created January 29, 2023 23:03
Show Gist options
  • Save vincentkelleher/19178199099fb62ca172d905a808f1c9 to your computer and use it in GitHub Desktop.
Save vincentkelleher/19178199099fb62ca172d905a808f1c9 to your computer and use it in GitHub Desktop.
Packer 506 upload issue
2023/01/30 00:01:41 [INFO] Packer version: 1.8.5 [go1.18.9 darwin amd64]
2023/01/30 00:01:41 [TRACE] discovering plugins in /usr/local/bin
2023/01/30 00:01:41 [TRACE] discovering plugins in /Users/vkelleher/.config/packer/plugins
2023/01/30 00:01:41 [DEBUG] Discovered plugin: proxmox = /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64
2023/01/30 00:01:41 [INFO] found external [clone iso] builders from proxmox plugin
2023/01/30 00:01:41 [TRACE] discovering plugins in .
2023/01/30 00:01:41 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/01/30 00:01:41 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 [WARN] Config file doesn't exist: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 [INFO] Setting cache directory: /Users/vkelleher/.cache/packer
2023/01/30 00:01:41 [TRACE] listing potential installations for "github.com/hashicorp/proxmox" that match ">= 1.1.1". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/usr/local/bin/packer", ".", "/Users/vkelleher/.config/packer/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc00080e000)}}}}
2023/01/30 00:01:41 [TRACE] Found the following "github.com/hashicorp/proxmox" installations: [{/Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 v1.1.1}]
2023/01/30 00:01:41 [INFO] found external [clone iso] builders from proxmox plugin
2023/01/30 00:01:41 [TRACE] validateValue: not active for proxmox_username, so skipping
2023/01/30 00:01:41 [TRACE] validateValue: not active for proxmox_api_token, so skipping
2023/01/30 00:01:41 [TRACE] validateValue: not active for proxmox_node, so skipping
2023/01/30 00:01:41 [TRACE] validateValue: not active for k3s_username, so skipping
2023/01/30 00:01:41 [TRACE] validateValue: not active for k3s_password, so skipping
2023/01/30 00:01:41 [TRACE] validateValue: not active for proxmox_address, so skipping
2023/01/30 00:01:41 [TRACE] Starting external plugin /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 start builder iso
2023/01/30 00:01:41 Starting plugin: /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 []string{"/Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64", "start", "builder", "iso"}
2023/01/30 00:01:41 Waiting for RPC address for: /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Plugin address: unix /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin1370225074
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Waiting for connection...
2023/01/30 00:01:41 Received unix RPC address for /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64: addr is /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin1370225074
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Serving a plugin connection...
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 [TRACE] starting builder iso
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Disk 0 cache mode not set, using default 'none'
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 SCSI controller not set, using default 'lsi'
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 AdditionalISOFile 0 Device not set, using default 'ide3'
2023/01/30 00:01:41 [TRACE] Starting internal plugin packer-provisioner-shell
2023/01/30 00:01:41 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2023/01/30 00:01:41 Waiting for RPC address for: /usr/local/bin/packer
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 darwin amd64]
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] Setting cache directory: /Users/vkelleher/.cache/packer
2023/01/30 00:01:41 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/01/30 00:01:41 packer-provisioner-shell plugin: Plugin address: unix /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin3808844224
2023/01/30 00:01:41 packer-provisioner-shell plugin: Waiting for connection...
2023/01/30 00:01:41 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin3808844224
2023/01/30 00:01:41 packer-provisioner-shell plugin: Serving a plugin connection...
2023/01/30 00:01:41 [TRACE] Starting internal plugin packer-provisioner-shell
2023/01/30 00:01:41 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2023/01/30 00:01:41 Waiting for RPC address for: /usr/local/bin/packer
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 darwin amd64]
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-shell plugin: [INFO] Setting cache directory: /Users/vkelleher/.cache/packer
2023/01/30 00:01:41 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/01/30 00:01:41 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin1494627129
2023/01/30 00:01:41 packer-provisioner-shell plugin: Plugin address: unix /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin1494627129
2023/01/30 00:01:41 packer-provisioner-shell plugin: Waiting for connection...
2023/01/30 00:01:41 packer-provisioner-shell plugin: Serving a plugin connection...
2023/01/30 00:01:41 [TRACE] Starting internal plugin packer-provisioner-file
2023/01/30 00:01:41 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-file"}
2023/01/30 00:01:41 Waiting for RPC address for: /usr/local/bin/packer
2023/01/30 00:01:41 packer-provisioner-file plugin: [INFO] Packer version: 1.8.5 [go1.18.9 darwin amd64]
2023/01/30 00:01:41 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/01/30 00:01:41 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-file plugin: [WARN] Config file doesn't exist: /Users/vkelleher/.packerconfig
2023/01/30 00:01:41 packer-provisioner-file plugin: [INFO] Setting cache directory: /Users/vkelleher/.cache/packer
2023/01/30 00:01:41 packer-provisioner-file plugin: args: []string{"packer-provisioner-file"}
2023/01/30 00:01:41 packer-provisioner-file plugin: Plugin address: unix /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin4228693964
2023/01/30 00:01:41 packer-provisioner-file plugin: Waiting for connection...
2023/01/30 00:01:41 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer-plugin4228693964
2023/01/30 00:01:41 packer-provisioner-file plugin: Serving a plugin connection...
2023/01/30 00:01:41 Build debug mode: false
2023/01/30 00:01:41 Force build: false
2023/01/30 00:01:41 On error:
2023/01/30 00:01:41 Waiting on builds to complete...
2023/01/30 00:01:41 Starting build run: k3s.proxmox-iso.k3s-ubuntu-template
2023/01/30 00:01:41 Running builder:
2023/01/30 00:01:41 [INFO] (telemetry) Starting builder proxmox-iso.k3s-ubuntu-template
k3s.proxmox-iso.k3s-ubuntu-template: output will be in this color.
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 using token auth
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 No URLs were provided to Step Download. Continuing...
==> k3s.proxmox-iso.k3s-ubuntu-template: Creating CD disk...
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 CD label is set to cidata
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 CD path: /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer3287402187.iso
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Wrote 0 bytes to meta-data
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Wrote 968 bytes to user-data
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Executing: /usr/bin/hdiutil [makehybrid -o /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer3287402187.iso -hfs -joliet -iso -default-volume-name cidata /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer_to_cdrom389686586]
k3s.proxmox-iso.k3s-ubuntu-template: Creating hybrid image...
k3s.proxmox-iso.k3s-ubuntu-template: Done copying paths from CD_dirs
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 No URLs were provided to Step Download. Continuing...
k3s.proxmox-iso.k3s-ubuntu-template: Uploaded ISO to local:iso/packer3287402187.iso
==> k3s.proxmox-iso.k3s-ubuntu-template: Creating VM
==> k3s.proxmox-iso.k3s-ubuntu-template: No VM ID given, getting next free from Proxmox
==> k3s.proxmox-iso.k3s-ubuntu-template: Error creating VM: error creating VM: 506 upload 'Content-Type 'multipart/form-data; boundary=6bab62e418490cdc90766298357c58c377a5bde15f9bae68c8b32280e241' not implemented, error status: (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/ubuntu-22.04.1-live-server-amd64.iso,media=cdrom kvm:true machine: memory:4096 name:k3s net0:virtio=5A:21:7C:11:2C:DF,bridge=vmbr0,firewall=false onboot:false ostype:l26 scsi0:local-lvm:32,format=raw,iothread=false scsihw:lsi sockets:1 startup: tags: vmid:102])
k3s.proxmox-iso.k3s-ubuntu-template: Deleted generated ISO from local:iso/packer3287402187.iso
2023/01/30 00:01:41 packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64 plugin: 2023/01/30 00:01:41 Deleting CD disk: /var/folders/r9/w6xrx5_938lgq4d0bzc5kpym0000gn/T/packer3287402187.iso
2023/01/30 00:01:41 [INFO] (telemetry) ending proxmox-iso.k3s-ubuntu-template
==> Wait completed after 207 milliseconds 429 microseconds
2023/01/30 00:01:41 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2023/01/30 00:01:41 machine readable: k3s.proxmox-iso.k3s-ubuntu-template,error []string{"Error creating VM: error creating VM: 506 upload 'Content-Type 'multipart/form-data; boundary=6bab62e418490cdc90766298357c58c377a5bde15f9bae68c8b32280e241' not implemented, error status: (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/ubuntu-22.04.1-live-server-amd64.iso,media=cdrom kvm:true machine: memory:4096 name:k3s net0:virtio=5A:21:7C:11:2C:DF,bridge=vmbr0,firewall=false onboot:false ostype:l26 scsi0:local-lvm:32,format=raw,iothread=false scsihw:lsi sockets:1 startup: tags: vmid:102])"}
==> Builds finished but no artifacts were created.
2023/01/30 00:01:41 [INFO] (telemetry) Finalizing.
Build 'k3s.proxmox-iso.k3s-ubuntu-template' errored after 207 milliseconds 344 microseconds: Error creating VM: error creating VM: 506 upload 'Content-Type 'multipart/form-data; boundary=6bab62e418490cdc90766298357c58c377a5bde15f9bae68c8b32280e241' not implemented, error status: (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/ubuntu-22.04.1-live-server-amd64.iso,media=cdrom kvm:true machine: memory:4096 name:k3s net0:virtio=5A:21:7C:11:2C:DF,bridge=vmbr0,firewall=false onboot:false ostype:l26 scsi0:local-lvm:32,format=raw,iothread=false scsihw:lsi sockets:1 startup: tags: vmid:102])
==> Wait completed after 207 milliseconds 429 microseconds
==> Some builds didn't complete successfully and had errors:
--> k3s.proxmox-iso.k3s-ubuntu-template: Error creating VM: error creating VM: 506 upload 'Content-Type 'multipart/form-data; boundary=6bab62e418490cdc90766298357c58c377a5bde15f9bae68c8b32280e241' not implemented, error status: (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/ubuntu-22.04.1-live-server-amd64.iso,media=cdrom kvm:true machine: memory:4096 name:k3s net0:virtio=5A:21:7C:11:2C:DF,bridge=vmbr0,firewall=false onboot:false ostype:l26 scsi0:local-lvm:32,format=raw,iothread=false scsihw:lsi sockets:1 startup: tags: vmid:102])
==> Builds finished but no artifacts were created.
2023/01/30 00:01:42 waiting for all plugin processes to complete...
2023/01/30 00:01:42 /Users/vkelleher/.config/packer/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.1_x5.0_darwin_amd64: plugin process exited
2023/01/30 00:01:42 /usr/local/bin/packer: plugin process exited
2023/01/30 00:01:42 /usr/local/bin/packer: plugin process exited
2023/01/30 00:01:42 /usr/local/bin/packer: plugin process exited
packer {
required_plugins {
proxmox = {
version = ">= 1.1.1"
source = "github.com/hashicorp/proxmox"
}
}
}
variable "proxmox_address" {
type = string
description = "Proxmox WebUI address"
default = "https://<redacted>:8006"
}
variable "proxmox_username" {
type = string
description = "Proxmox username"
default = "packer@pve!packer"
}
variable "proxmox_api_token" {
type = string
description = "Proxmox API token"
default = "<redacted>"
}
variable "proxmox_node" {
type = string
description = "Proxmox node to deploy the image on"
default = "proxmox-node"
}
variable "k3s_username" {
type = string
description = "K3s SSH username"
default = "k3s"
}
variable "k3s_password" {
type = string
description = "K3s SSH password"
default = "<redacted>"
}
source "proxmox-iso" "k3s-ubuntu-template" {
proxmox_url = "${var.proxmox_address}/api2/json"
vm_name = "k3s"
iso_file = "local:iso/ubuntu-22.04.1-live-server-amd64.iso"
username = "${var.proxmox_username}"
token = "${var.proxmox_api_token}"
node = "${var.proxmox_node}"
iso_storage_pool = "local"
ssh_username = "${var.k3s_username}"
ssh_password = "${var.k3s_password}"
ssh_timeout = "20m"
ssh_pty = true
ssh_handshake_attempts = 20
additional_iso_files {
unmount = true
cd_files = ["${path.root}/cloud-init/meta-data", "${path.root}/cloud-init/user-data"]
cd_label = "cidata"
iso_storage_pool = "local"
}
boot_wait = "10s"
boot_command = [
"<esc><wait>",
"e<wait>",
"<down><down><down><end>",
"<bs><bs><bs><bs><wait>",
"autoinstall ds=\"nocloud\" ---<wait>",
"<f10><wait>"
]
insecure_skip_tls_verify = true
template_name = "k3s-template"
template_description = "A ready to run K3s node template"
unmount_iso = true
memory = 4096
cpu_type = "kvm64"
cores = 2
sockets = 1
os = "l26"
disks {
type = "scsi"
disk_size = "32G"
storage_pool = "local-lvm"
storage_pool_type = "lvm"
format = "raw"
}
network_adapters {
bridge = "vmbr0"
model = "virtio"
}
}
build {
name = "k3s"
sources = ["source.proxmox-iso.k3s-ubuntu-template"]
provisioner "shell" {
inline = [
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
"sudo rm /etc/ssh/ssh_host_*",
"sudo truncate -s 0 /etc/machine-id",
"sudo apt -y autoremove --purge",
"sudo apt -y clean",
"sudo apt -y autoclean",
"sudo cloud-init clean",
"sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
"sudo sync"
]
}
provisioner "shell" {
inline = [
"sudo apt update"
]
}
provisioner "file" {
source = "./cloud-init/99-pve.cfg"
destination = "/etc/cloud/cloud.cfg.d/99-pve.cfg"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment