Im attempting to create an Ubuntu 22.04 image using Packer and the Hyper-V builder plugin. My boot command runs and Ubuntu installs, however it just sits at the select language screen then SSH times out(4hr) without running my cloud-init user data to configure the fresh install of Ubuntu.
My packer file:
packer {
required_plugins {
hyperv = {
version = ">= 1.0.1"
source = "github.com/hashicorp/hyperv"
}
}
}
variable "cpus" {
type = string
default = "4"
}
variable "disk_size" {
type = string
default = "35840"
}
variable "iso_checksum" {
type = string
default = "sha256:10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb"
}
variable "iso_url" {
type = string
default = "https://releases.ubuntu.com/jammy/ubuntu-22.04.1-live-server-amd64.iso"
}
variable "memory" {
type = string
default = "8192"
}
variable "vm_name" {
type = string
default = "ubuntu"
}
source "hyperv-iso" "base" {
boot_command = [
"c<wait>",
"linux /casper/vmlinuz --- autoinstall ds=nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/ ",
"<enter><wait>",
"initrd /casper/initrd<enter><wait>",
"boot<enter>"
]
boot_wait = "5s"
communicator = "ssh"
cpus = var.cpus
disk_size = var.disk_size
generation = 2
headless = true
http_directory = "data"
iso_checksum = var.iso_checksum
iso_url = var.iso_url
iso_target_extension = "iso"
keep_registered = false
memory = var.memory
output_directory = "./build"
shutdown_command = "echo 'ubuntu' | sudo -S -E shutdown -P now"
ssh_file_transfer_method = "scp"
ssh_password = [SENSITIVE]
ssh_port = 22
ssh_timeout = "4h"
ssh_username = "ubuntu"
switch_name = "Default Switch"
vm_name = var.vm_name
}
build {
sources = ["source.hyperv-iso.base"]
}
data/user-data:
autoinstall:
version: 1
early-commands:
- sudo systemctl stop ssh
identity:
hostname: ubuntu
username: ubuntu
password: [SENSITIVE]
keyboard:
layout: en
variant: us
late-commands:
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/ubuntu
- "lvresize -v -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv"
- "resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv"
locale: en_US.UTF-8
network:
network:
version: 2
ethernets:
ens33:
dhcp4: true
packages:
- openssh-server
- open-vm-tools
- cloud-init
- whois
- zsh
- wget
- tasksel
reporting:
builtin:
type: print
storage:
layout:
name: direct
ssh:
allow-pw: true
install-server: yes
update: yes
user-data:
package_upgrade: true
disable_root: false
timezone: GMT-4
PACKER_LOG=1 packer build .:
2022/10/30 01:14:58 [INFO] Packer version: 1.8.2 [go1.17.11 windows amd64]
2022/10/30 01:14:58 [TRACE] discovering plugins in C:\ProgramData\chocolatey\lib\packer\tools
2022/10/30 01:14:58 [TRACE] discovering plugins in C:\Users\host\AppData\Roaming\packer.d\plugins
2022/10/30 01:14:58 [DEBUG] Discovered plugin: hyperv = C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe
2022/10/30 01:14:58 [DEBUG] Discovered plugin: qemu = C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\qemu\packer-plugin-qemu_v1.0.6_x5.0_windows_amd64.exe
2022/10/30 01:14:58 [DEBUG] Discovered plugin: vmware = C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vmware\packer-plugin-vmware_v1.0.7_x5.0_windows_amd64.exe
2022/10/30 01:14:58 [INFO] found external [iso vmcx] builders from hyperv plugin
2022/10/30 01:14:58 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2022/10/30 01:14:59 [INFO] found external [iso vmx] builders from vmware plugin
2022/10/30 01:14:59 [TRACE] discovering plugins in .
2022/10/30 01:14:59 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2022/10/30 01:14:59 [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\host\AppData\Roaming\packer.config
2022/10/30 01:14:59 [WARN] Config file doesn't exist: C:\Users\host\AppData\Roaming\packer.config
2022/10/30 01:14:59 [INFO] Setting cache directory: C:\Users\host\workspace\ubuntu\ark\packer_cache
e: cannot determine if process is in background: Process background check error: not implemented yet
2022/10/30 01:14:59 [TRACE] listing potential installations for "github.com/hashicorp/hyperv" that match ">= 1.0.1". plugingetter.ListInstallationsOptions{FromFolders:[]string{"C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer.exe", ".", "C:\\Users\\host\\AppData\\Roaming\\packer.d\\plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"windows", ARCH:"amd64", Ext:".exe", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc00095e480)}}}}
2022/10/30 01:14:59 [TRACE] Found the following "github.com/hashicorp/hyperv" installations: [{C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe v1.0.4}]
2022/10/30 01:14:59 [INFO] found external [iso vmcx] builders from hyperv plugin
2022/10/30 01:14:59 [TRACE] validateValue: not active for cpus, so skipping
2022/10/30 01:14:59 [TRACE] validateValue: not active for disk_size, so skipping 2022/10/30 01:14:59 [TRACE] validateValue: not active for iso_checksum, so skipping 2022/10/30 01:14:59 [TRACE] validateValue: not active for iso_url, so skipping 2022/10/30 01:14:59 [TRACE] validateValue: not active for memory, so skipping 2022/10/30 01:14:59 [TRACE] validateValue: not active for vm_name, so skipping
2022/10/30 01:14:59 [TRACE] Starting external plugin C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe start builder iso
2022/10/30 01:14:59 Starting plugin: C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe []string{"C:\\Users\\host\\AppData\\Roaming\\packer.d\\plugins\\github.com\\hashicorp\\hyperv\\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe", "start", "builder", "iso"}
2022/10/30 01:14:59 Waiting for RPC address for: C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Plugin port range: [10000,25000]
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Plugin address: tcp 127.0.0.1:10000
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Waiting for connection...
2022/10/30 01:14:59 Received tcp RPC address for C:\Users\host\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe: addr is 127.0.0.1:10000
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Serving a plugin connection...
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 [TRACE] starting builder iso
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 DiskBlockSize: 32
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 RamSize: 8192
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 DiskSize: 35840
2022/10/30 01:14:59 Build debug mode: false
hyperv-iso.base: output will be in this color.
2022/10/30 01:14:59 Force build: false
2022/10/30 01:14:59 On error:
2022/10/30 01:14:59 Waiting on builds to complete...
2022/10/30 01:14:59 Starting build run: hyperv-iso.base
2022/10/30 01:14:59 Running builder:
2022/10/30 01:14:59 [INFO] (telemetry) Starting builder hyperv-iso.base
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Enter method: verifyPSVersion
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 $host.version.Major output: 5
2022/10/30 01:14:59 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:14:59 Enter method: verifyPSHypervModule
2022/10/30 01:15:00 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:00 Enter method: verifyHypervPermissions ==> hyperv-iso.base: Creating build directory... 2022/10/30 01:15:00 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:00 Created build directory: C:\Users\host~1\AppData\Local\Temp\hyperv2443194556 ==> hyperv-iso.base: Retrieving ISO ==> hyperv-iso.base: Trying https://releases.ubuntu.com/jammy/ubuntu-22.04.1-live-server-amd64.iso
2022/10/30 01:15:00 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:00 Acquiring lock for: https://releases.ubuntu.com/jammy/ubuntu-22.04.1-live-server-amd64.iso?checksum=sha256%3A10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb (C:\Users\host\workspace\ubuntu\ark\packer_cache\281aa9855752339063385b35198e73db74cd61ba.iso.lock)
==> hyperv-iso.base: Trying https://releases.ubuntu.com/jammy/ubuntu-22.04.1-live-server-amd64.iso?checksum=sha256%3A10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb
2022/10/30 01:15:03 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:03 Leaving retrieve loop for ISO
==> hyperv-iso.base: https://releases.ubuntu.com/jammy/ubuntu-22.04.1-live-server-amd64.iso?checksum=sha256%3A10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb => C:\Users\host\workspace\ubuntu\ark\packer_cache\281aa9855752339063385b35198e73db74cd61ba.iso
2022/10/30 01:15:03 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:03 No floppy files specified. Floppy disk will not be made.
2022/10/30 01:15:03 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:03 Found available port: 8128 on IP: 0.0.0.0
==> hyperv-iso.base: Starting HTTP server on port 8128
==> hyperv-iso.base: Creating switch 'Default Switch' if required...
==> hyperv-iso.base: switch 'Default Switch' already exists. Will not delete on cleanup...
==> hyperv-iso.base: Creating virtual machine...
2022/10/30 01:15:04 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:04 No existing virtual harddrive, not attaching.
==> hyperv-iso.base: Enabling Integration Service...
2022/10/30 01:15:12 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin:
==> hyperv-iso.base: Configuring vlan...
==> hyperv-iso.base: Determine Host IP for HyperV machine...
==> hyperv-iso.base: Host IP for the HyperV machine: 172.18.64.1
==> hyperv-iso.base: Starting the virtual machine...
==> hyperv-iso.base: Waiting 5s for boot...
==> hyperv-iso.base: Typing the boot command...
2022/10/30 01:15:21 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:21 Sending char 'c', code '2eae', shift false
2022/10/30 01:15:22 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:22 [INFO] Waiting 1s
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'l', code '26a6', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'i', code '1797', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'u', code '1696', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'x', code '2dad', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '/', code '35b5', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'c', code '2eae', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'a', code '1e9e', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 's', code '1f9f', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'p', code '1999', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'e', code '1292', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'r', code '1393', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '/', code '35b5', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'v', code '2faf', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'm', code '32b2', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'l', code '26a6', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'i', code '1797', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'u', code '1696', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'z', code '2cac', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '-', code '0c8c', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '-', code '0c8c', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '-', code '0c8c', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'a', code '1e9e', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'u', code '1696', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 't', code '1494', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'o', code '1898', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'i', code '1797', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 's', code '1f9f', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 't', code '1494', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'a', code '1e9e', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'l', code '26a6', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'l', code '26a6', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'd', code '20a0', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 's', code '1f9f', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '=', code '0d8d', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'o', code '1898', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'c', code '2eae', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'l', code '26a6', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'o', code '1898', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'u', code '1696', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'd', code '20a0', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '-', code '0c8c', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'e', code '1292', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 't', code '1494', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ';', code '27a7', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 's', code '1f9f', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'e', code '1292', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'e', code '1292', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'd', code '20a0', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'f', code '21a1', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'r', code '1393', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'o', code '1898', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'm', code '32b2', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '=', code '0d8d', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'h', code '23a3', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 't', code '1494', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 't', code '1494', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char 'p', code '1999', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ':', code '2a27a7aa', shift true
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '/', code '35b5', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '/', code '35b5', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '1', code '0282', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '7', code '0888', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '2', code '0383', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '.', code '34b4', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '1', code '0282', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '8', code '0989', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '.', code '34b4', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '6', code '0787', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '4', code '0585', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '.', code '34b4', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '1', code '0282', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ':', code '2a27a7aa', shift true 2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '8', code '0989', shift false 2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '1', code '0282', shift false 2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '2', code '0383', shift false 2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '8', code '0989', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char '/', code '35b5', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:23 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:23 Special code 'Press' '<enter>' found, replacing with: &{[1c] [9c]}
2022/10/30 01:15:28 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:28 [INFO] Waiting 1s
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'i', code '1797', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'i', code '1797', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 't', code '1494', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'r', code '1393', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'd', code '20a0', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char ' ', code '39b9', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char '/', code '35b5', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'c', code '2eae', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'a', code '1e9e', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 's', code '1f9f', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'p', code '1999', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'e', code '1292', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'r', code '1393', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char '/', code '35b5', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'i', code '1797', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'n', code '31b1', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'i', code '1797', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 't', code '1494', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'r', code '1393', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Sending char 'd', code '20a0', shift false
2022/10/30 01:15:29 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:29 Special code 'Press' '<enter>' found, replacing with: &{[1c] [9c]}
2022/10/30 01:15:31 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:31 [INFO] Waiting 1s
2022/10/30 01:15:32 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:32 Sending char 'b', code '30b0', shift false
2022/10/30 01:15:32 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:32 Sending char 'o', code '1898', shift false
2022/10/30 01:15:32 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:32 Sending char 'o', code '1898', shift false
2022/10/30 01:15:32 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:32 Sending char 't', code '1494', shift false
2022/10/30 01:15:32 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:32 Special code 'Press' '<enter>' found, replacing with: &{[1c] [9c]}
2022/10/30 01:15:34 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:34 [DEBUG] Unable to get address during connection step: No ip address.
==> hyperv-iso.base: Waiting for SSH to become available...
2022/10/30 01:15:34 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:34 [INFO] Waiting for SSH, up to timeout: 4h0m0s
2022/10/30 01:15:36 packer-plugin-hyperv_v1.0.4_x5.0_windows_amd64.exe plugin: 2022/10/30 01:15:36 [DEBUG] Error getting SSH address: No ip address.
I am unable to run cloud-init because packer is unaware of my VMs IP, I see above earlier in the logs that it is aware it has an IP, also I can manually configure the VM and confirm it does have an IP and access to public internet. Im unsure of where to look or what to do next, any help would be greatly appreciated. Thank you!