Skip to content

metalcloud-cli vm-type create

Create a new VM type from configuration

Create a new VM type in the MetalCloud platform using a configuration file or piped input.

The configuration must be provided in JSON format and include all required fields:

  • name: Unique name for the VM type
  • cpuCores: Number of CPU cores
  • ramGB: Amount of RAM in gigabytes

Optional fields include displayName, label, isExperimental, forUnmanagedVMsOnly, and tags.

REQUIRED FLAGS: —config-source string Source of the VM type configuration (required) Can be ‘pipe’ for stdin or path to a JSON file

EXAMPLES:

metalcloud vm-type create —config-source vm-type-config.json

echo ’{“name”:“test-vm”,“cpuCores”:2,“ramGB”:4}’ | metalcloud vm-type create —config-source pipe

Generate example config and create VM type

Section titled “Generate example config and create VM type”

metalcloud vm-type config-example > config.json

metalcloud vm-type create —config-source config.json

metalcloud-cli vm-type create [flags]
--config-source string Source of the new VM type configuration. Can be 'pipe' or path to a JSON file.
-h, --help help for create
-k, --api_key string MetalCloud API key
-c, --config string Config file path
-d, --debug Set to enable debug logging
-e, --endpoint string MetalCloud API endpoint
-f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
-i, --insecure_skip_verify Set to allow insecure transport
-l, --log_file string Log file path
-v, --verbosity string Log level verbosity (default "INFO")

Auto generated by spf13/cobra on 11-Aug-2025

Section titled “Auto generated by spf13/cobra on 11-Aug-2025”