Resource Mapping - ID/Name Invalid Format

ol3d

Member
Jan 27, 2022
10
0
6
27
According to the Proxmox API, there is the ability to create a resource mapping for PCI and USB devices. The resource mapping requires a unique Name/ID to be created successfully according to the documentation here. While creating this resource mapping, using the spec from the official Proxmox api-viewer documentation, I receive the error:

Code:
Parameter verification failed. (400)
id: invalid format - invalid configuration ID 'test@1'

The documentation does not specify a 'valid' format to follow to create these IDs. Does anyone have any clarification into what CAN and CANNOT be part of this unique identifier name?
 
I have no idea. Never done resource mapping. But I guess you tried without the at sign (@), successfully?
Interestingly enough, the GUI accepts the at sign (@).

While re-reading your post - were you trying to create the resource mapping through API itself? I'm not sure that is possible. Looking at the PUT in the API, (which is the correct place) it states: "Update a hardware mapping", so I guess it must first be created with the GUI or the pvesh create command. Did you try this?
 
almost all IDs used for config entries in PVE use the following regular expression: qr/[a-z][a-z0-9_-]+/i. so yes, the "@" is the issue here ;)
 
  • Like
Reactions: ol3d
almost all IDs used for config entries in PVE use the following regular expression: qr/[a-z][a-z0-9_-]+/i. so yes, the "@" is the issue here ;)
Awesome thank you for clarifying! I was able to parse out most of the regex from trial and error and figured it was something along those lines. I wanted to ensure I wasn't introducing an error in an Ansible playbook that I am contributing to. Thanks again!
 
we should probably mention that in the format description and/or error message!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!