hashicorp / hashicorp/packer-plugin-virtualbox
Environment variable LOGNAME or USER does not correspond to effective user id
- Dominant language
- Go
- Stars
- 29
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
#### 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:
https://github.com/hashicorp/packer-plugin-virtualbox/blob/54c5a2462f860ba5f18d5817b83f51f8eed2f962/builder/virtualbox/common/driver_4_2.go#L321 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](https://gist.github.com/) of the log or use the [Github detailed
format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d)
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
```
Contributor guide
Assessment
This issue has not been assessed yet.