Skip to content

metalcloud-cli vm shutdown

Gracefully shutdown or force stop a VM

Shutdown a virtual machine gracefully or force stop it. The command attempts a graceful shutdown first, which allows the guest OS to properly close running applications and services. If the VM doesn’t respond, it can be force stopped.

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

Prerequisites:

  • VM must be in ‘running’ state
  • User must have write permissions for the VM

Examples:

metalcloud-cli vm shutdown 12345

metalcloud-cli vm stop 12345

for vm in 12345 12346 12347; do metalcloud-cli vm shutdown $vm; done

metalcloud-cli vm shutdown vm_id [flags]
-h, --help help for shutdown
-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”