Skip to main content

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:

SettingScope
vm.userdata.max.lengthCloudStack 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:

SettingScope
max_startup_script_size_in_bytesCMP 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:

  1. User-entered script size ≤ CMP max_startup_script_size_in_bytes
  2. Total UserData size ≤ CloudStack vm.userdata.max.length
Keep limits in sync

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.