Why can a configuration ID not begin with a digit?

eric.j.ason

New Member
Jun 5, 2025
4
0
1
Attempting to create a directory mapping with a name such as 4444, you get an error message saying "Parameter verification failed. (400)" and "id: invalid format - invalid configuration ID '4444'". The rule for what is valid might be this one:

Perl:
our $CONFIGID_RE = qr/[a-z][a-z0-9_-]+/i;

Why are leading digits disallowed? Could the restriction be lifted?

It unfortunately precludes using the UUID (such as 5e5b6a32-8890-47fc-96ca-abf67908fc0d) of a VM as the tag of the directory it is allowed to mount. That would have been useful. Instead, you now have to prefix the UUID with at least one letter, which then makes the whole tag too long (there is a 36 character limit), so you have to also remove the dashes from the UUID. This complicates code wherever the tag has to be handled, and makes operation more difficult to remember too.
 
which UUID are you talking about? the vmgenid is not really meant for that purpose, PVE uses the human-readable VMID as identifier across the board.. so you could just use something like `vm_<VMID>`
 
I'm talking about the SMBIOS1 UUID, which remains unchanged across reboots, just like a physical computer.

I am using the fact that it is a long, random string, so that it does not get reused later by another VM. That's why I can't use the short VMID. (Also, I need the guest to be able to read it, just like it reads an ID string from a physical computer.)

Edit: I should have been more clear about the "tag" in the first post. The name of the directory mapping is used as a Virtio-FS tag. That's why I called it that.
 
Last edited:
you are not allowed to reuse the short VMID if you are worried about these kinds of things, as it scopes things like past task logs, backup archives, potential leftover volumes, etc.pp.

I guess we could allow longer IDs for mappings, the current schema is like it is mainly because such entities are supposed to have human readable names in PVE ;)
 
ah, that's unfortunately a limitation in qemu/virtiofsd..
 
  • Like
Reactions: eric.j.ason