Startup script size — CloudStack and CMP
Marketplace Apps usually rely on an administrator startup script on the template. Customers may also enter their own startup script at deploy time. Both are combined into UserData sent to CloudStack, so size limits must be aligned.
CloudStack limit
CloudStack defines the maximum UserData / startup script size with the global setting:
| Setting | Scope |
|---|---|
vm.userdata.max.length | CloudStack global configuration |
Raise this value in CloudStack if your Marketplace scripts (plus any customer script) exceed the default.
See the CloudStack configuration / global settings documentation for how to change global parameters.
CMP limit (user-entered script)
CMP validates the customer-entered startup script with:
| Setting | Scope |
|---|---|
max_startup_script_size_in_bytes | CMP Global Settings |
This caps how large a script the end user may paste on Create Instance.
Combined size at deploy
At deployment, CMP combines:
- The administrator script (typically on the Marketplace template)
- The user-entered script (if any)
Total UserData size ≈ administrator script size + user-entered script size
Requirements:
- User-entered script size ≤ CMP
max_startup_script_size_in_bytes - Total UserData size ≤ CloudStack
vm.userdata.max.length
If CMP allows a large user script but CloudStack’s vm.userdata.max.length is smaller than admin script + user script, deploy fails at the orchestrator. Set CloudStack’s limit above the worst-case total you expect for Marketplace Apps.