An extension to the IBM documentation on how to provision bare metal servers on classic infrastructure using the IBM Cloud CLI.
Bare metal servers are single-tenant servers that are dedicated to the user on IBM Cloud and provisioned without a hypervisor. They are high-performance cloud servers that can be deployed in one or more data centers and are configurable with hourly or monthly options.
Bare metal options on IBM Cloud
IBM Cloud Bare Metal Servers provides various categories and options you can customize when provisioning. Some of these options include AMD, Intel, NVIDIA GPU, network redundancy, storage options, operating systems, monitoring, etc.
The following are the steps required to place an order using the IBM Cloud CLI. We will explain each step in further detail below:
- Get the bare metal server keyname you would like to provision based on the desired processor family, number of cores, drives etc.
- Choose the available locations for the server using the keyname from the first step.
- Using the same keyname from above, choose all the required and the optional values for various categories (OS, RAM, etc.) of the bare metal server.
- Select optional arguments (e.g., VLANID, subnets, ssh keys, etc.).
- Provision the bare metal server using the
ibmcloud sl order placecommand with the values obtained from the above steps.
As a prerequisite, make sure to install and configure the IBM Cloud CLI locally.
In the following example, we are looking at the steps to provision a bare metal server of Dual Intel Xeon Processor Cascade Lake Scalable Family (4 Drives) in San Jose with the OS flavor Windows Server 2022 Standard Edition (64 bit).
1. Get the bare metal server keyname
Resources on classic infrastructure are organized into different kinds of packages. To create any classic infrastructure, we need values for two parameters: package type and package keyname. When creating a bare metal resource, the package type we use is
Using this package type, we can use the ibmcloud sl command to list all the unique package keynames available for
In Figure 1, for Dual Intel Xeon Processor Cascade Lake Scalable Family (4 Drives), the package keyname is
2. Choose from the available locations for a bare metal server
For a particular package keyname, you can list all the available locations for provisioning this bare metal server using the following command:
In Figure 2, the highlighted location keyname is
3. Select values for various categories for a bare metal server
To list all the categories/options that are available while provisioning a
DUAL_INTEL_XEON_PROCESSOR_CASCADE_LAKE_SCALABLE_FAMILY_4_DRIVES bare metal server, use the following command:
In Figure 3, the Name column has all the available categories for the
DUAL_INTEL_XEON_PROCESSOR_CASCADE_LAKE_SCALABLE_FAMILY_4_DRIVES bare metal server, and the Category Code column has the respective category codes. The Is Required column denotes if the category is mandatory or not. For the mandatory categories, respective values must be passed as an argument when placing the bare metal order.
To list all the available options and their description for all the categories (e.g., server, OS, bandwidth, etc.) for the package name
DUAL_INTEL_XEON_PROCESSOR_CASCADE_LAKE_SCALABLE_FAMILY_4_DRIVES, use the following command:
Further, to list all available options for a particular category code use the
--category filter in the above command.
For example, the below command lists all available OS flavors for package name
In Figure 5, the keyname to use for the OS flavor
Windows Server 2022 Standard Edition (64 bit) would be
4. Select optional arguments
You can use other optional arguments while provisioning a bare metal server — like assigning it to a VLAN or subnet or adding an SSH key.
The following are some command to accomplish these tasks:
- Retrieve the VLAN ID:
ibmcloud sl vlan list | grep <unique name or number of your VLAN>
- Retrieve the SUBNET ID:
ibmcloud sl subnet list
- Retrieve the SSH Key IDs:
ibmcloud sl security sshkey-list
Step 5 shows how to add the above example arguments.
5. Place an order
To verify a bare metal server order before you initiate it, use the
To place a bare metal server order, use the following command:
The following is an example command to order a monthly
DUAL_INTEL_XEON_PROCESSOR_CASCADE_LAKE_SCALABLE_FAMILY_4_ bare metal server in Dallas with values for different categories:
This is an example command to order an hourly bare metal server in Dallas with values for different categories:
Add users to the bare metal server
After provisioning the bare metal server successfully, you can add or remove users who can be notified on ping failure. When a monitoring service on that hardware instance fails and the monitor is set to notify users, any users linked to that hardware instance using this service will be notified of the failure.
To create multiple user hardware notification entries:
To delete multiple users:
hardwareId is the ID of the hardware object that is to be monitored (Type: int). The
id is the unique identifier for this object (Type: int). The
userId is the ID of the
SoftLayer_User_Customer object that represents the user to be notified on monitoring failure (Type: int).
When provisioning an IBM Cloud Bare Metal Server on Classic infrastructure, all the configurations that are available for the user in the IBM Cloud UI are also available via the IBM Cloud CLI. One advantage of using the CLI is that you can easily leverage the commands in automations/scripts to provision multiple bare metal servers with the same configuration.
Learn more about IBM Cloud Bare Metal Servers.