When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
According to the docs it should be possible to run packer from wsl if the files are on the windows filesystem and if the packer chache dir is set to the users windows .packer folder. This is usefull as it would let provisioners run on it and use xorriso to generate the iso file that is created then mounted when cd_files/cd_content is used. The C:\tmp folder contains folders for each of the build runs that just contains the vm configs and vhdx files (even when stopped without cleanup). The ISO ends up in the /tmp folder not the windows tempfolder
/mnt/c/Users/user/$ PACKER_CACHE_DIR=/mnt/c/Users/user/.packer packer build ...
Reproduction Steps
The following are in windows
- Install hyper-v and wsl
- Install packer and the plugin
The following are in wsl
- Install packer and the plugin
- Install xorriso
- add the correct PACKER_CACHE_DIR to enveriment variables (either through a shell profile file, direnv, or just export the varialbe ). For instances
/mnt/c/Users/user/$ PACKER_CACHE_DIR=/mnt/c/Users/user/.packer packer build ...
- Make a packer template on somewhere on the windows filesystem that has a hyper-v source that includes:
- A gen 2 vm
- making a custom iso by using the cd_content.
- Navigate to that folder
- Run
PACKER_LOG=1 PACKER_LOG_PATH=./packer.log packer build -on-error=ask .
Plugin and Packer version
Simplified Packer Buildfile
packer {
required_plugins {
hyperv = {
source = "github.com/hashicorp/hyperv"
version = "~> v1.1.4"
}
}
}
variable "username" {
type = string
default = "vyos"
}
variable "password" {
type = string
default = "vyos"
}
locals { instance_data = { data : "hi" } }
source "hyperv-iso" "router" {
iso_urls = [
"https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso"
]
iso_checksum = "DD96826D90AA2DBB1616533C4EBF8EEB4B629CFB2B5A15C6CA0167C547DDC7E1612C3C92F0F6044F7FBBA19DCC2F1F4E5C82D0794D3AB10E8CAECDBD087225C5"
generation = 2
enable_secure_boot = false
shutdown_command = "echo y | shutdown "
shutdown_timeout = "30m"
switch_name = "Default Switch"
cd_files = ["vendor-data"]
cd_content = {
"meta-data" = jsonencode(local.instance_data)
}
cd_label = "cidata"
ssh_username = "${var.username}"
ssh_password = "${var.password}"
}
Operating system and Environment details
Log Fragments and crash.log files
Failed to find the iso
2025/01/14 12:40:22 [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64]
2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:22 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2025/01/14 12:40:22 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/user/.packerconfig
2025/01/14 12:40:22 [WARN] Config file doesn't exist: /home/user/.packerconfig
2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:22 [INFO] Setting cache directory: /mnt/c/Users/user/.cache/packer
2025/01/14 12:40:22 [TRACE] listing potential installations for "github.com/hashicorp/hyperv" that match "~> v1.1.4". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/user/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000121200)}}, ReleasesOnly:false}}
2025/01/14 12:40:22 [TRACE] Found the following "github.com/hashicorp/hyperv" installations: [{/home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 v1.1.4 x5.0}]
2025/01/14 12:40:22 [INFO] found external [iso vmcx] builders from hyperv plugin
2025/01/14 12:40:22 [TRACE] listing potential installations for that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/user/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0008d8000)}}, ReleasesOnly:false}}
2025/01/14 12:40:23 [INFO] found external [iso vmcx] builders from hyperv plugin
2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name- clone iso] builders from proxmox plugin
2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2025/01/14 12:40:23 found external [-packer-default-plugin-name- local] provisioner from ansible plugin
2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name-] builders from docker plugin
2025/01/14 12:40:23 [INFO] found external [import push save tag] post-processors from docker plugin
2025/01/14 12:40:23 [TRACE] validateValue: not active for username, so skipping
2025/01/14 12:40:23 [TRACE] validateValue: not active for password, so skipping
2025/01/14 12:40:23 [INFO] Starting external plugin /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 start builder iso
2025/01/14 12:40:23 Starting plugin: /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 []string{"/home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64", "start", "builder", "iso"}
2025/01/14 12:40:23 Waiting for RPC address for: /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64
2025/01/14 12:40:23 Received unix RPC address for /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64: addr is /tmp/packer-plugin369221482
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Plugin address: unix /tmp/packer-plugin369221482
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Waiting for connection...
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Serving a plugin connection...
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 [TRACE] starting builder iso
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 VMName: packer-router
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 DiskBlockSize: 32
2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 RamSize: 1024
2025/01/14 12:40:28 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:28 DiskSize: 40960
2025/01/14 12:40:28 [INFO] Starting internal plugin packer-provisioner-shell
2025/01/14 12:40:28 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "execute", "packer-provisioner-shell"}
2025/01/14 12:40:28 Waiting for RPC address for: /usr/bin/packer
2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64]
2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/user/.packerconfig
2025/01/14 12:40:28 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig
2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config
2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] Setting cache directory: /mnt/c/Users/user/.cache/packer
2025/01/14 12:40:28 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2025/01/14 12:40:28 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin465795622
2025/01/14 12:40:28 packer-provisioner-shell plugin: Waiting for connection...
2025/01/14 12:40:28 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin465795622
2025/01/14 12:40:28 packer-provisioner-shell plugin: Serving a plugin connection...
2025/01/14 12:40:28 ui: hyperv-iso.router: output will be in this color.
2025/01/14 12:40:28 ui:
2025/01/14 12:40:28 Build debug mode: false
2025/01/14 12:40:28 Force build: false
2025/01/14 12:40:28 On error: ask
2025/01/14 12:40:28 Waiting on builds to complete...
2025/01/14 12:40:28 Starting build run: hyperv-iso.router
2025/01/14 12:40:28 Running builder: hyperv-iso
2025/01/14 12:40:28 [INFO] (telemetry) Starting builder hyperv-iso.router
2025/01/14 12:40:28 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:28 Enter method: verifyPSVersion
2025/01/14 12:40:29 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:29 $host.version.Major output: 5
2025/01/14 12:40:29 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:29 Enter method: verifyPSHypervModule
2025/01/14 12:40:31 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:31 Enter method: verifyHypervPermissions
2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Creating build directory...
2025/01/14 12:40:32 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:32 Created build directory: /tmp/hyperv223542900
2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Retrieving ISO
2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Trying https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso
2025/01/14 12:40:32 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:32 Acquiring lock for: https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5 (/mnt/c/Users/user/.cache/packer/5225799b83b37cf38ddf9f8d1295b30b2a362189.iso.lock)
2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Trying https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5
2025/01/14 12:40:45 ui: ==> hyperv-iso.router: https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5 => /mnt/c/Users/user/.cache/packer/5225799b83b37cf38ddf9f8d1295b30b2a362189.iso
2025/01/14 12:40:45 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:45 Leaving retrieve loop for ISO
2025/01/14 12:40:45 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:45 No floppy files specified. Floppy disk will not be made.
2025/01/14 12:40:45 ui: ==> hyperv-iso.router: Creating switch 'Default Switch' if required...
2025/01/14 12:40:48 ui: ==> hyperv-iso.router: switch 'Default Switch' already exists. Will not delete on cleanup...
2025/01/14 12:40:48 ui: ==> hyperv-iso.router: Creating virtual machine...
2025/01/14 12:40:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:52 No existing virtual harddrive, not attaching.
2025/01/14 12:41:27 ui: ==> hyperv-iso.router: Enabling Integration Service...
2025/01/14 12:41:39 ui: ==> hyperv-iso.router: Setting boot drive to os dvd drive C:\Users\user\.cache\packer\5225799b83b37cf38ddf9f8d1295b30b2a362189.iso ...
2025/01/14 12:41:45 ui: ==> hyperv-iso.router: Mounting os dvd drive C:\Users\user\.cache\packer\5225799b83b37cf38ddf9f8d1295b30b2a362189.iso ...
2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Skipping mounting Integration Services Setup Disk...
2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Creating CD disk...
2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 CD label is set to cidata
2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 CD path: /tmp/packer2197062562.iso
2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 Wrote 4 bytes to vendor-data
2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 Executing: /usr/bin/xorriso [-as genisoimage -rock -joliet -volid cidata -output /tmp/packer2197062562.iso /tmp/packer_to_cdrom3833706608]
2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
2025/01/14 12:41:52 ui: hyperv-iso.router: Drive current: -outdev 'stdio:/tmp/packer2197062562.iso'
2025/01/14 12:41:52 ui: hyperv-iso.router: Media current: stdio file, overwriteable
2025/01/14 12:41:52 ui: hyperv-iso.router: Media status : is blank
2025/01/14 12:41:52 ui: hyperv-iso.router: Media summary: 0 sessions, 0 data blocks, 0 data, 814g free
2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
2025/01/14 12:41:52 ui: hyperv-iso.router: Added to ISO image: directory '/'='/tmp/packer_to_cdrom3833706608'
2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : UPDATE : 2 files added in 1 seconds
2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : UPDATE : 2 files added in 1 seconds
2025/01/14 12:41:52 ui: hyperv-iso.router: ISO image produced: 185 sectors
2025/01/14 12:41:52 ui: hyperv-iso.router: Written to medium : 185 sectors at LBA 0
2025/01/14 12:41:52 ui: hyperv-iso.router: Writing to 'stdio:/tmp/packer2197062562.iso' completed successfully.
2025/01/14 12:41:52 ui: hyperv-iso.router: Done copying paths from CD_dirs
2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Mounting secondary DVD images...
2025/01/14 12:42:00 ui error: ==> hyperv-iso.router: PowerShell error: Hyper-V\Add-VMDvdDrive : Failed to add device 'Virtual CD/DVD Disk'.
==> hyperv-iso.router: Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file specified.'.
==> hyperv-iso.router: 'packer-router' failed to add device 'Virtual CD/DVD Disk'. (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6)
==> hyperv-iso.router: 'packer-router': Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file
==> hyperv-iso.router: specified.' (0x80070002). (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6)
==> hyperv-iso.router: At C:\Users\user\AppData\Local\Temp\powershell524264086.ps1:3 char:18
==> hyperv-iso.router: + ... ontroller = Hyper-V\Add-VMDvdDrive -VMName $vmName -path $isoPath -Pa ...
==> hyperv-iso.router: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso.router: + CategoryInfo : NotSpecified: (:) [Add-VMDvdDrive], VirtualizationException
==> hyperv-iso.router: + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.AddVMDvdDrive
2025/01/14 12:42:00 ui error: ==> hyperv-iso.router: PowerShell error: Hyper-V\Add-VMDvdDrive : Failed to add device 'Virtual CD/DVD Disk'.
==> hyperv-iso.router: Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file specified.'.
==> hyperv-iso.router: 'packer-router' failed to add device 'Virtual CD/DVD Disk'. (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6)
==> hyperv-iso.router: 'packer-router': Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file
==> hyperv-iso.router: specified.' (0x80070002). (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6)
==> hyperv-iso.router: At C:\Users\user\AppData\Local\Temp\powershell524264086.ps1:3 char:18
==> hyperv-iso.router: + ... ontroller = Hyper-V\Add-VMDvdDrive -VMName $vmName -path $isoPath -Pa ...
==> hyperv-iso.router: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso.router: + CategoryInfo : NotSpecified: (:) [Add-VMDvdDrive], VirtualizationException
==> hyperv-iso.router: + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.AddVMDvdDrive
2025/01/14 12:42:00 ui: ==> hyperv-iso.router: Step "StepMountSecondaryDvdImages" failed
2025/01/14 12:42:00 ui: ask: ==> hyperv-iso.router: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
According to the docs it should be possible to run packer from wsl if the files are on the windows filesystem and if the packer chache dir is set to the users windows .packer folder. This is usefull as it would let provisioners run on it and use xorriso to generate the iso file that is created then mounted when cd_files/cd_content is used. The C:\tmp folder contains folders for each of the build runs that just contains the vm configs and vhdx files (even when stopped without cleanup). The ISO ends up in the /tmp folder not the windows tempfolder
/mnt/c/Users/user/$ PACKER_CACHE_DIR=/mnt/c/Users/user/.packer packer build ...Reproduction Steps
The following are in windows
The following are in wsl
/mnt/c/Users/user/$ PACKER_CACHE_DIR=/mnt/c/Users/user/.packer packer build ...PACKER_LOG=1 PACKER_LOG_PATH=./packer.log packer build -on-error=ask .Plugin and Packer version
packer: Packer v1.11.2
packer-hyperv: "~> v1.1.4"
wsl-packer: Packer v1.11.2
Simplified Packer Buildfile
Operating system and Environment details
OS: windows 11
wsl-os: Ubuntu 22.04.5 LTS
wsl-added-env:
PACKER_CACHE_DIR=/mnt/c/Users/user/.cache/packerLog Fragments and crash.log files
Failed to find the iso
2025/01/14 12:40:22 [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64] 2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:22 [INFO] PACKER_CONFIG env var not set; checking the default config file path 2025/01/14 12:40:22 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/user/.packerconfig 2025/01/14 12:40:22 [WARN] Config file doesn't exist: /home/user/.packerconfig 2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:22 Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:22 [INFO] Setting cache directory: /mnt/c/Users/user/.cache/packer 2025/01/14 12:40:22 [TRACE] listing potential installations for "github.com/hashicorp/hyperv" that match "~> v1.1.4". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/user/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000121200)}}, ReleasesOnly:false}} 2025/01/14 12:40:22 [TRACE] Found the following "github.com/hashicorp/hyperv" installations: [{/home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 v1.1.4 x5.0}] 2025/01/14 12:40:22 [INFO] found external [iso vmcx] builders from hyperv plugin 2025/01/14 12:40:22 [TRACE] listing potential installations for that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/user/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0008d8000)}}, ReleasesOnly:false}} 2025/01/14 12:40:23 [INFO] found external [iso vmcx] builders from hyperv plugin 2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name- clone iso] builders from proxmox plugin 2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin 2025/01/14 12:40:23 found external [-packer-default-plugin-name- local] provisioner from ansible plugin 2025/01/14 12:40:23 [INFO] found external [-packer-default-plugin-name-] builders from docker plugin 2025/01/14 12:40:23 [INFO] found external [import push save tag] post-processors from docker plugin 2025/01/14 12:40:23 [TRACE] validateValue: not active for username, so skipping 2025/01/14 12:40:23 [TRACE] validateValue: not active for password, so skipping 2025/01/14 12:40:23 [INFO] Starting external plugin /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 start builder iso 2025/01/14 12:40:23 Starting plugin: /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 []string{"/home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64", "start", "builder", "iso"} 2025/01/14 12:40:23 Waiting for RPC address for: /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 2025/01/14 12:40:23 Received unix RPC address for /home/user/.config/packer/plugins/github.com/hashicorp/hyperv/packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64: addr is /tmp/packer-plugin369221482 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Plugin address: unix /tmp/packer-plugin369221482 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Waiting for connection... 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 Serving a plugin connection... 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 [TRACE] starting builder iso 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 VMName: packer-router 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 DiskBlockSize: 32 2025/01/14 12:40:23 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:23 RamSize: 1024 2025/01/14 12:40:28 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:28 DiskSize: 40960 2025/01/14 12:40:28 [INFO] Starting internal plugin packer-provisioner-shell 2025/01/14 12:40:28 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "execute", "packer-provisioner-shell"} 2025/01/14 12:40:28 Waiting for RPC address for: /usr/bin/packer 2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64] 2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path 2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/user/.packerconfig 2025/01/14 12:40:28 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /home/user/.packerconfig 2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:28 packer-provisioner-shell plugin: Detected xdg config directory from env var: /home/user/.config 2025/01/14 12:40:28 packer-provisioner-shell plugin: [INFO] Setting cache directory: /mnt/c/Users/user/.cache/packer 2025/01/14 12:40:28 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"} 2025/01/14 12:40:28 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin465795622 2025/01/14 12:40:28 packer-provisioner-shell plugin: Waiting for connection... 2025/01/14 12:40:28 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin465795622 2025/01/14 12:40:28 packer-provisioner-shell plugin: Serving a plugin connection... 2025/01/14 12:40:28 ui: hyperv-iso.router: output will be in this color. 2025/01/14 12:40:28 ui: 2025/01/14 12:40:28 Build debug mode: false 2025/01/14 12:40:28 Force build: false 2025/01/14 12:40:28 On error: ask 2025/01/14 12:40:28 Waiting on builds to complete... 2025/01/14 12:40:28 Starting build run: hyperv-iso.router 2025/01/14 12:40:28 Running builder: hyperv-iso 2025/01/14 12:40:28 [INFO] (telemetry) Starting builder hyperv-iso.router 2025/01/14 12:40:28 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:28 Enter method: verifyPSVersion 2025/01/14 12:40:29 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:29 $host.version.Major output: 5 2025/01/14 12:40:29 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:29 Enter method: verifyPSHypervModule 2025/01/14 12:40:31 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:31 Enter method: verifyHypervPermissions 2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Creating build directory... 2025/01/14 12:40:32 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:32 Created build directory: /tmp/hyperv223542900 2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Retrieving ISO 2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Trying https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso 2025/01/14 12:40:32 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:32 Acquiring lock for: https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5 (/mnt/c/Users/user/.cache/packer/5225799b83b37cf38ddf9f8d1295b30b2a362189.iso.lock) 2025/01/14 12:40:32 ui: ==> hyperv-iso.router: Trying https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5 2025/01/14 12:40:45 ui: ==> hyperv-iso.router: https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412160007/vyos-1.5-rolling-202412160007-generic-amd64.iso?checksum=sha512%3Add96826d90aa2dbb1616533c4ebf8eeb4b629cfb2b5a15c6ca0167c547ddc7e1612c3c92f0f6044f7fbba19dcc2f1f4e5c82d0794d3ab10e8caecdbd087225c5 => /mnt/c/Users/user/.cache/packer/5225799b83b37cf38ddf9f8d1295b30b2a362189.iso 2025/01/14 12:40:45 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:45 Leaving retrieve loop for ISO 2025/01/14 12:40:45 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:45 No floppy files specified. Floppy disk will not be made. 2025/01/14 12:40:45 ui: ==> hyperv-iso.router: Creating switch 'Default Switch' if required... 2025/01/14 12:40:48 ui: ==> hyperv-iso.router: switch 'Default Switch' already exists. Will not delete on cleanup... 2025/01/14 12:40:48 ui: ==> hyperv-iso.router: Creating virtual machine... 2025/01/14 12:40:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:40:52 No existing virtual harddrive, not attaching. 2025/01/14 12:41:27 ui: ==> hyperv-iso.router: Enabling Integration Service... 2025/01/14 12:41:39 ui: ==> hyperv-iso.router: Setting boot drive to os dvd drive C:\Users\user\.cache\packer\5225799b83b37cf38ddf9f8d1295b30b2a362189.iso ... 2025/01/14 12:41:45 ui: ==> hyperv-iso.router: Mounting os dvd drive C:\Users\user\.cache\packer\5225799b83b37cf38ddf9f8d1295b30b2a362189.iso ... 2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Skipping mounting Integration Services Setup Disk... 2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Creating CD disk... 2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 CD label is set to cidata 2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 CD path: /tmp/packer2197062562.iso 2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 Wrote 4 bytes to vendor-data 2025/01/14 12:41:52 packer-plugin-hyperv_v1.1.4_x5.0_linux_amd64 plugin: 2025/01/14 12:41:52 Executing: /usr/bin/xorriso [-as genisoimage -rock -joliet -volid cidata -output /tmp/packer2197062562.iso /tmp/packer_to_cdrom3833706608] 2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project. 2025/01/14 12:41:52 ui: hyperv-iso.router: Drive current: -outdev 'stdio:/tmp/packer2197062562.iso' 2025/01/14 12:41:52 ui: hyperv-iso.router: Media current: stdio file, overwriteable 2025/01/14 12:41:52 ui: hyperv-iso.router: Media status : is blank 2025/01/14 12:41:52 ui: hyperv-iso.router: Media summary: 0 sessions, 0 data blocks, 0 data, 814g free 2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules 2025/01/14 12:41:52 ui: hyperv-iso.router: Added to ISO image: directory '/'='/tmp/packer_to_cdrom3833706608' 2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : UPDATE : 2 files added in 1 seconds 2025/01/14 12:41:52 ui: hyperv-iso.router: xorriso : UPDATE : 2 files added in 1 seconds 2025/01/14 12:41:52 ui: hyperv-iso.router: ISO image produced: 185 sectors 2025/01/14 12:41:52 ui: hyperv-iso.router: Written to medium : 185 sectors at LBA 0 2025/01/14 12:41:52 ui: hyperv-iso.router: Writing to 'stdio:/tmp/packer2197062562.iso' completed successfully. 2025/01/14 12:41:52 ui: hyperv-iso.router: Done copying paths from CD_dirs 2025/01/14 12:41:52 ui: ==> hyperv-iso.router: Mounting secondary DVD images... 2025/01/14 12:42:00 ui error: ==> hyperv-iso.router: PowerShell error: Hyper-V\Add-VMDvdDrive : Failed to add device 'Virtual CD/DVD Disk'. ==> hyperv-iso.router: Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file specified.'. ==> hyperv-iso.router: 'packer-router' failed to add device 'Virtual CD/DVD Disk'. (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6) ==> hyperv-iso.router: 'packer-router': Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file ==> hyperv-iso.router: specified.' (0x80070002). (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6) ==> hyperv-iso.router: At C:\Users\user\AppData\Local\Temp\powershell524264086.ps1:3 char:18 ==> hyperv-iso.router: + ... ontroller = Hyper-V\Add-VMDvdDrive -VMName $vmName -path $isoPath -Pa ... ==> hyperv-iso.router: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ==> hyperv-iso.router: + CategoryInfo : NotSpecified: (:) [Add-VMDvdDrive], VirtualizationException ==> hyperv-iso.router: + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.AddVMDvdDrive 2025/01/14 12:42:00 ui error: ==> hyperv-iso.router: PowerShell error: Hyper-V\Add-VMDvdDrive : Failed to add device 'Virtual CD/DVD Disk'. ==> hyperv-iso.router: Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file specified.'. ==> hyperv-iso.router: 'packer-router' failed to add device 'Virtual CD/DVD Disk'. (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6) ==> hyperv-iso.router: 'packer-router': Attachment 'C:\tmp\packer2197062562.iso' not found. Error: 'The system cannot find the file ==> hyperv-iso.router: specified.' (0x80070002). (Virtual machine ID 314555E4-A498-4559-9DBC-C448C48E8FE6) ==> hyperv-iso.router: At C:\Users\user\AppData\Local\Temp\powershell524264086.ps1:3 char:18 ==> hyperv-iso.router: + ... ontroller = Hyper-V\Add-VMDvdDrive -VMName $vmName -path $isoPath -Pa ... ==> hyperv-iso.router: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ==> hyperv-iso.router: + CategoryInfo : NotSpecified: (:) [Add-VMDvdDrive], VirtualizationException ==> hyperv-iso.router: + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.AddVMDvdDrive 2025/01/14 12:42:00 ui: ==> hyperv-iso.router: Step "StepMountSecondaryDvdImages" failed 2025/01/14 12:42:00 ui: ask: ==> hyperv-iso.router: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?