hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.11k stars 3.33k forks source link

The source virtualbox-iso is unknown by Packer, but plugin is installed #13151

Closed skalinkin closed 2 months ago

skalinkin commented 2 months ago

Community Note

Overview of the Issue

packer build failes with message "The source virtualbox-iso is unknown by Packer, and is likely part of a plugin that is not installed." despite plugin was installed by "packer init" command.

Reproduction Steps

use template with virtualbox-iso builder

1.11.0

From packer version

Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.

Operating system and Environment details

Windows 11

Log Fragments and crash.log files

C:\actions-runner\_work\tsunami\tsunami\images\cmep>packer init -upgrade C:\actions-runner\_work\tsunami\tsunami\images\cmep\virtualbox.pkr.hcl 
2024/08/17 00:19:19 [INFO] Packer version: 1.11.0 [go1.21.10 windows amd64]
2024/08/17 00:[19](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:20):19 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/08/17 00:19:19 [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\GITHUB_RUNNER\AppData\Roaming\packer.config
[20](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:21)24/08/17 00:19:19 [WARN] Config file doesn't exist: C:\Users\GITHUB_RUNNER\AppData\Roaming\packer.config
2024/08/17 00:19:19 [INFO] Setting cache directory: C:\actions-runner\_work\tsunami\tsunami\images\cmep\packer_cache
e: cannot determine if process is in background: Process background check error: not implemented yet
2024/08/17 00:19:19 [TRACE] init: plugingetter.ListInstallationsOptions{PluginDirectory:"C:\\Users\\GITHUB_RUNNER\\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)(0xc000627f00)}}, ReleasesOnly:true}}
2024/08/17 00:19:19 [TRACE] listing potential installations for "github.com/hashicorp/vagrant" that match ">= 1.1.0". plugingetter.ListInstallationsOptions{PluginDirectory:"C:\\Users\\GITHUB_RUNNER\\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)(0xc000627f00)}}, ReleasesOnly:true}}
2024/08/17 00:19:19 Directory "C:\\Users\\GITHUB_RUNNER\\AppData\\Roaming\\packer.d\\plugins\\github.com\\hashicorp" does not exist, the plugin likely isn't installed locally yet.
2024/08/17 00:19:19 [TRACE] getting available versions for the github.com/hashicorp/vagrant plugin
Warning: 7 00:19:19 [WARNING] github-getter: no GitHub token set, if you intend to install plugins often, please set the PACKER_GITHUB_API_TOKEN env var
2024/08/17 00:19:19 [DEBUG] github-getter: getting "https://api.github.com/repos/hashicorp/packer-plugin-vagrant/git/matching-refs/tags"
2024/08/17 00:19:20 [DEBUG] will try to install: [1.1.4 1.1.2 1.1.1 1.1.0]
2024/08/17 00:19:20 [TRACE] fetching checksums file for the "1.1.4" version of the github.com/hashicorp/vagrant plugin in "C:\\Users\\GITHUB_RUNNER\\AppData\\Roaming\\packer.d\\plugins\\github.com\\hashicorp\\vagrant"...
2024/08/17 00:19:20 [DEBUG] github-getter: getting "https://github.com/hashicorp/packer-plugin-vagrant/releases/download/v1.1.4/packer-plugin-vagrant_v1.1.4_SHA256SUMS"
2024/08/17 00:19:20 [TRACE] About to get: packer-plugin-vagrant_v1.1.4_x5.0_windows_amd64.zip
2024/08/17 00:19:20 [DEBUG] github-getter: getting "https://github.com/hashicorp/packer-plugin-vagrant/releases/download/v1.1.4/packer-plugin-vagrant_v1.1.4_x5.0_windows_amd64.zip"
2024/08/17 00:19:22 [INFO] (telemetry) Finalizing.
Installed plugin github.com/hashicorp/vagrant v1.1.4 in "C:/Users/GITHUB_RUNNER/AppData/Roaming/packer.d/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.4_x5.0_windows_amd64.exe"
2024/08/17 00:19:22 waiting for all plugin processes to complete...

C:\actions-runner\_work\tsunami\tsunami\images\cmep>packer build -force -var iso_url=C:\Users\GITHUB_RUNNER\Downloads\MEP-RHEL-Live-Image-3.0.465-1.iso -var iso_checksum=5cc32a4198ca697d924e1f1d43143660efb2ae3a0ab160d7bfcabe3bacaa75ba -var cmep_version=3.0.465 -var build_version=2024.230.17408 C:\actions-runner\_work\tsunami\tsunami\images\cmep\ 
2024/08/17 00:19:22 [INFO] Packer version: 1.11.0 [go1.[21](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:22).10 windows amd64]
2024/08/17 00:19:22 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/08/17 00:19:[22](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:23) [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\GITHUB_RUNNER\AppData\Roaming\packer.config
2024/08/17 00:19:22 [WARN] Config file doesn't exist: C:\Users\GITHUB_RUNNER\AppData\Roaming\packer.config
2024/08/17 00:19:22 [INFO] Setting cache directory: C:\actions-runner\_work\tsunami\tsunami\images\cmep\packer_cache
e: cannot determine if process is in background: Process background check error: not implemented yet
2024/08/17 00:19:22 [TRACE] listing potential installations for "github.com/hashicorp/vagrant" that match ">= 1.1.0". plugingetter.ListInstallationsOptions{PluginDirectory:"C:\\Users\\GITHUB_RUNNER\\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)(0xc000715f80)}}, ReleasesOnly:false}}
2024/08/17 00:19:[23](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:24) [TRACE] Found the following "github.com/hashicorp/vagrant" installations: [{C:\Users\GITHUB_RUNNER\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.4_x5.0_windows_amd64.exe v1.1.4 x5.0}]
20[24](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:25)/08/17 00:19:23 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2024/08/17 00:19:23 [INFO] found external [-packer-default-plugin-name- cloud registry] post-processors from vagrant plugin
2024/08/17 00:19:23 [TRACE] listing potential installations for <nil> that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"C:\\Users\\GITHUB_RUNNER\\AppData\\Roaming\\packer.d\\plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"windows", ARCH:"amd64", Ext:".exe", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha[25](https://github.com/Sergiy-Kalinkin-GWQ347_moto/tsunami/actions/runs/10429475592/job/28886945152#step:4:26)6", Hash:(*sha256.digest)(0xc00057c300)}}, ReleasesOnly:false}}
2024/08/17 00:19:23 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2024/08/17 00:19:23 [INFO] found external [-packer-default-plugin-name- cloud registry] post-processors from vagrant plugin
2024/08/17 00:19:23 [TRACE] validateValue: not active for iso_url, so skipping
2024/08/17 00:19:23 [TRACE] validateValue: not active for iso_checksum, so skipping
2024/08/17 00:19:23 [TRACE] validateValue: not active for cmep_version, so skipping
2024/08/17 00:19:23 [TRACE] validateValue: not active for build_version, so skipping

  on C:\actions-runner\_work\tsunami\tsunami\images\cmep\virtualbox.pkr.hcl line 83:
  (source code not available)

The source virtualbox-iso is unknown by Packer, and is likely part of a plugin
that is not installed.
You may find the needed plugin along with installation instructions documented
on the Packer integrations page.

https://developer.hashicorp.com/packer/integrations?filter=virtualbox

2024/08/17 00:19:23 [INFO] (telemetry) Finalizing.
Error: Unknown source type virtualbox-iso

  on C:\actions-runner\_work\tsunami\tsunami\images\cmep\virtualbox.pkr.hcl line 83:
  (source code not available)

The source virtualbox-iso is unknown by Packer, and is likely part of a plugin
that is not installed.
You may find the needed plugin along with installation instructions documented
on the Packer integrations page.

https://developer.hashicorp.com/packer/integrations?filter=virtualbox

2024/08/17 00:19:23 waiting for all plugin processes to complete...
Error: Process completed with exit code 1.
github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.