-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload ISO with API user #81
Comments
On first glance, this appears to be similar to the issue I'm having with Packer 1.8.1 and Proxmox 7.2. The API Token I'm using has Administrator permissions (which I intend to limit after I've verified everything works). |
Same issue here! (Proxmox |
I had to explicitly give |
I was able to test doing this with the |
Just in case this is useful for anyone later down the line, this is how I've added my Packer user and role to Proxmox: pveum useradd packer@pve
pveum passwd packer@pve
pveum roleadd Packer -privs "VM.Config.Disk VM.Config.CPU VM.Config.Cloudinit VM.Clone VM.Config.Memory Datastore.AllocateSpace Sys.Modify VM.Config.Options VM.Console VM.Allocate VM.Audit VM.Config.CDROM VM.Config.Network VM.PowerMgmt VM.Config.HWType VM.Monitor"
pveum aclmod / -user packer@pve -role Packer
Create the API token. Unfortunately only tried with the ISO builder due to #79 - so apologies if it doesn't help this particular issue! |
Overview of the Issue
When using an API token and either the
cd_files
and/orcd_content
options in anadditional_iso_files
block like below, or theiso_url
option, the upload fails with the errorPost "https://<hostname>:8006/api2/json/nodes/<node>/storage/resources/upload": write tcp 192.168.5.71:51734->192.168.1.10:8006: use of closed network connection
. I am able to manually upload an ISO without issue, and I've even tried assigning the API token I used fullAdministrator
, but it continues to fail with this error. I can also upload an ISO using a username and password rather than an API token.I'm also not positive that this report should be here and not
proxmox-api-go
, not sure where the problem lies.Reproduction Steps
Steps to reproduce this issue
cd_files
block above or create a new.iso
file and specify it withiso_url
Administrator
)use of closed network connection
pveproxy
access logs on your Proxmox server, they will show a 403 error and that the request was unauthenticatedPlugin and Packer version
From
packer version
:Simplified Packer Buildfile
Buildfile
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment:
uname -a
:Linux <removed> 5.13.19-6-pve #1 SMP PVE 5.13.19-14 (Thu, 10 Mar 2022 16:24:52 +0100) x86_64 x86_64 x86_64 GNU/Linux
):8006
Log Fragments and crash.log files
Relevant log from
/var/log/pveproxy/access.log
:This error seems to suggest that Packer isn't sending the API credentials, since authenticated requests normally start with
::ffff:127.0.0.1 - root@pam
. So the PVE API would simply be rejecting and closing the POST request, while at the same time Packer tries to upload the file, resulting in theuse of closed network connection
.The text was updated successfully, but these errors were encountered: