Stay organized with collections Save and categorize content based on your preferences.

Maintain the Bare Metal Solution environment

After your Bare Metal Solution environment is up and running, use the information included in this guide to maintain your Bare Metal Solution servers, storage, and networking.

Set up your Google Cloud project to use the Bare Metal Solution API

The Bare Metal Solution API provides many tools to let you to monitor and maintain your Bare Metal Solution environment. Typically, you only need to use this procedure the first time you use the Bare Metal Solution API. However, reuse these instructions as needed for troubleshooting purposes in case the API does not respond as expected.

  1. Assign the Bare Metal Solution Admin or Bare Metal Solution Editor predefined IAM role to your principals. To learn how to map IAM roles, see Grant an IAM role.

  2. Enable the Bare Metal Solution API in your Cloud project.

    Console

    1. Go to the Bare Metal Solution API in your Google Cloud console dashboard. You can also search for the Bare Metal Solution API in the API Library here: APIs & Services > Library.
    2. On the Bare Metal Solution API page, click Enable.
    3. Click the Back button on your browser. If you see a green checkmark next to the words API Enabled, you can use the API.

    gcloud

    • To enable the Bare Metal Solution API through gcloud, enter your gcloud CLI project ID in the following command, copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

       gcloud services enable baremetalsolution.googleapis.com --project=PROJECT_ID
       

  3. Allow the Google Cloud CLI to work with your Cloud project.

    1. In your Cloud Shell window, enter the gcloud auth login command.
      gcloud auth login
      
    2. Copy the resulting URL and paste it into a separate browser tab or window.
    3. Log in to the page by using your username associated with your Cloud project.
    4. Click Allow to enable the gcloud CLI.
    5. Copy the authorization code.
    6. Paste the code into your Cloud Shell client command line.
    7. Press the Enter or Return key.

For additional information about the general steps required to set up an API in Google Cloud, see: Getting Started with Google Cloud APIs.

Operate your Bare Metal Solution server

There are several operations you can perform on your server, such as restart and power on. Use the following commands with your server.

gcloud

  1. To power off and restart your Bare Metal Solution server, use the following steps.

    1. Make sure you follow the API set up steps.

      Restarting a server requires you to enable the Bare Metal Solution API and the gcloud CLI. You also need to grant either the Bare Metal Solution Admin or Bare Metal Solution Editor IAM role to your principals. To complete the set up steps, see Set up your Google Cloud project to use the Bare Metal Solution API.

    2. To power off and restart a Bare Metal Solution server, issue the gcloud bms instances reset command:

      gcloud bms instances reset SERVER_NAME --project=PROJECT_ID --region=REGION
      

      The output displays the status of your server restart request.

      Reset request issued for: [SERVER_NAME]

      Waiting for operation [operations/880d346a-4836-4467-acc4-29e6a430bfdd] to complete...done.

      After you enter the command, your Bare Metal Solution server restarts. The restart takes from 15 to 60 minutes to complete, depending on your server configuration.

      The output from this command provides an operations ID that you can use to check on the status of the restart. To use the operations ID and view the restart status, see View the status of a long-running operation.

  2. To turn on the power for your server, use the gcloud bms instances start command.

    gcloud bms instances start SERVER_NAME --project=PROJECT_ID --region=REGION
    

    The output displays the status of your server restart request.

    Start request issued for: [SERVER_NAME]

    Waiting for operation [operations/880d346a-4836-4467-acc4-29e6a430bfdd] to complete...done.

    In most cases, the power for your server stays on. If you need to turn off the power, use the following options:

    • Use the shutdown commands of your server's operating system.
    • Some applications turn off the power to the server automatically after a reimage.

API

  1. To power off and restart your Bare Metal Solution server, use the following steps.

    1. Make sure you follow the API set up steps.

      Restarting a server requires you to enable the Bare Metal Solution API and the gcloud CLI. You also need to grant either the Bare Metal Solution Admin or Bare Metal Solution Editor IAM role. To complete the set up steps, see Set up your Google Cloud project to use the Bare Metal Solution API.

    2. Log in to your Bare Metal Solution server to watch the server restart.

      • Open a Google Cloud console window.
      • Navigate to your jump host VM instance: Compute Engine > VM Instances
      • Click the SSH button to connect to your jump host VM instance.
      • To log in to your Bare Metal Solution server, enter the SSH command in the jump host command line.

        [username@instance-jump-host ~]$ ssh customeradmin@bms-ip-address>
        customeradmin@bms-ip-address's password: bms-password
        Last login: Mon Mar 15 22:43:19 2022 from bms-ip-address
        [customeradmin@BMS_SERVER_NAME ~]$
        
      • Enter the top command to verify that the server is running. You can use this window to monitor the progress of the reboot.

    3. Run the restart command

      • Open the Cloud Shell window.
      • Add your Cloud project ID, region, and Bare Metal Solution server name into the following command.

        curl -X POST \
        -H "Authorization: Bearer $(gcloud auth print-access-token)" \
        -H "X-Goog-User-Project: PROJECT_ID" \
        -H "Content-Type: application/json" \
        "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/BMS_SERVER_NAME:reset"
        
      • Copy and paste the command into your Cloud Shell window, and press the Enter or Return key.

        Your Bare Metal Solution server restarts. The restart takes from 15 to 60 minutes to complete, depending on your server configuration.

        The output from this command provides an operations ID that you can use to check on the status of the restart. To use the operations ID and view the status, see View the status of a long-running operation.

        {
         "name": "operations/5c0c8b3f-5edc-4117-be9f-812af9740aaf"
        }
        

        While the server reboots, you cannot use ping or SSH from your jump host VM instance to reach the Bare Metal Solution server. After several minutes, the Bare Metal Solution server comes back online.

        When the server comes back online, you can successfully issue a ping or use SSH from your jump host VM instance to reach your Bare Metal Solution server.

    For more information on restarting your Bare Metal Solution server, see the Bare Metal Solution API.

  2. To turn on the power for your server, enter your project ID, region, and server name, then issue the following curl command.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME:start"
    

    In most cases, the power for your server stays on. If you need to turn off the power, use the following options:

    • Use the shutdown commands of your server's operating system.
    • Some applications turn off the power to the server automatically after a reimage.

Manage resources in your Bare Metal Solution environment

Bare Metal Solution management APIs, gcloud commands, and the Google Cloud console enable you to view the status of the resources in your Bare Metal Solution environment, such as servers, networking, and storage.

Make sure you set up the Bare Metal Solution API

Viewing resource status requires you to enable the Bare Metal Solution API and the gcloud CLI. You also need to grant one of the Bare Metal Solution IAM roles to your principals, such as Bare Metal Solution Admin or Bare Metal Solution Editor. To complete the API set up steps prior to managing your resources, see Set up your Google Cloud project to use the Bare Metal Solution API.

View servers in your Bare Metal Solution environment

When you issue commands to call the Bare Metal Solution management APIs, you can learn about the status of the devices in your Bare Metal Solution environment. To see current status, choose one of the following command options:

Console

You can check the status of your Bare Metal Solution servers and their associated networking and storage components in the Google Cloud console.

  1. Navigate to Compute Engine > Bare Metal Solution > Servers.

  2. View the available information.

    Field Description Example
    Status Indicates the availability of a server A green circle with a check mark indicates that the server is provisioned and available.
    ID Identifier assigned to your server.
    • Click the ID to view basic information about the server.
    • Share the ID with Google Cloud support when troubleshooting this resource.
    at-1234567-svr001
    Name Server name. Click the name to view additional information about the server.

    Note: If you did not enter a name when you provisioned your server, the ID appears in this field.
    server-1
    Location Bare Metal Solution region asia-southeast1
    Server Type Server specifications o2-standard-32-metal
    Client IP Server IP address that connects to your Google Virtual Private Cloud 10.200.0.5
    Private IP Server IP address that connects to other Bare Metal Solution environment resources 192.168.2.5
    Labels Displays any labels that you added to this server

    You can use labels to filter the console output by copying the text of a label and pasting it in the Filter box just above the Status field.
    environment:test
  3. To see additional information about the server and its networking and storage capabilities, click on the Name of the server.

    • In Basic Information, you can learn if the server supports hyperthreading.
    • In Networking, you can view the network interface names, interface types (client or private), IP addresses, and MAC addresses.
    • For Storage, you can view the logical unit number (LUN) information, such as state, name, volume, size, and type. You can also see if the LUN is shareable and bootable.

gcloud

  1. To list the servers in your Bare Metal Solution environment and see their status, enter your project ID and issue the gcloud bms instances list command:

    gcloud bms instances list --project=PROJECT_ID
    

    The following output example shows information for a server, such as the server name, type, IP addresses, and state.

    NAME               PROJECT              REGION           MACHINE_TYPE          IP_ADDRESSES             STATE
    SERVER_NAME      PROJECT_ID        REGION         o2-standard-32-metal  192.168.1.1,192.168.2.1  RUNNING
    

    Additional command options include:

    • --region: View devices in a specific Google Cloud region.
    • --limit: Limit the output to show a specific number of devices
  2. To get network and storage information for a specific server in your Bare Metal Solution environment, enter your server name, project ID, and region, and issue the gcloud bms instances describe command:

    gcloud bms instances describe SERVER_NAME --project=PROJECT_ID --region=REGION
    

    The following output example shows an operational server with 12 LUNs, a client network of 192.168.1.1, and a private network of 192.168.2.1.

    luns:
    - bootLun: true
      name: SERVER_NAME-lun000-b1
      sizeGb: '200'
      state: READY
      storageVolume: SERVER_NAME-vol000-b1
    - name: STORAGE_DEVICE_NAME-lun001
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun002
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun003
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun004
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun005
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun006
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun007
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun008
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun009
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun010
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun011
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    - name: STORAGE_DEVICE_NAME-lun012
      sizeGb: '85'
      state: READY
      storageVolume: STORAGE_DEVICE_NAME-vol001
    machineType: o2-standard-32-metal
    name: projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME
    networks:
    - ipAddress: 192.168.1.1
      macAddress:
      - 34:80:0D:52:AF:28
      - 34:80:0D:15:3E:0D
      network: STORAGE_DEVICE_NAME-vlan001
    - ipAddress: 192.168.2.1
      macAddress:
      - 34:80:0D:52:AF:38
      - 34:80:0D:15:3E:1D
      network: STORAGE_DEVICE_NAME-vlan002
    state: RUNNING
    
  3. To add, update, or remove labels for servers, issue the gcloud bms instances update command. You can use the following options:

    • --update-labels: Adds labels to resources so you can filter the output of status commands. You must add each label with a key-value pair, such as environment = test.
    • --remove-labels: Removes specific labels
    • --clear-labels: Removes all labels

    Here is a sample command that adds the labels environment = dev and location = branch, and removes the label department from a server:

    gcloud bms instances update SERVER_NAME --project=PROJECT_ID --region=REGION --update-labels environment=dev,location=branch --remove-labels=department
    
    The following command removes all labels from a server:
    gcloud bms instances update SERVER_NAME --project=PROJECT_ID --region=REGION --clear-labels
    
    To view changes for server labels, issue the following command:
    gcloud bms instances describe SERVER_NAME --project=PROJECT_ID --region=REGION
    
  4. To use a label to filter the output of a gcloud bms instances list command, add --filter labels.KEY=VALUE to the end of the command. The following example limits output for a server labeled with the key-value pair environment = dev.

    gcloud bms instances list --project=PROJECT_ID --region=REGION --filter labels.environment=dev
    

API

  1. Open a Cloud Shell terminal window in your Google Cloud console.

  2. To list the servers in your Bare Metal Solution environment and see their status, enter your project ID and region into the following curl command, copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances"
    
  3. To get network and storage information for a server in your Bare Metal Solution environment, issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME"
    
  4. To add labels to a server, enter your project ID, region, and server name into the following curl command. The key-value pair in this example assigns a label of environment = test. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME?updateMask=labels"
     -d "{
      'labels' : {'environment': 'test'}
    }"
    
  5. To use a label to filter the output of a GET curl command for a Bare Metal Solution server, enter the project ID and region, and then append ?filter=labels.KEY=VALUE to the end of the command. The following example limits output to find servers with the key-value pair label environment = test.

    curl -X GET -H \
    "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances"?filter=labels.environment=test
    

Retrieve the initial password for a server

When you first receive your Bare Metal Solution server or change the operating system, the server begins in a default state and has an initial password. You must use this password the first time you gain access to the server. After you enter the initial password, the server prompts you to change the password.

To find your initial password:

gcloud

  1. Before you retrieve a password, make sure you have activated the service account provided to you by Google Cloud.
  2. In the project that contains your Bare Metal Solution resources, activate the Cloud Shell and issue the gcloud bms instances describe command.

    gcloud bms instances describe SERVER_NAME --project=PROJECT_ID --region=REGION
    
  3. In the output, look for the loginInfo field and follow the instructions.

  4. If the loginInfo field contains a gcloud beta secrets versions access command, copy and paste the command into the command line prompt and press the Enter or Return key.

  5. Retrieve the username (usually customeradmin) and password.

  6. Use these credentials to log in to the server.

  7. Change the password.

API

  1. Before you retrieve a password, make sure you have activated the service account provided to you by Google Cloud.
  2. In the project that contains your Bare Metal Solution resources, access the Cloud Shell.
  3. Enter your project ID, region, and server name into the following curl command, copy and paste the command into the command line prompt, and press the Enter or Return key.:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME"
    
  4. In the output, look for the loginInfo field and follow the instructions.

  5. If the loginInfo field contains a gcloud beta secrets versions access command, copy and paste the command into the command line prompt and press the Enter or Return key.

  6. Retrieve the username (usually customeradmin) and password.

  7. Use these credentials to log in to the server.

  8. Change the password.

Change the operating system for a Bare Metal Solution server

You can reimage a Bare Metal Solution server with a different OS image. Changing the OS image takes a long time to complete and requires a power cycle of the server. To select one of the available OS images, visit Operating systems.

gcloud

Run the gcloud bms instances update command to change the OS image on your server:

gcloud bms instances update SERVER_NAME --region REGION --os-image=OS_IMAGE

API

To update an OS image on your Bare Metal Solution server, enter your project ID, region, server name, and OS image, then issue the following curl command.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: PROJECT_ID" \
-H "Content-Type: application/json" \
"https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME?updateMask=os_image"
 -d "{
  'osImage' : 'OS_IMAGE'
}"

Because this change takes awhile to complete, you can check the status by following the steps in View the status of a long-running operation.

Enable hyperthreading on Bare Metal Solution servers

You can enable or disable hyperthreading on your Bare Metal Solution servers. This action takes a long time to complete and requires a power cycle of the server.

gcloud

Run the gcloud bms instances update command to enable or disable hyperthreading.

  • Include the –enable-hyperthreading option to enable it.
  • Include the –no-enable-hyperthreading option to disable it.
gcloud bms instances update SERVER_NAME --region REGION --enable-hyperthreading

API

To change the current hyperthreading capabilities of your server, enter your project ID, region, and server name into the following curl command. Add true for the hyperthreading value if you want to enable it or false to disable it, then issue the curl command.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: PROJECT_ID" \
-H "Content-Type: application/json" \
"https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME?updateMask=hyperthreading_enabled"
 -d "{
  'hyperthreadingEnabled' : 'HYPERTHREADING_VALUE'
}"

Because this change takes awhile to complete, you can check the status by following the steps in View the status of a long-running operation.

View networks in your Bare Metal Solution environment

Monitoring your network resources in the Bare Metal Solution environment lets you know how your servers connect to other resources. To see the status for networking, choose one of the following options:

Console

  1. In the Google Cloud console, navigate to Compute Engine > Bare Metal Solution > Networks.

  2. View the available information.

    Field Description Example
    Status Indicates the availability of a network A green circle with a check mark indicates that the network is provisioned and available.
    ID Identifier assigned to your network.
    • Click the ID to view basic information about the network.
    • Share the ID with Google Cloud support when troubleshooting this resource.
    at-1234567-vlan001
    Name Network name. Click the name to view additional information about the network.

    Note: If you did not enter a name when you provisioned your network, the ID appears in this field.
    network-1
    Location Region where the network is located asia-southeast1
    Type Client or private network Client
    CIDR IP address range for the network 192.168.1.0/24
    VLAN ID VLAN identifier assigned by Google Cloud 100
    Labels Displays any labels you added to this networking resource

    You can use labels to filter the console output by copying the text of a label and pasting it in the Filter box just above the Status field.
    environment:test

gcloud

  1. To view all networks in your Bare Metal Solution environment and see their status, enter your project ID and issue the gcloud bms networks list command.

    gcloud bms networks list --project=PROJECT_ID
    
    The following output example shows a network name, region, IP address range, network type, and VLAN ID for each network.
    NAME                REGION           RANGE           TYPE     VLAN_ID
    at-1111111-vlan001  REGION         192.168.1.0/24  CLIENT   122
    at-1111111-vlan002  REGION         192.168.2.0/24  PRIVATE  123
    
  2. To view details for a single network, enter the project ID, region, and network name, and issue the gcloud bms networks describe command:

    gcloud bms networks describe NETWORK_NAME --project=PROJECT_ID --region=REGION
    
    The following output example shows the IP address range, network name, state, network type, VLAN ID, and virtual routing and forwarding (VRF) details.
    cidr: 192.168.1.0/24
    name: projects/PROJECT_ID/locations/REGION/networks/NETWORK_NAME
    state: PROVISIONED
    type: CLIENT
    vlanId: '122'
    vrf:
      autonomousSystemNumber: '65500'
      juniperAlias: g00000-at-1111111-ic001
      name: at-1111111-ic001
      routeTarget: '282'
      state: PROVISIONED
    
  3. To add, update, or remove labels for networks, issue the gcloud bms networks update command. You can use the following options:

    • --update-labels: Adds labels to resources so you can filter the output of status commands. You must add each label with a key-value pair, such as environment = test.
    • --remove-labels: Removes specific labels
    • --clear-labels: Removes all labels

    Here is a sample command that adds the labels environment = dev and location = downtown, and removes the label cost-center from a network:

    gcloud bms networks update NETWORK_NAME --project=PROJECT_ID --region=REGION --update-labels environment=dev,location=downtown --remove-labels=cost-center
    
    The following command removes all labels from a network:
    gcloud bms networks update NETWORK_NAME --project=PROJECT_ID --region=REGION --clear-labels
    
    To view changes for network labels, issue the following command:
    gcloud bms networks describe NETWORK_NAME --project=PROJECT_ID --region=REGION
    
  4. To use a label to filter the output of a gcloud bms networks list command, add --filter labels.KEY=VALUE to the end of the command. The following example limits output for a network labeled with the key-value pair environment = dev.

    gcloud bms networks list --project=PROJECT_ID --region=REGION --filter labels.environment=dev
    

API

  1. Open a Cloud Shell terminal window in your Google Cloud console.

  2. To view all networks in your Bare Metal Solution environment and see their status, enter your project ID and region into the following curl command. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks"
    
  3. To view details for a single network, enter your project ID, region, and network name and issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks/NETWORK_NAME"
    
  4. To add labels to a network, enter your project ID, region, and network name, then issue the following curl command. The key-value pair in this example assigns a label of environment = test.

    curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks/NETWORK_NAME?updateMask=labels"
     -d "{
      'labels' : {'environment': 'test'}
    }"
    
  5. To use a label to filter the output of a GET curl command for a Bare Metal Solution network, enter the project ID and region, and then append ?filter=labels.KEY=VALUE to the end of the command. The following example limits output to find networks with the key-value pair label environment = test.

    curl -X GET -H \
    "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks"?filter=labels.environment=test
    

View advanced networking information for a Bare Metal Solution environment

If you selected the advanced networking option for complex deployments in your Bare Metal Solution environment, you can view this information by using the following server commands.

gcloud

Run the gcloud bms instances describe command to view advanced networking settings for your server.

gcloud bms instances describe SERVER_NAME --project=PROJECT_ID --region=REGION

API

To view advanced networking settings for your server, enter your project ID, region, and server name, then issue the following curl command. In the networks section of the output, you can view the network template, logical interfaces, bonded interfaces, and network type assigned to each interface.

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: PROJECT_ID" \
-H "Content-Type: application/json" \
"https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/instances/SERVER_NAME"

Implement IP Address Management in a Bare Metal Solution environment

Being able to manage your network topology inside your Bare Metal Solution environment is important. IP address management helps you create, view, and delete IP addresses for your resources. You can use this information to prevent overlapping IP addresses and resolve conflicts when requesting new resources.

View IP address reservations

To view IP addresses for existing reservations:

gcloud

Run the gcloud bms networks list-ip-reservations command:

gcloud bms networks list-ip-reservations --project=PROJECT_ID --region REGION

API

To view IP address reservations for existing resources, enter your project ID, region, and network name, then issue the following curl command. The reservations section in the output shows reserved IP address ranges.

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: PROJECT_ID" \
-H "Content-Type: application/json" \
"https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks/NETWORK_NAME"

Create and update an IP address reservation

To create a new IP address reservation or update an existing one:

gcloud

Run the gcloud bms networks update command to manage IP address reservations:

gcloud bms networks update NETWORK_NAME --project=PROJECT_ID --region REGION --add-ip-range-reservation=start-address=START_ADDRESS,end-address=END_ADDRESS,note="NOTE"
  • To remove all IP address reservations, add the --clear-ip-range-reservations option.
  • To delete one of the reserved address blocks, add the --remove-ip-range-reservation option and specify the start address and end address of the reserved IP address block that you wish to remove.
gcloud bms networks update NETWORK_NAME --project=PROJECT_ID --region REGION --remove-ip-range-reservation=start-address=START_ADDRESS,end-address=END_ADDRESS

API

To create a new IP address reservation or update an existing one, enter your project ID, region, and network name into the following command. Add a start address, end address, and a note for each block of IP addresses you want to reserve, then issue the curl command.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "X-Goog-User-Project: PROJECT_ID" \
-H "Content-Type: application/json" \
"https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/networks/NETWORK_NAME?updateMask=reservations"
 -d "{
  'reservations' : [
    {
      'startAddress' : 'START_ADDRESS_1',
      'endAddress' : 'END_ADDRESS_1',
      'note' : 'NOTES_1'
    },
    {
      'startAddress' : 'START_ADDRESS_2',
      'endAddress' : 'END_ADDRESS_2',
      'note' : 'NOTES_2'
    }
  ]
}"
  • The IP address reservation blocks must fall within the CIDR range of the target network.
  • Do not use .1 (the gateway IP address) in a reservation block.
  • Each time you run this curl command, it overwrites the previous set of reservations. If you need to make updates, be sure to include all sets of reservation blocks before you issue the command.
  • To clear all reservations, replace the end of the command with the following:

    -d "{
    'reservations' : []
    }"
    

View storage in your Bare Metal Solution environment

Paying attention to your storage resources in the Bare Metal Solution environment helps you determine if your servers have enough storage capacity for applications and workloads. To see status for storage, choose one of the following options:

Console

  1. In the Google Cloud console, navigate to Compute Engine > Bare Metal Solution > Volumes.

  2. View the available information.

    Field Description Example
    Status Indicates the availability of a storage volume A green circle with a check mark indicates that the storage volume is ready.
    ID Identifier assigned to your storage volume.
    • Click the ID to view basic information about the storage volume, including LUNs and snapshots.
    • Share the ID with Google Cloud support when troubleshooting this resource.
    • Boot volume:
      at-1234567-svr001-vol000-b1
    • Fibre Channel volume:
      at-1111111-vol001
    • NFS share:
      at-2222222-nfs001-vol000
    Name Storage volume name. Click the name to view additional information about the storage volume, including LUNs and snapshots.

    Note: If you did not enter a name when you provisioned your storage volume, the ID appears in this field.
    • Boot volume:
      boot-volume-1
    • Fibre Channel volume:
      fibre-channel-volume-5
    • NFS share:
      nfs-share-7
    Location Region where the storage volume is located asia-southeast1
    Type Hard drive or solid-state drive HDD - Hard drive
    Labels Displays any labels you added to this storage resource

    You can use labels to filter the console output by copying the text of a label and pasting it in the Filter box just above the Status field.
    environment:test

gcloud

  1. To view all storage volumes in your Bare Metal Solution environment and see their status, enter your project ID and issue the gcloud bms volumes list command:

    gcloud bms volumes list --project=PROJECT_ID
    
    The following output example shows three storage volumes, the project ID, region, volume size and storage type.
    NAME                         PROJECT              REGION           REQUESTED_SIZE_GIB  STORAGE_TYPE  STATE
    at-1234567-svr001-vol000-b1  PROJECT_ID         REGION         200                 SSD           READY
    at-1111111-vol001            PROJECT_ID         REGION         1024                SSD           READY
    at-2222222-nfs001-vol000     PROJECT_ID         REGION         400                 HDD           READY
    
  2. To view a single storage volume, enter your storage volume name, project ID, and region, and issue the gcloud bms volumes describe command:

    gcloud bms volumes describe VOLUME_NAME --project=PROJECT_ID --region=REGION
    
    The following output example shows the storage volume size, name, snapshot auto deletion policy, state, and storage type.
    currentSizeGib: '250'
    name: projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME
    requestedSizeGib: '250'
    snapshotAutoDeleteBehavior: OLDEST_FIRST
    snapshotReservationDetail:
      reservedSpaceGib: '50'
      reservedSpaceRemainingGib: '50'
    state: READY
    storageType: SSD
    
  3. To add, update, or remove labels for storage volumes, issue the gcloud bms volumes update command. You can use the following options:

    • --update-labels: Adds labels to resources so you can filter the output of status commands. You must add each label with a key-value pair, such as environment = production.
    • --remove-labels: Removes specific labels
    • --clear-labels: Removes all labels

    Here is a sample command that adds the labels environment = production and location = hq, and removes the label rack from a storage volume:

    gcloud bms volumes update VOLUME_NAME --project=PROJECT_ID --region=REGION --update-labels environment=production,location=hq --remove-labels=rack
    
    The following command removes all labels from a storage volume:
    gcloud bms volumes update VOLUME_NAME --project=PROJECT_ID --region=REGION --clear-labels
    
    To view changes for storage volume labels, issue the following command:
    gcloud bms volumes describe VOLUME_NAME --project=PROJECT_ID --region=REGION
    
  4. To use a label to filter the output of a gcloud bms volumes list command, add --filter labels.KEY=VALUE to the end of the command. The following example limits output for a storage volume labeled with the key-value pair environment = production.

    gcloud bms volumes list --project=PROJECT_ID --region=REGION --filter labels.environment=production
    
  5. To view all LUNs for your storage volume, enter your project ID, region, and storage volume name, and issue the gcloud bms volumes luns list command:

    gcloud bms volumes luns list --project=PROJECT_ID --region=REGION --volume=VOLUME_NAME
    
    The following output example shows the names of the LUNs, region, storage volume name, volume size, and the state.
    NAME                         REGION           VOLUME       SIZE_GB  STATE
    at-11111111-vol001-lun000    REGION        VOLUME_NAME 200      READY
    
  6. To view details for a single LUN, enter your project ID, region, and LUN name, and issue the gcloud bms volumes luns describe command:

    gcloud bms volumes luns describe LUN_NAME --project=PROJECT_ID --region=REGION --volume=VOLUME_NAME
    
    The following output example shows the LUN name and storage volume information, such as size, state, storage type, name, and ID.
    bootLun: true
    name: projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME/luns/LUN_NAME
    sizeGb: '200'
    state: READY
    storageType: SSD
    storageVolume: VOLUME_NAME
    wwid: 600a09803831434434244f774d616b94
    

API

  1. Open a Cloud Shell terminal window in your Google Cloud console.

  2. To view all storage volumes in your Bare Metal Solution environment and see their status, enter your project ID and region into the following curl command. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes"
    
  3. To view a single storage volume, enter your project ID, region, and storage volume name and issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME"
    
  4. To view all logical unit numbers (LUNs) for your storage volume, enter your project ID, region, and storage volume name, then issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME/luns
    
  5. To view details for a single LUN, enter your project ID, region, storage volume name, and LUN name and issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME/luns/LUN_NAME"
    
  6. To add labels to a storage volume, enter your project ID, region, and storage volume name, then issue the following curl command. The key-value pair in this example assigns a label of environment = test.

    curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes/VOLUME_NAME?updateMask=labels"
     -d "{
      'labels' : {'environment': 'test'}
    }"
    
  7. To use a label to filter the output of a GET curl command for a Bare Metal Solution storage volume, enter the project ID and region, and then append ?filter=labels.KEY=VALUE to the end of the command. The following example limits output to find storage volumes with the key-value pair label environment = test.

    curl -X GET -H \
    "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/volumes"?filter=labels.environment=test
    

Provision storage volume resources in your Bare Metal Solution environment

After ordering storage resources for your Bare Metal Solution environment, you can provision the resources once they are available. You can provision the following self-service options:

  • Create a new Fibre Channel storage volume
  • Create LUNs on a volume
  • Select and attach the newly created LUNs to your servers

Create a new storage volume

To create a new storage volume:

Console

  1. In the Google Cloud console, navigate to the Compute Engine > Bare Metal Solution > Volumes menu.

  2. Click Create.

  3. Enter the following information:

    Field Description Example
    Region Google Cloud region located closest to your Bare Metal Solution environment. us-central1
    Name Create a name for your storage volume. volume-1
    Type Select the type of storage:
    • SSD – Solid state drive
    • HDD – Hard drive
    SSD
    Size Select the size of the drive in GiB, where 1024 GiB = 1 TiB. The size ranges from a minimum of 100 GiB to a maximum of 16 TiB. If you need more than 16 TiB, create additional volumes as needed. 16384
    Snapshot enabled Saves a backup copy of your storage volume once per day. Required for custom snapshots, but disabled by default. Checkbox selected to enable snapshots
    Configuration Select the type of LUN configuration you need:
    • Default configuration – Create LUNs of equal size (recommended).
    • Custom configuration – Create LUNs with different sizes.
    Default configuration
    Target server Select a server and attach the storage volume. server-1
  4. Click Create.

  5. The console checks if there is enough space available for the requested storage volume. The console implements the change if there is available space, or alerts you if the operation cannot be performed. If your storage volume request succeeds, billing for the additional storage begins automatically.

  6. After you have provisioned the storage volume, you can share it with additional servers.

Create LUNs for a storage volume

To create LUNs for a storage volume:

Console

  1. In the Google Cloud console, navigate to the Compute Engine > Bare Metal Solution > Volumes menu.

  2. Next to the LUNs section, click Create.

  3. Enter the following information:

    Field Description Example
    Number of LUNs Total number of LUNs you want to create with a particular size. 4
    Size Select the size of the LUN in GiB, where 1024 GiB = 1 TiB. 1024
  4. Click Add item if you need to create more than one set of LUNs.

  5. Click Create to deploy the new LUNs.

Attach storage volumes to servers

To attach existing storage volumes to existing servers:

Console

  1. Navigate to the Compute Engine > Bare Metal Solution > Servers page.

  2. Click on the name of the server that needs a storage volume.

  3. Click Attach Volume next to the LUNs section.

  4. Select the storage volume from the menu and click Attach.

  5. To attach the same storage volume to other servers, return to the Server Details page and repeat this procedure.

Remove storage volume resources in a Bare Metal Solution environment

When you no longer need specific storage volume resources, you can remove them. Options include:

  • Detaching a storage volume from a server
  • Deleting LUNs from a storage volume
  • Deleting a storage volume

Detach a storage volume from a server

To detach a storage volume from a server:

Console

  1. Navigate to the Compute Engine > Bare Metal Solution > Servers page and click on the server that has attached storage volumes.

  2. Scroll down to the LUNs section and click Detach Volume.

  3. Using from the menu, select the storage volume that you wish to remove and click Detach.

    The server reboots and removes the storage volume and its LUNs from the server.

Delete LUNs from a storage volume

To delete LUNs from a storage volume:

Console

  1. Navigate to the Compute Engine > Bare Metal Solution > Volumes page.

  2. Click the name of the storage volume that contains the LUNs you want to remove.

  3. In the LUNs section, check the boxes for the LUNs you want to remove and click Delete.

Delete a storage volume

To delete a storage volume:

Console

  1. Navigate to the Compute Engine > Bare Metal Solution > Volumes page.

  2. Check the boxes for the storage volumes that you want to remove and click Delete.

View NFS file storage in your Bare Metal Solution environment

After you order and provision NFS for Bare Metal Solution, you can view the status of your NFS file storage and confirm that Google Cloud implemented your configured settings as expected. To see the current status, choose one of the following command options:

Console

  1. In the Google Cloud console, navigate to Compute Engine > Bare Metal Solution > NFS Shares.

  2. View the available information.

    Field Description Example
    Status Indicates the availability of an NFS volume A green circle with a check mark indicates that the NFS volume is provisioned.
    ID Identifier assigned to your NFS storage device that hosts your volume.
    • Click the ID to view additional information about the storage volume, including allowed clients and NFS properties.
    • Share the ID with Google Cloud support when troubleshooting this resource.
    at-2222222-nfs001
    Name Name of the NFS storage device that hosts your volume. Click the name to view additional information about the storage volume, including allowed clients and NFS properties.

    Note: If you did not enter a name when you provisioned your NFS storage device, the ID appears in this field.
    nfs-share-7
    Location Region for the NFS storage volume asia-southeast1
    Volume Name of the NFS storage volume. Click the name to view additional information about the NFS storage volume, such as snapshots. at-2222222-nfs001-vol000
    Labels Displays any labels you added to this NFS file storage resource

    You can use labels to filter the console output by copying the text of a label and pasting it in the Filter box just above the Status field.
    environment:test

gcloud

  1. To view the status of your NFS file storage within the Bare Metal Solution environment, issue the gcloud bms nfs-shares list command:

    gcloud bms nfs-shares list --project=PROJECT_ID --region=REGION
    

    Additional command options include:

    • --limit: Limit the output to show a specific number of devices.
    • --filter: Limit the output to show devices with a specific label or other filter parameter.

    The output provides details about your NFS file storage, including the name, ID, volume, and allowed clients.

    NAME: nfs-share-7
    ID: at-2222222-nfs001
    PROJECT: PROJECT_ID
    REGION: REGION
    VOLUME_NAME: at-2222222-nfs001-vol000
    STATE: PROVISIONED
    ALLOWED_CLIENTS: [{"allowedCidr": "192.168.1.1/32", "networkName": "at-1111111-vlan001", "shareIp": "192.168.1.240"}]
    

  2. To view the status of a specific NFS file storage device, issue the gcloud bms nfs-shares describe command. You can use either the NFS share name or ID as the NFS_SHARE variable:

    gcloud bms nfs-shares describe NFS_SHARE --project=PROJECT_ID --region=REGION
    
    The output provides details about the allowed clients, NFS settings, the NFS server and its state, and the storage volume.
    allowedClients:
    – allowDev: true
      allowedClientsCidr: 192.168.1.1/32
      mountPermissions: READ_WRITE
      network: projects/PROJECT_ID/locations/REGION/networks/at-1111111-vlan001
      noRootSquash: true
      shareIp: 192.168.1.240
    name: projects/PROJECT_ID/locations/REGION/nfsShares/NFS_SHARE
    nfsShareId: at-2222222-nfs001
    state: PROVISIONED
    volume: projects/PROJECT_ID/locations/REGION/volumes/at-2222222-nfs001-vol000
    
  3. To add, update, or remove labels for NFS file storage, issue the gcloud bms nfs-shares update command. You can use the following options:

    • --update-labels: Adds labels to resources so you can filter the output of status commands. You must add each label with a key-value pair, such as environment = test.
    • --remove-labels: Removes specific labels
    • --clear-labels: Removes all labels

    Here is a sample command that adds the labels environment = test and location = downtown, and removes the label cost-center from an NFS file storage device:

    gcloud bms nfs-shares update NFS_SHARE --project=PROJECT_ID --region=REGION --update-labels environment=test,location=downtown --remove-labels=cost-center
    
    The following command removes all labels from an NFS file storage device:
    gcloud bms nfs-shares update NFS_SHARE --project=PROJECT_ID --region=REGION --clear-labels
    

    To view changes for NFS file storage labels, issue the following command:

    gcloud bms nfs-shares describe NFS_SHARE --project=PROJECT_ID --region=REGION
    
  4. To use a label to filter the output of a gcloud bms nfs-shares list command, add --filter labels.KEY=VALUE to the end of the command. The following example limits output for an NFS file storage device labeled with the key-value pair environment = test.

    gcloud bms nfs-shares list --project=PROJECT_ID --region=REGION --filter labels.environment=test
    

API

  1. To view the status of your NFS file storage within theBare Metal Solution environment, including allowed clients and NFS properties, enter your project ID and region into the following curl command. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/nfsShares"
    
  2. To view the status of a specific NFS file storage device, enter your project ID, region, and NFS server name or ID, then issue the following command:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/nfsShares/NFS_SHARE"
    
  3. To add labels to an NFS file storage device, enter your project ID, region, and NFS server name or ID into the following curl command. The key-value pairs in this example assign three labels: user = test, env = staging, and purpose = new_hardware_cert. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/nfsShares/NFS_SHARE?updateMask=labels"
     -d "{
      'labels' : {
         'user': 'test',
         'env': 'staging',
         'purpose': 'new_hardware_cert'
       }
    }"
    
    • If you issue the curl command without any labels or values, you clear all the labels.
      'labels' : {
       }
      
    • If you issue the curl command with new values for a label, the new value overwrites the previous value.
      'labels' : {
           'user': 'production',
           'env': 'production',
           'purpose': 'shared_data_store'
       }
      
  4. To use a label to filter the output of a GET curl command for a Bare Metal Solution NFS file storage device, enter the project ID and region, and then append ?filter=labels.KEY=VALUE to the end of the command. The following example limits output to find NFS file storage devices with the key-value pair label env = staging.

    curl -X GET -H \
    "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/nfsShares"?filter=labels.env=staging
    

View the status of a long-running operation

Some 'gcloud' commands or API calls, such as a server reset, might take a long time to complete. If you want to check the status of a long-running operation, use the following command options:

gcloud

  1. To view the status of a long-running operation, use the gcloud bms operations describe command.

    gcloud bms operations describe --project=PROJECT_ID --region=REGION operations/OPERATION_ID
    

API

  1. Open a Cloud Shell terminal window in your Google Cloud console.

  2. To view the status of a long-running operation in your Bare Metal Solution environment, enter your project ID, region, and the operation ID into the following curl command. Copy the command, paste it into the Cloud Shell prompt, and press the Enter or Return key:

    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Content-Type: application/json" \
    "https://baremetalsolution.googleapis.com/v2/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID"
    
    When the operation completes, the done field appears as true in the output.
    {
      "name": "operations/OPERATION_ID",
      "done": true
    }