Yes, you specify what customization spec to use with its name. If you're using the java client the easiest way to ensure you're getting the name correctly is to select it from the list of specs and hit F2. That will select the spec name as though you were going to rename it (be careful not to actually do that though), so you can just copy/paste. I don't understand why they don't pop up a dialog box to select from like they do with the actual template.
As for the actual error you're seeing--does this happen consistently for a given VM template? Do other templates not throw this error? Does it happen regardless of whether you're using a customization spec in your build info?