Skip to content

metalcloud-cli vm update

Update VM configuration from JSON file or pipe

Update virtual machine configuration using JSON data from a file or pipe. This command allows you to modify VM settings like CPU, memory, network interfaces, and other configuration parameters.

Arguments: vm_id Required. The unique identifier of the virtual machine to update.

Required Flags: —config-source Required. Source of the VM update configuration. Can be ‘pipe’ (to read from stdin) or path to a JSON file.

Prerequisites:

  • VM must exist and be accessible
  • User must have write permissions for the VM
  • Configuration JSON must be valid and complete
  • VM may need to be stopped for certain configuration changes

Examples:

metalcloud-cli vm update 12345 —config-source vm-config.json

cat vm-config.json | metalcloud-cli vm update 12345 —config-source pipe

echo ’{“cpu_count”: 4, “memory_size_mb”: 8192}’ | metalcloud-cli vm update 12345 —config-source pipe

metalcloud-cli vm update vm_id [flags]
--config-source string Source of the VM update configuration. Can be 'pipe' or path to a JSON file.
-h, --help help for update
-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”