Overview of the Issue
Running packer on a host indirectly. I'm seeing a warning that looks like it is causing a parsing error. when doing a VBoxManage --version.
This is the error:
Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id. 7.0.16r162802
Reproduction Steps
I'm only able reproduce using this indirect call to packer through another tool. Error seems to be here:
|
versionRe := regexp.MustCompile("^([.0-9]+)(?:_(?:RC|OSEr)[0-9]+)?") |
when a string is prepended to the version.
Plugin and Packer version
Packer v1.10.2
Simplified Packer Buildfile
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
Happens on Ubuntu and Rocky Linux.
Log Fragments and crash.log files
virtualbox-iso.vm: output will be in this color.
2024/04/29 20:44:09 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/04/29 20:44:09 VBoxManage path: /usr/bin/VBoxManage
2024/04/29 20:44:09 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/04/29 20:44:09 VBoxManage --version output: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
2024/04/29 20:44:09 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 7.0.16r162802
2024/04/29 20:44:09 [INFO] (telemetry) ending virtualbox-iso.vm
7.0.16r162802
==> Wait completed after 29 milliseconds 413 microseconds
2024/04/29 20:44:09 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2024/04/29 20:44:09 machine readable: virtualbox-iso.vm,error []string{"Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.\n7.0.16r162802"}
7.0.16r162802
==> Builds finished but no artifacts were created.
2024/04/29 20:44:09 [INFO] (telemetry) Finalizing.
Build 'virtualbox-iso.vm' errored after 29 milliseconds 337 microseconds: Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
7.0.16r162802
==> Wait completed after 29 milliseconds 413 microseconds
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso.vm: Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
7.0.16r162802
==> Builds finished but no artifacts were created.
2024/04/29 20:44:10 waiting for all plugin processes to complete...
2024/04/29 20:44:10 /usr/local/bin/packer: plugin process exited
2024/04/29 20:44:10 /tmp/runner-3846468805/.config/packer/plugins/github.com/hashicorp/virtualbox/packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64: plugin process exited
2024/04/29 20:44:10 /usr/local/bin/packer: plugin process exited
2024/04/29 20:44:10 /usr/local/bin/packer: plugin process exited
2024/04/29 20:44:10 /usr/local/bin/packer: plugin process exited
2024/04/29 20:44:10 /usr/local/bin/packer: plugin process exited
Overview of the Issue
Running packer on a host indirectly. I'm seeing a warning that looks like it is causing a parsing error. when doing a
VBoxManage --version.This is the error:
Reproduction Steps
I'm only able reproduce using this indirect call to packer through another tool. Error seems to be here:
packer-plugin-virtualbox/builder/virtualbox/common/driver_4_2.go
Line 321 in 54c5a24
Plugin and Packer version
Packer v1.10.2
Simplified Packer Buildfile
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
Happens on Ubuntu and Rocky Linux.
Log Fragments and crash.log files