---
name: vpc-bare_metal_server_create
title: Creating Bare Metal Servers for VPC
description: IBM Cloud&reg; Bare Metal Servers for Virtual Private Cloud provides dedicated single-tenant compute resources in your VPC. Learn how to provision a bare metal server with the profile, image, network, and storage configuration of your choice.
last-updated: 2026-08-14
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/vpc?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Creating Bare Metal Servers for VPC
{: #creating-bare-metal-servers}

IBM Cloud&reg; Bare Metal Servers for Virtual Private Cloud provides dedicated single-tenant compute resources in your VPC. Learn how to provision a bare metal server with the profile, image, network, and storage configuration of your choice.
{: shortdesc}

If you want to use an operating system image that is hosted on your own server or on a public server, review [Network booting your own operating system with Bare Metal Servers for VPC](https://cloud.ibm.com/docs/vpc?topic=vpc-network-boot-bare-metal-servers&format=markdown) before you create a bare metal server.

## Creating a bare metal server by using the UI
{: #creating-bare-metal-ui}
{: ui}

Use the following steps to create a bare metal server by using the IBM Cloud&reg; console. You can also check out the following [video](https://mediacenter.ibm.com/media/t/1_j2pdfua6){: external} to learn more about creating a bare metal server.

1. In the [IBM Cloud console](https://cloud.ibm.com/login){: external}, go to **Navigation menu** icon ![Menu icon](../../icons/icon_hamburger.svg) **> Infrastructure** ![VPC icon](../../icons/vpc.svg) **> Compute > Bare metal servers**.

1. Click **Create** and enter the information that is in Table 1.

1. For Advanced options, you can choose to complete extra server configurations. For more information, see Table 2.

1. Review the configuration **Summary** and click **Create bare metal server**.

| Field | Value |
| --- | --- |
| Location | Locations are composed of regions (specific geographic areas) and zones (fault tolerant data centers within a region). Select the location where you want your bare metal server. |
| Name | A name is required for your bare metal server. |
| Resource group | Select a resource group for the server. |
| Tags | You can assign labels to your server so that you can easily filter resources in your resource list. |
| Access management tags | Access management tags help you apply flexible access policies on specific resources. |
| Image | Click **Change image** to select an image. On the Select an image page, you can select from all eligible stock and custom images. After you select your image, click **Save**.  \n  \n For more information, see [Bare metal server images](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-image&format=markdown). For information about using custom images with your bare metal server, see [Getting started with custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&interface=ui&format=markdown).  \n  \n The allowed-use expression for the selected image might affect which settings and profiles that you can use to create a bare metal server by using that image. For information on using allowed-use expressions with your bare metal server custom images, see [Adding allowed-use expressions to custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-custom-image-allowed-use-expressions&interface=ui&format=markdown).  \n  \n You can provision a bare metal server from an `available`, `partially_available` (image is not yet available in all zones), or `deprecated` image. For more information on image lifecycles, see [Custom image lifecycle](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&format=markdown#custom-image-lifecycle). |
| Profile | Click **Change profile** to select from all available vCPU and RAM combinations. The profile families are Balanced, Compute, Memory, and Very High Memory. Profiles that are unavailable in the selected location are visible but not available for selection. If you want to choose one of those profiles, click the tooltip to see the locations where that profile is available. For more information, see [x86-64 bare metal server profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile&format=markdown). |
| SSH key | Select an existing public SSH key or click **Create an SSH key** to create a new one. For more information about creating an SSH key, see [Creating your SSH key by using the UI](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys&interface=ui&format=markdown#generate-ssh-keys-ui). You must specify at least one SSH key.  \n - For x86 architecture, the SSH key is used to automatically generate a password that is required for accessing VMware&reg; ESXi Direct Console User Interface (DCUI) and the ESXi web client.  \n  \n **Note:**  SSH keys can be either RSA or Ed25519. You can generate new RSA key pairs by using the UI. Pre-existing RSA and Ed25519 SSH keys can be uploaded. Ed25519 can be used only if the operating system supports this key type. Ed25519 can't be used with Windows or VMware images. |
| Virtual private cloud | Specify the VPC where you want to create your server. You can use the default VPC, another existing VPC, or you can create a new VPC. |
| Network bandwidth | Select the network bandwidth to allocate to your server at the time of provisioning, or post provisioning. For more information, see [adjusting network bandwidth after you provision](https://cloud.ibm.com/docs/vpc?topic=vpc-managing-bare-metal-servers&interface=ui&format=markdown#viewing-bare-metal-server-ui) a bare metal server. |
| Network interfaces | By default the bare metal server is created with a single primary network interface. You can click the pencil icon to edit the details of the network interface. For example, the subnet or security group that's associated with the interface. To include extra secondary network interfaces, click **New interface**.  \n - For x86 architecture, you can create and assign up to eight PCI network interfaces and up to 20 PCI + VLAN network interfaces for each server. For more information about advanced networking configurations, see [Managing network interfaces for a bare metal server](https://cloud.ibm.com/docs/vpc?topic=vpc-managing-nic-for-bare-metal-servers&format=markdown).  \n  \n With the virtual network interface feature, you can select the type of network interface that you want to use. You can select the new option **Network attachment with a virtual network interface** or the older option **Instance network interface**. Whichever type of network interface option that you select when you provision, the bare metal server persists through the lifecycle of the bare metal server. You can click **Attach** to create a network attachment with an existing virtual network interface. For more information, see [About virtual network interfaces](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about&format=markdown).|
{: caption="Bare metal server provisioning selections" caption-side="bottom"}

| Advanced option | Value |
| --- | --- |
| User data | Paste your user data to the **User data (optional)** field or click **Import user data** to upload from your user data. For example, you can enable SSH by adding the following script to the **User data (optional)** field. For more information about user data, see [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data&format=markdown).|
| Trusted Platform Module (TPM) | Click the toggle to enable Trusted Platform Module capabilities. Then, select the mode that you want to use. For more information, see [Secure boot with Trusted Platform Module (TPM)](https://cloud.ibm.com/docs/vpc?topic=vpc-secure-boot-tpm&interface=ui&format=markdown). |
| Secure boot | Click the toggle to enable secure boot. For more information, see [Secure boot with Trusted Platform Module (TPM)](https://cloud.ibm.com/docs/vpc?topic=vpc-secure-boot-tpm&interface=ui&format=markdown). |
| Add to reservation (beta) | If you have an active reservation, click the toggle to add the server to that reservation. For more information about reservations, see [About Reservations for VPC](https://cloud.ibm.com/docs/vpc?topic=vpc-about-reserved-virtual-servers-vpc&format=markdown). |
| Metadata | Disabled by default. Click the toggle to enable. This setting informs the bare metal server to collect the bare metal server configuration information and user data. For more information, see [About IBM Cloud&reg; Virtual Private Cloud (VPC) Metadata on bare metal servers](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-server-metadata-about&format=markdown). |
| Activity tracking | Audit event collection is disabled by default. Audit event collection is helpful for optimal troubleshooting and reducing downtime. Click the toggle to enable activity tracking for your bare metal server. When enabled, audit events are collected and routed to your configured Activity Tracker Event Routing targets. For more information, see [Getting started with IBM Cloud Activity Tracker Event Routing](https://cloud.ibm.com/docs/atracker?topic=atracker-getting-started&format=markdown). |
| Logging | Logging is disabled by default. Logging is helpful for optimal troubleshooting and reducing downtime. Click the toggle to enable logging for your bare metal server. When enabled, logs are collected and routed to your configured IBM Cloud Logs Routing targets. For more information, see [Getting started with IBM Cloud Logs Routing](https://cloud.ibm.com/docs/logs-router?topic=logs-router-getting-started&format=markdown). |
| Monitoring | Monitoring is disabled by default. Monitoring is helpful for optimal troubleshooting and reducing downtime. Click the toggle to enable monitoring for your bare metal server. When enabled, metrics are collected and routed to your configured IBM Cloud Metrics Routing targets. For more information, see [Getting started with IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-getting-started&format=markdown). |
| Cloud security posture management | When you select this option, a workload protection bare metal server is created with the configurations to provide CSPM to all the resources. If a workload protection bare metal server exists, this option is not available. For more information, see [About IBM Cloud Security Posture Management (CSPM)](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-about&interface=ui&format=markdown). |
{: caption="Bare metal server advanced options" caption-side="bottom"}

For x86 architecture-based bare metal servers, the DHCP response for all interfaces (PCI or VLAN) includes a gateway. So, if you create multiple interfaces on different subnets, consider a static IP configuration or use separate network namespaces to handle the different gateways.
{: note}

## Creating a bare metal server by using the API
{: #bare-metal-creating-using-api}
{: api}

You can create a bare metal server by using the API. Use the following steps to create a bare metal server by using the API.

### Before you begin
{: #bare-metal-server-api-prereq}

1. Make sure that you set up your API environment. For more information, see [Setting up your API and CLI environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environment&format=markdown).

   To learn more about the API, click **Get a sample API call** on the create pages in IBM Cloud&reg; console. You can view the correct sequence of API requests and better understand actions and their dependencies.
   {: tip}

1. Make sure that you create a VPC and a subnet before you create a bare metal server.

### Gathering information for the bare metal server
{: #bare-metal-server-api-gather-info}

Before you use the API to create bare metal server, see the following table for the required information.

| Server detail | Listing options |
| --------- | --------- |
| Image | [List all images](https://cloud.ibm.com/docs/apis/vpc/latest#list-images) \n  \n For more information, see [Bare metal server images](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-image&format=markdown). For information about using custom images with your bare metal server, see [Getting started with custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&interface=ui&format=markdown). The allowed-use expression for the selected image might affect which settings and profiles that you can use to create a bare metal server by using that image. For information on using allowed-use expressions with your bare metal server custom images, see [Adding allowed-use expressions to custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-custom-image-allowed-use-expressions&interface=ui&format=markdown). |
| Keys | [List all keys](https://cloud.ibm.com/docs/apis/vpc/latest#list-keys)  \n  \n If you don't have any available SSH keys, use [Create a key](https://cloud.ibm.com/docs/apis/vpc/latest#create-key) to create one. For more information, see [SSH keys](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys&format=markdown).  \n  \n **Note:**  SSH keys can be either RSA or Ed25519. You can generate new RSA key pairs by using the UI. Pre-existing RSA and Ed25519 SSH keys can be uploaded. Ed25519 can be used only if the operating system supports this key type. Ed25519 can't be used with Windows or VMware images. |
| Subnet | [List all subnets](https://cloud.ibm.com/docs/apis/vpc/latest#list-subnets) |
| Security groups (optional) | [List all security groups](https://cloud.ibm.com/docs/apis/vpc/latest#list-security-groups) |
| Profile | [List all bare metal server profiles](https://cloud.ibm.com/docs/apis/vpc/latest#list-bare-metal-server-profiles) |
| Zone | [List all regions](https://cloud.ibm.com/docs/apis/vpc/latest#list-regions)  \n [List all zones in a region](https://cloud.ibm.com/docs/apis/vpc/latest#list-region-zones) |
{: caption="Information that you need to create a bare metal server by using the API" caption-side="bottom"}

You can provision a bare metal server from an `available`, `partially_available` (image is not yet available in all zones), or `deprecated` image. For more information on image lifecycles, see [Custom image lifecycle](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&format=markdown#custom-image-lifecycle).

### Creating a bare metal server with the API
{: #api-request-create-bare-metal-server}

After you have all the information, make a [Create bare metal server](https://cloud.ibm.com/docs/apis/vpc/latest#create-bare-metal-server) API request to create a bare metal server.

* For x86 architecture, you can create a bare metal server with the following example configuration:

   * ESXi image ID: "r006-31c8ca90-2623-48d7-8cf7-737be6fc4c3e"
   * SSH Key ID: "a6b1a881-2ce8-41a3-80fc-36316a73f803"
   * Name of the bare metal server: "my-bare-metal-server"
   * A primary network interface with the following configurations:
      * Allows VLAN with the ID of "4" to be attached
      * Name: "my-primary-network-interface"
      * Subnet ID: "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"
   * A secondary VLAN interface with ID "4". This VLAN interface is floatable.
   * Profile name: "bx2d-metal-192x768"
   * Zone: "us-south-1"
   * Metadata service: enabled
   * Metadata service protocol: "https"

   The API request is similar to:
   ```sh
   curl -X POST "$vpc_api_endpoint/v1/bare_metal_servers?version=2021-03-09&generation=2" \
   -H "Authorization: Bearer $iam_token" \
   -d '{
       "initialization": {
           "image": {
           "id": "r006-31c8ca90-2623-48d7-8cf7-737be6fc4c3e"
           },
           "keys": [
           {"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}
           ]
           "default_trusted_profile": {
              "auto_link": true,
              "target": {
              "crn": "crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-e9001353-12e5-41b7-a6bb-11de58dcbfea"
           }
         }
       },
       "primary_network_interface": {
           "interface_type": "pci",
           "name": "my-primary-network-interface",
           "subnet": {
           "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"
           },
           "allowed_vlans": [4]
       },
       "network_interfaces":[
          {
           "interface_type": "vlan",
           "name": "my-vlan-interface",
           "allow_interface_to_float": true,
           "subnet": {
           "id": "2302-6d5fe694-12f7-4161-b979-21bb4e872696"
            },
           "vlan": 4
          }
       ],
        "name": "my-bare-metal-server",
        "profile": {
            "name": "bx2d-metal-192x768"
        "metadata_service": {
         "enabled": true,
         "protocol": "https"
      }
        },
        "zone": {
            "name": "us-south-1"
        }
      }' | jq
    ```
    {: pre}

    The example request uses the JSON processing utility `jq` to format the response. `jq` is a third-party tool that is licensed under the [MIT license](https://stedolan.github.io/jq/download/). `jq` might not come preinstalled on all VPC images available when you create a bare metal server. You can modify the command to use another parsing tool or remove `" | jq"` to receive an unformatted response.
    {: note}

    You see a response that is similar to the following example:

    ```json
    "bandwidth": 100000,
    "boot_target": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96",
      "id": "2302-3744f199-6ccc-4698-8772-bb3937348c96",
      "name": "zipfile-delude-slang-knoll",
      "resource_type": "bare_metal_server_disk"
    },
    "cpu": {
      "architecture": "amd64",
      "core_count": 96,
      "socket_count": 4,
      "threads_per_core": 2
    },
    "created_at": "2021-03-12T09:29:17.000Z",
    "crn": "crn:[...]",
    "disks": [
      {
        "allowed_use": {
          "api_version": "2025-03-31",
          "bare_metal_server": "true"
        },
        "created_at": "2021-03-12T09:29:17.000Z",
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-3744f199-6ccc-4698-8772-bb3937348c96",
        "id": "2302-3744f199-6ccc-4698-8772-bb3937348c96",
        "interface_type": "sata",
        "name": "zipfile-delude-slang-knoll",
        "resource_type": "bare_metal_server_disk",
        "size": 960
      },
      {
        "created_at": "2021-03-12T09:29:17.000Z",
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-86003aba-47db-4d07-bd76-62e00cca83e5",
        "id": "2302-86003aba-47db-4d07-bd76-62e00cca83e5",
        "interface_type": "nvme",
        "name": "elderly-mountain-trout-opponent",
        "resource_type": "bare_metal_server_disk",
        "size": 3200
      },
      {
        "created_at": "2021-03-12T09:29:17.000Z",
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-8372237f-77cb-47e4-9c61-b9d19ddfdbcd",
        "id": "2302-8372237f-77cb-47e4-9c61-b9d19ddfdbcd",
        "interface_type": "nvme",
        "name": "could-kilt-twisty-unloaded",
        "resource_type": "bare_metal_server_disk",
        "size": 3200
      },
      {
        "created_at": "2021-03-12T09:29:17.000Z",
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-e544d72d-ca08-4924-b748-a8f67b66286d",
        "id": "2302-e544d72d-ca08-4924-b748-a8f67b66286d",
        "interface_type": "nvme",
        "name": "wildcat-impromptu-dribble-hesitate",
        "resource_type": "bare_metal_server_disk",
        "size": 3200
      },
      {
        "created_at": "2021-03-12T09:29:17.000Z",
        "href": "us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/disks/2302-de34647b-e7fb-405b-85af-d28c6dfe142c",
        "id": "2302-de34647b-e7fb-405b-85af-d28c6dfe142c",
        "interface_type": "nvme",
        "name": "imperfect-stimulate-culpable-thumb",
        "resource_type": "bare_metal_server_disk",
        "size": 3200
      }
    ],
    "enable_secure_boot": false,
    "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4",
    "id": "2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4",
    "memory": 768,
    "name": "my-bare-metal-server",
    "network_interfaces": [
      {
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/network_interfaces/2302-c094c123-5c82-49a2-8bb7-847bd3a7b62d",
        "id": "2302-c094c123-5c82-49a2-8bb7-847bd3a7b62d",
        "name": "my-primary-network-interface",
        "primary_ipv4_address": "10.240.128.5",
        "resource_type": "network_interface",
        "subnet": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-6d5fe694-12f7-4161-b979-21bb4e872696",
          "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e",
          "name": "my-subnet"
        }
      },
      {
        "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/network_interfaces/2302-edd97be7-588e-4f0b-a875-7e0bec68f767",
        "id": "2302-edd97be7-588e-4f0b-a875-7e0bec68f767",
        "name": "my-vlan-interface",
        "primary_ipv4_address": "",
        "resource_type": "network_interface",
        "subnet": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-6d5fe694-12f7-4161-b979-21bb4e872696",
          "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e",
          "name": "my-subnet"
        }
      }
    ],
    "primary_network_interface": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/2302-5e095b83-ceb4-49b5-9699-0aa5a2c996a4/network_interfaces/2302-c094c123-5c82-49a2-8bb7-847bd3a7b62d",
      "id": "2302-c094c123-5c82-49a2-8bb7-847bd3a7b62d",
      "name": "my-primary-network-interface",
      "primary_ipv4_address": "10.240.128.5",
      "resource_type": "network_interface",
      "subnet": {
        "crn": "crn:[...]",
        "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/2302-6d5fe694-12f7-4161-b979-21bb4e872696",
        "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e",
        "name": "my-subnet"
      }
    },
    "profile": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/profiles/bx2d-metal-192x768",
      "name": "bx2d-metal-192x768"
    },
    "resource_group": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/resource_groups/823edda102129f3232a0dc0655fcff94",
      "id": "823edda102129f3232a0dc0655fcff94",
      "name": "Default"
    },
    "resource_type": "bare_metal_server",
    "status": "pending",
    "status_reasons": [],
    "trusted_platform_module": {
      "enabled": false,
      "mode": ""
    },
    "vpc": {
      "crn": "crn:[...]",
      "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-96cb322a-6a59-4ac4-8783-1f059f87e4a9",
      "id": "r006-96cb322a-6a59-4ac4-8783-1f059f87e4a9",
      "name": "my-vpc"
    },
    "zone": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1",
      "name": "us-south-1"
    }
    ```
    {: codeblock}

The status displays "Pending" until the server is created.
{: tip}

For more information about the API request, see [Create a bare metal server](https://cloud.ibm.com/docs/apis/vpc/latest#create-bare-metal-server).



### Viewing your server
{: #viewing-bms-api}

When the server status changes to "Running", use the following request to view it.

```sh
curl -X GET "$vpc_api_endpoint/v1/bare_metal_servers/$bare_metal_server_id?version=2021-03-09&generation=2" \
-H "Authorization: Bearer $iam_token"
```
{: pre}

## Creating a bare metal server by using the CLI
{: #creating-bare-metal-server-using-cli}
{: cli}

You can use the CLI to create a bare metal server. Use the following steps to create a bare metal server by using the IBM Cloud&reg; CLI.

### Before you begin
{: #bare-metal-server-cli-prereq}

1. Make sure that you set up your [CLI environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environment&format=markdown#cli-prerequisites-setup).
1. Make sure that you create a VPC and a subnet before you create a bare metal server.

For more information, see [Using the CLI to create VPC resources](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-vpc-resources-with-cli-and-api&interface=cli&format=markdown#creating-a-vpc-using-cli).

### Gathering information to create a bare metal server
{: #bare-metal-server-cli-gather-info}

Before you can use the CLI to create bare metal server, you need to gather the information that is needed.

| Server details | Listing options |
| --------- | --------- |
| Image | [List all images](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#images-list) \n  \n For more information, see [Bare metal server images](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-image&format=markdown). For information about using custom images with your bare metal server, see [Getting started with custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&interface=ui&format=markdown). The allowed-use expression for the selected image might affect which settings and profiles that you can use to create a bare metal server by using that image. For information on using allowed-use expressions with your bare metal server custom images, see [Adding allowed-use expressions to custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-custom-image-allowed-use-expressions&interface=ui&format=markdown). |
| Keys | [List all keys](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#keys)  \n  \n If you don't have any available SSH keys, use [Create a key](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#key-create) to create one.  \n  \n **Note:**  SSH keys can be either RSA or Ed25519. You can generate new RSA key pairs by using the UI. Pre-existing RSA and Ed25519 SSH keys can be uploaded. Ed25519 can be used only if the operating system supports this key type. Ed25519 can't be used with Windows or VMware images.  \n For more information, see [SSH keys](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys&format=markdown). |
| Subnet | [List all subnets](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#subnets-list) |
| Security groups (optional) | [List all security groups](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#security-groups-list) |
| Profile | [List all bare metal server profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#bare-metal-server-profiles-list) |
| Zone | [List all regions](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference&format=markdown#regions)  \n List all zones in a region](/docs/vpc?topic=vpc-vpc-reference#zones) |
{: caption="Information that you need to create a bare metal server by using the CLI" caption-side="bottom"}

You can provision a bare metal server from an `available`, `partially_available` (image is not yet available in all zones), or `deprecated` image. For more information on image lifecycles, see [Custom image lifecycle](https://cloud.ibm.com/docs/vpc?topic=vpc-planning-custom-images&format=markdown#custom-image-lifecycle).

### Creating a bare metal server
{: #cli-command-create-bare-metal-server}

After you have all the information ready, you can use the CLI to create a bare metal server.

For example, you can create a bare metal server with the following configuration:

* For x86 architecture:
   * ESXi image ID: "r006-31c8ca90-2623-48d7-8cf7-737be6fc4c3e"
   * SSH Key ID: "a6b1a881-2ce8-41a3-80fc-36316a73f803"
   * Name of the bare metal server: "my-bare-metal-server"
   * A primary network interface with the following configurations:

      * VLAN with the ID of "4" to attach to the server
      * Name: "my-primary-network-interface"
      * Subnet ID: "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"

   * A secondary VLAN interface with ID "4". This VLAN interface is floatable.
   * Profile name: "bx2d-metal-192x768"
   * Zone: "us-south-1"
   * Metadata: "true"
   * Protocol: "https"
   * Default trusted profile autolink: "true"

   ```sh
   ibmcloud is bare-metal-server-create --name my-bare-metal-server --zone us-south-1 --profile mx2-metal-96x768 --image r006-31c8ca90-2623-48d7-8cf7-737be6fc4c3e --keys a6b1a881-2ce8-41a3-80fc-36316a73f803 --metadata-service true --metadata-service-protocol https --default-trusted-profile default-trusted-profile-name --default-trusted-profile-auto-link true --pnic-subnet 7ec86020-1c6e-4889-b3f0-a15f2e50f87e –pnic-name my-primary-network-interface --pnic-allowed-vlans 4 --network-interfaces '[{"name": "my-vlan-interface", "interface_type": "vlan", "vlan": 4, "allow_interface_to_float": true, "subnet": {"id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}]' --output JSON
   ```
   {: pre}



### Viewing your server
{: #viewing-bms-cli}

When the server status changes to **Running**, use the following command to view it.

```sh
ibmcloud is bare-metal-server $bare_metal_server_id --output JSON
```
{: pre}



## Next steps
{: #next-steps-after-creating-bare-metal-server}

When the bare metal server status changes to **Running**, you can connect to it.

* For x86 architecture, you can connect to VMware ESXi Direct Console User Interface (DCUI) and ESXi's web client. For more information, see [Connecting to ESXi bare metal servers](https://cloud.ibm.com/docs/vpc?topic=vpc-connect-to-ESXi-bare-metal-servers&format=markdown).