Help Center/ Bare Metal Server/ CLI Reference/ CLI Command Reference
Updated on 2026-09-29 GMT+08:00

CLI Command Reference

BMS Lifecycle Management

API Name

Command

Description

Operation

Querying Details About BMSs

hcloud BMS ListBareMetalServers

This API is used to query BMSs by filters and display details about the BMSs. The information that can be queried includes the BMS billing mode and whether a BMS is frozen.

Debug

Querying BMSs

hcloud BMS ListBareMetalServersDetail

This API is used to query BMSs by filters and display details about the BMSs.

Debug

Creating BMSs

hcloud BMS CreateBareMetalServers

This API is used to create one or more BMSs.

Debug

Querying Details About a BMS

hcloud BMS ListBareMetalServerDetails

This API is used to query details about a BMS. The information that can be queried includes the BMS billing mode and whether a BMS is frozen.

Debug

BMS Status Management

API Name

Command

Description

Operation

Changing a BMS Name

hcloud BMS ChangeBaremetalServerName

This API is used to change the name of a BMS.

Debug

Reinstalling a BMS OS

hcloud BMS ReinstallBaremetalServerOs

This API is used to reinstall the OS of a BMS. For a quick-provisioning BMS, its system disk (OS) can be reinstalled using the original image, with its data disks unchanged. A password or key pair can be injected during OS reinstallation.

Debug

Starting BMSs

hcloud BMS BatchStartBaremetalServers

This API is used to start BMSs of specified IDs.

Debug

Restarting BMSs

hcloud BMS BatchRebootBaremetalServers

This API is used to restart BMSs of specified IDs.

Debug

Stopping BMSs

hcloud BMS BatchStopBaremetalServers

This API is used to stop BMSs of specified IDs.

Debug

Obtaining the Address for Remotely Logging In to a BMS

hcloud BMS ShowServerRemoteConsole

This API is used to obtain the address for remotely logging in to a BMS.

Debug

Changing a BMS OS

hcloud BMS ChangeBaremetalServerOs

This API is used to change the OS of a BMS. A password or key pair can be injected during OS changes.

Debug

BMS Metadata Management

API Name

Command

Description

Operation

Updating BMS Metadata

hcloud BMS UpdateBaremetalServerMetadata

This API is used to update metadata of a BMS. If the metadata does not contain the field to be updated, the field is automatically added. If the metadata already contains the field, the field value will be updated. If a field in the metadata is not in the request, the field value remains unchanged.

Debug

BMS Metadata Configuration Management

API Name

Command

Description

Operation

Updating the Metadata Configuration of a BMS

hcloud BMS UpdateMetadataOptions

This API is used to update the metadata configuration of a BMS. You can enable or disable the IMDS service and select the IMDS version.

Debug

Querying the Metadata Configuration of a BMS

hcloud BMS ShowMetadataOptions

This API is used to query the metadata configuration of a BMS.

Debug

BMS NIC Management

API Name

Command

Description

Operation

Querying NICs Attached to a BMS

hcloud BMS ShowBaremetalServerInterfaceAttachments

This API is used to query information about NICs attached to a BMS, such as the IP address and MAC address of each NIC.

Debug

Detaching NICs from a BMS

hcloud BMS DeleteServerNics

This API is used to detach one or more NICs from a BMS.

Debug

Modifying the Attribute of a BMS NIC

hcloud BMS UpdateBaremetalServerInterfaceAttachments

This API is used to specify whether to delete a NIC when the BMS is deleted or the NIC is detached.

Debug

Attaching NICs to a BMS

hcloud BMS AddServerNics

This API is used to attach one or more NICs to a BMS.

Debug

Modifying a BMS NIC

hcloud BMS ModifyVmNic

This API is used to modify a BMS NIC.

Debug

BMS Disk Management

API Name

Command

Description

Operation

Attaching an EVS Disk to a BMS

hcloud BMS AttachBaremetalServerVolume

This API is used to attach an EVS disk to a BMS as a data disk if existing disks are insufficient or cannot meet requirements.

Debug

Detaching an EVS Disk from a BMS

hcloud BMS DetachBaremetalServerVolume

This API is used to detach a disk from a BMS. A disk attached to /dev/sda functions as a system disk and cannot be detached. A disk attached to a mount point other than /dev/sda functions as a data disk and can be detached from a running or stopped BMS.

Debug

Querying EVS Disks Attached to a BMS

hcloud BMS ShowBaremetalServerVolumeInfo

This API is used to query EVS disks attached to a BMS.

Debug

BMS Password Management

API Name

Command

Description

Operation

Querying Whether One-Click Password Reset Is Supported

hcloud BMS ShowResetPwd

This API is used to query whether a BMS supports one-click password reset.

Debug

Resetting the BMS Password with a Few Clicks

hcloud BMS ResetPwdOneClick

This API is used to reset the password of the BMS management account (root or Administrator) when one-click password reset is supported.

Debug

Obtaining the Password of a Windows BMS

hcloud BMS ShowWindowsBaremetalServerPwd

This API is used to obtain the random password of the administrator (account Administrator or an account configured using Cloudbase-Init) generated by the system during the initial installation of a Windows BMS.

If the BMS is created from a private image, ensure that Cloudbase-Init has been installed. Cloudbase-Init is installed on public images by default.

Debug

Deleting the Password of a Windows BMS

hcloud BMS DeleteWindowsBareMetalServerPassword

This API is used to delete the random password generated during initial Windows BMS installation. After the password is deleted, you can still use it to log in to your BMS. However, you cannot use the Get Password function to obtain the password.

If the BMS is created from a private image, ensure that Cloudbase-Init has been installed. Cloudbase-Init is installed on public images by default.

Debug

BMS Quota Management

API Name

Command

Description

Operation

Querying Tenant Quotas

hcloud BMS ShowTenantQuota

This API is used to query the quotas of all resources for a specified tenant, including used quotas.

Debug

BMS Flavor Management

API Name

Command

Description

Operation

Querying Details About Flavors and Extended Flavor Information

hcloud BMS ListBaremetalFlavorDetailExtends

This API is used to query BMS flavor details and extended flavor information. You can call this API to query the value of parameter baremetal:extBootType to check whether a flavor supports quick BMS provisioning.

Debug

Querying Available Resources

hcloud BMS ShowAvailableResource

This API is used to query available resources.

Debug

Job Management

API Name

Command

Description

Operation

Querying Job Statuses

hcloud BMS ShowJobInfos

This API is used to query the execution status of a job.

After an asynchronous API is called, for example an API for creating BMSs or attaching or detaching disks, job_id will be returned. You can use job_id to query the job status.

Debug

API Version Query

API Name

Command

Description

Operation

Querying API Versions

hcloud BMS ShowVersionsInfo

This API is used to query all available API versions of the BMS service.

Debug

Querying an API Version

hcloud BMS ShowSpecifiedVersion

This API is used to query a specified API version of the BMS service.

Debug

BMS 2D Tag Management

API Name

Command

Description

Operation

Adding Tags to a BMS

hcloud BMS BatchCreateBaremetalServerTags

This API is used to add tags to a specified BMS in a batch.

The Tag Management Service (TMS) uses this API to batch manage tags of a BMS.

Debug

Deleting Tags from a BMS

hcloud BMS BatchDeleteBaremetalServerTags

This API is used to delete tags from a specified BMS in a batch.

TMS uses this API to batch manage tags of a BMS.

Debug

Querying Tags of a BMS

hcloud BMS ShowBaremetalServerTags

This API is used to query tags of a specified BMS.

TMS uses this API to query all tags of a specified BMS.

Debug