Skip to main content

Create and connect instance

Here is how to create and connect an instance in the Bare Metal Server service.

Create instance

You can create a new instance.

info

By configuring network bonding on a bare metal server, you can combine multiple network interfaces into a single logical interface. This enables higher bandwidth and high availability.

  1. Go to the KakaoCloud Console > Beyond compute service > Bare metal server menu.

  2. Click the Instance menu, then click the [Create instance] button.

  3. In the Create instance page, enter the necessary information and click [Create].

    Image. Step 1: image configuration Create Bare Metal Server instance

    FieldDescription
    ① Basic informationName: Name of the instance
    - Example: instance-01_01
    Description (optional): Description of the instance (within 100 characters)
    ② ImageSelect from images provided by KakaoCloud
    ③ Instance typeSpecify the configuration for the instance
    - For more details, see KakaoCloud official site > Bare Metal Server
    ④ VolumeAutomatically set between 1,600–3,200 GB depending on the selected instance type
    ⑤ Key pairSelect an existing key pair or create a new one for this instance
    - Click Create key pair to generate and assign a new key pair
    - For more information, refer to Create key pair

    ⚠️ Private key files cannot be downloaded again. Be sure to store them securely.
    ⚠️ You cannot connect to the instance without a key pair.
    ⑥ NetworkNetwork bonding mode: If enabled, mode4 LACP:802.3ad (link aggregation) is automatically selected and network interfaces cannot be configured manually
    VPC: Network to be assigned to the instance
    Network interface: Interface that connects to the instance at creation; a new interface can be created
    Subnet: Select from subnets within the selected network
    - If new VPC or subnet is needed, create it in KakaoCloud Console > VPC
    - Public IPs for external access can be assigned after instance creation at Associate public IP
    IP assignment type: Choose how the IP will be assigned to the network interface
    ⑦ Advanced settingsUser script: Enter or upload a script to run at instance launch
    - Automatically configures initial environment when the instance starts
    - Enter cloud-init or shell scripts up to 16KB or upload a file
    - The script only runs once, during the first boot
    - The user data script is copied and executed under /var/lib/cloud/instances
    - To check execution logs:
    ㄴ 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 the [Create] button to provision the Bare Metal Server instance. You can connect to the instance using an SSH client, and may need to install and configure an operating system.

caution
  • If two or more network interfaces are attached to the same subnet, networking issues such as asymmetric routing may occur. We recommend assigning each interface to a different subnet. For more details, refer to Using multiple network interfaces.
  • When starting a bare metal instance, the physical server undergoes a full hardware and firmware check. It may take up to 20 minutes before the instance becomes fully operational and accessible over the network.
info
  • As of January 16, 2023, newly created instances are automatically assigned a hostname based on their private IP address (e.g., host-100-100-17-22).
  • Shortly after creation, the hostname may briefly display as the instance name before updating to the host-IP format.

Connect to instance

Connect to the instance using SSH or RDP, depending on the operating system. Ensure that the instance is reachable via public or private IP.

info
  • As of 2024, Bare Metal Server instances do not apply security group rules, even if a security group is attached.

Connect to Linux instance with SSH

Use an SSH client to connect to a Linux instance.

  1. Install an SSH client to use the SSH command.

    Operating systemPreparation
    Linux/macOSInstall OpenSSH
    - See OpenSSH official site for details
  2. Use the SSH command in a terminal to connect to the instance. Provide the path and filename of the private key, the username, and the instance IP.

    SSH command
    ssh -i {PATH_TO_PRIVATE_KEY} {USERNAME}@{INSTANCE_IP}
    CommandDescription
    {PATH_TO_PRIVATE_KEY}Path to the private key
    {USERNAME}Username for the instance
    - Predefined based on the OS image used
    {INSTANCE_IP}IP address of the instance
    - Use public or private IP based on your access environment

Use GPU instance

To use a GPU instance, you must install the appropriate driver.
You can either use a GPU-specific image that comes with the driver preinstalled or create an instance with a base image and install the driver manually. The following explains how to install GPU drivers by operating system.

info

For convenience, KakaoCloud provides Ubuntu 20.04 and 22.04 images preinstalled with NVIDIA driver version 470.199.02 and CUDA Toolkit version 11.4. You can easily use GPU instances by selecting these images.

Below is the procedure to install GPU drivers on a Linux operating system.

info

This guide is based on the Ubuntu 20.04 image and NVIDIA A100 GPU provided by KakaoCloud.

Step 1. Install NVIDIA driver

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

GPU typeNVIDIA versionCUDA version
NVIDIA A100450.80.02 or laterCUDA Toolkit 11.1 or later

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

    Check for NVIDIA device
    lspci | grep -i NVIDIA
  2. Check which driver versions are available for installation.

    • If the installed driver is outdated, update the system using apt update -y.

    • If you see the message Command ‘ubuntu-drivers’ not found, install it using:

      Install ubuntu-drivers
      sudo apt install ubuntu-drivers-common

      Then, check available drivers:

      Check available driver versions
      ubuntu-drivers devices

      Example output:

      Example output
      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 a compatible driver:

    Install NVIDIA driver
    sudo apt install nvidia-driver-470

    Image

  4. Reboot the instance:

    Reboot the instance
    sudo reboot
  5. Verify the driver installation:

    Check installed driver
    nvidia-smi

    Example output:

    Example output
    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 you are reinstalling the CUDA Toolkit, first clean up any existing configuration. For new installations, proceed to step 2.

    a. Remove any existing CUDA installations:

    Remove CUDA settings
    sudo rm -rf /usr/local/cuda*

    b. Delete any existing environment variables from ~/.bashrc or /etc/profile:

    Remove previous configuration
    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. Confirm that nvcc is not recognized:

    Check nvcc version
    nvcc -V
    Command 'nvcc' not found, but can be installed with: sudo apt install nvidia-cuda-toolkit
  2. Visit the NVIDIA CUDA Toolkit Archive and select the desired CUDA version. Refer to the Base Installer command listed.

    Image

  3. Run the first Base Installer command to download the installer:

    Download installer
    wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux.run

    Download result

  4. Run the second Base Installer command to begin installation:

    Run installer
    sudo sh cuda_11.4.0_470.42.01_linux.run
  5. Select Continue using arrow keys and press Enter.

    Continue selection

  6. Enter accept and press Enter.

    Accept license

  7. Press Space to uncheck the Driver option, select Install, and press Enter.

    • If you already have an installation, you may see Existing installation of CUDA Toolkit 11.x found. In that case, select Upgrade all and press Enter.

    Install selection

  8. If the installation completes successfully, you will see a confirmation screen:

    Installation complete

  9. Add environment variables:

    Add 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. Confirm installation with the following command:

Verify CUDA installation
nvcc -V

Verification result