A customer has an amd64 classic project whose gadget snap will use the Serial Vault.
We’d like the prepare-device hook to set a unique serial number  on each system (even if this is not currently an enforced requirement).
One method to obtain a unique serial number in the prepare-device hook may be:
$ cat /sys/devices/virtual/dmi/id/product_serial
Does this require declaring a plug or will it just work (the gadget is strict confinement)? (I don’t have spare hw to test this on.)
Is this a recommended approach or is there something better?
 snapctl set registration.proposed-serial=UNIQUE