Skip to main content

Create and connect instance

The following explains how to create and connect instances in the Bare Metal Server service.

Create instance

You can create a new instance.

info

In Bare Metal Server, configuring network bonding allows multiple network interfaces to be grouped into a single logical interface. This configuration provides high bandwidth and availability.

  1. Go to KakaoCloud Console > Beyond Compute Service > Bare Metal Server.

  2. Click on Instances and then click the [Create instance] button.

  3. Enter the required information and click [Create].

    Step 1: Configure image Create Bare Metal Server instance

    ItemDescription
    ① Basic informationName: Enter the instance name
    - Example: instance-01_01
    Description (optional): Provide an optional instance description (up to 100 characters)
    ② ImageSelect an image provided by KakaoCloud
    ③ Instance typeSelect an instance type
    - For more details, see KakaoCloud Official Site > Bare Metal Server Pricing
    ④ VolumeAutomatically set between 1,600–3,200 GB, based on selected instance type
    ⑤ Key pairSelect an existing key pair for the instance or create a new one
    - Click Create key pair to create and assign a new key pair
    - See Create key pair for details

    ⚠️ Once created, private key files cannot be downloaded again, so store them securely.
    ⚠️ You cannot connect to an instance without a key pair.
    ⑥ NetworkNetwork bonding mode: Automatically set to mode4 LACP:802.3ad(link aggregation) if enabled; network interface settings are disabled
    VPC: Network to which the instance will connect
    Network interface: Configure the network interface to connect at instance creation; select an existing or create a new interface
    Subnet: Select a subnet from the network
    - If a new VPC and subnet are needed, create them under KakaoCloud Console > VPC
    - A public IP can be assigned after instance creation via Associate public IP

    IP assignment method: Choose the method for assigning IPs to the network interface
    ⑦ Advanced settingsUser script: Enter or upload a user script
    - When the instance starts, the user data script is executed to set up the initial environment automatically
    - Scripts can be entered as text or uploaded, up to 16KB
    - The command executes only on the initial start
    - Scripts are stored in /var/lib/cloud/instances and executed
    - To check script logs, run the following commands:
    ᄂ Ubuntu: sudo cat /var/log/syslog or sudo journalctl -u cloud-final.service
    ᄂ CentOS: sudo cat /var/log/messages or sudo journalctl -u cloud-final.service
  4. Click [Create] to create the Bare Metal instance. After creation, you can access it via an SSH client. Additional setup, such as OS installation and configuration, may be required.

caution
  • Connecting multiple network interfaces to the same subnet may cause asymmetric routing issues, potentially requiring additional configuration for proper communication. For stable operation, it is recommended to connect each network interface to different subnets. See Use multiple network interfaces for details.
  • When starting a Bare Metal instance, the basic server boots, and all hardware and firmware components are checked. This process can take about 20 minutes before the instance becomes available on the network.
info
  • For instances created from January 16, 2023, the hostname is automatically set to the private IP format (e.g., host-100-100-17-22).
  • After instance creation, the hostname may briefly appear as the instance name before updating to the host-IP format in the networking stage.

Connect to instance

Use SSH or RDP to connect to the instance, depending on the OS. Ensure that the access environment is configured for public/private IP access.

info

As of 2024, security group rules do not apply to Bare Metal instances even when connected.

Connect to Linux instance with SSH

You can connect to a Linux instance using an SSH client.

  1. Install an SSH client to use SSH commands.

    OSPreparation
    Linux/macOSDownload and install OpenSSH
    - See OpenSSH Official Site for details
  2. In the terminal, use the SSH command to connect to the instance. Enter the path and filename of the private key, the username, and the instance's address.

    SSH Command
    ssh -i {PATH_TO_PRIVATE_KEY} {USERNAME}@{INSTANCE_IP}
    ParameterDescription
    PATH_TO_PRIVATE_KEYPrivate key (.pem) path
    USERNAMEUsername connecting to the instance
    INSTANCE_IPIP that the instance has
    - Enter public IP or private IP according to the connection environment

Use GPU instance types

To use GPU instance types, you need to install the appropriate drivers.
You can create an instance using a GPU-specific image with drivers pre-installed or create an instance with a base image and install the public driver separately. The steps below explain how to install GPU drivers by operating system.

info

For convenience, KakaoCloud provides Ubuntu 20.04 and 22.04 images with NVIDIA driver version 470.199.02 and CUDA Toolkit version 11.4 pre-installed, allowing quick access to GPU instances.

The following steps describe how to install a GPU driver on a Linux operating system.

info

This guide assumes the Ubuntu 20.04 image and NVIDIA A100, as currently provided by KakaoCloud.

Step 1. Install NVIDIA driver

Install the NVIDIA driver. Recommended driver and CUDA versions are as follows:

GPU TypeNVIDIA VersionCUDA Version
NVIDIA A100450.80.02+CUDA Toolkit 11.1+

info
  1. Check if the instance has NVIDIA hardware by running the following command:

    NVIDIA hardware check command
    $ lspci | grep -i NVIDIA
  2. Check available driver versions.

    • If the installed driver is not the latest version, run the apt update -y command to perform an update.

    • If you see the message Command ‘ubuntu-drivers’ not found, enter the command sudo apt install ubuntu-drivers-common to install ubuntu-drivers-common.

      Command to check available driver versions
      $ ubuntu-drivers devices
      Check driver versions
      $ ubuntu-drivers devices
      **==** /sys/devices/pci0000:00/0000:00:04.0 **==**
      modalias : pci:v000010DEd000020B0sv000010DEsd0000134Fbc03sc02i00
      vendor : NVIDIA Corporation
      driver : nvidia-driver-515-server - distro non-free
      driver : nvidia-driver-470 - distro non-free
      driver : nvidia-driver-470-server - distro non-free
      driver : nvidia-driver-510-server - distro non-free
      driver : nvidia-driver-510 - distro non-free
      driver : nvidia-driver-450-server - distro non-free
      driver : nvidia-driver-515 - distro non-free recommended
      driver : xserver-xorg-video-nouveau - distro free builtin
  3. Select and install the available driver.

    Install driver
    $ sudo apt install nvidia-driver-470

    이미지

  4. Run a reboot.

    Reboot command
    $ sudo reboot
  5. Verify the installed driver information.

    Command to check installed driver information
    $ nvidia-smi
    Check installed driver information
    $ nvidia-smi
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 470.141.03 Driver Version: 470.141.03 CUDA Version: 11.4 |
    |-------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
    | | | MIG M. |
    |===============================+======================+======================|
    | 0 NVIDIA A100 80G... Off | 00000000:00:05.0 Off | 0 |
    | N/A 33C P0 41W / 300W | 35MiB / 80994MiB | 0% Default |
    | | | Disabled |
    +-------------------------------+----------------------+----------------------+
    | 1 NVIDIA A100 80G... Off | 00000000:00:06.0 Off | 0 |
    | N/A 34C P0 43W / 300W | 35MiB / 80994MiB | 0% Default |
    | | | Disabled |
    +-------------------------------+----------------------+----------------------+

Step 2. Install NVIDIA CUDA Toolkit

Install the NVIDIA CUDA Toolkit.

  1. If reinstalling the CUDA Toolkit, prepare the installation environment as follows. For new installations, proceed to step 2.

    a. Remove existing CUDA-related configurations.

    Command to remove CUDA configuration
    $ sudo rm -rf /usr/local/cuda*

    b. If the following configurations exist in ~/.bashrc or /etc/profile, remove them.

    Delete existing configurations
    export PATH=$PATH:/usr/local/cuda-11.4/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.4/lib64
    export CUDADIR=/usr/local/cuda-11.4

    c. After deleting all existing configurations, run the nvcc -V command to confirm that it no longer executes.

    nvcc -V command output
    $ nvcc -V
    Command 'nvcc' not found, but can be installed with: sudo apt install nvidia-cuda-toolkit
  2. On the NVIDIA Official Site > CUDA Toolkit Archive, select the version of the CUDA Toolkit to install. After selecting a version, find the Base Installer command at the bottom.

    Image Select CUDA Toolkit version and find Base Installer command

  3. Run the Base Installer command (first line) to download the CUDA Toolkit installation file.

    Example command to download CUDA Toolkit installation file
    $ wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux.run

    Base Installer의 Toolkit 설치용 파일 다운로드 명령 실행 결과 Result of running the command to download the Toolkit installation file from Base Installer

  4. Run the Base Installer command (second line) to execute the CUDA Toolkit installation file.

    • Running the CUDA Toolkit installation file may take more than a minute.
    Command to execute CUDA Toolkit installation file
     $ sudo sh cuda_11.4.0_470.42.01_linux.run
  5. Use the arrow keys to select Continue and press Enter.

    Image Select Continue

  6. Type accept and press Enter.

    Image Type accept

  7. Press Space to deselect the Driver checkbox, select Install, and press Enter.

    • If an existing version is detected, the message Existing installation of CUDA Toolkit 11.x found will appear. In this case, select Upgrade all and press Enter.

    Image Select Install

  8. If the CUDA Toolkit installs successfully, you will see the following screen.

    Image CUDA Toolkit installation complete

  9. Run the following commands to add environment variables for the CUDA Toolkit.

    Commands to add CUDA Toolkit environment variables
    $ sudo sh -c "echo 'export PATH=$PATH:/usr/local/cuda-11.4/bin' >> /etc/profile"
    $ sudo sh -c "echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.4/lib64' >> /etc/profile"
    $ sudo sh -c "echo 'export CUDADIR=/usr/local/cuda-11.4' >> /etc/profile"
    $ source /etc/profile
  10. Run the nvcc -V command to verify the installed CUDA Toolkit.

    Image CUDA Toolkit verification result