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.
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.
-
Go to the KakaoCloud Console > Beyond compute service > Bare metal server menu.
-
Click the Instance menu, then click the [Create instance] button.
-
In the Create instance page, enter the necessary information and click [Create].
Create Bare Metal Server instance
Field Description ① Basic information Name: Name of the instance
- Example: instance-01_01
Description (optional): Description of the instance (within 100 characters)② Image Select from images provided by KakaoCloud ③ Instance type Specify the configuration for the instance
- For more details, see KakaoCloud official site > Bare Metal Server④ Volume Automatically set between 1,600–3,200 GB depending on the selected instance type ⑤ Key pair Select 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.⑥ Network Network 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 settings User 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
orsudo journalctl -u cloud-final.service
ㄴ CentOS:sudo cat /var/log/messages
orsudo journalctl -u cloud-final.service
-
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.
- 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.
- 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.
- 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.
-
Install an SSH client to use the SSH command.
Operating system Preparation Linux/macOS Install OpenSSH
- See OpenSSH official site for details -
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 commandssh -i {PATH_TO_PRIVATE_KEY} {USERNAME}@{INSTANCE_IP}
Command Description {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.
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.
- Linux
Below is the procedure to install GPU drivers on a Linux operating system.
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 type | NVIDIA version | CUDA version |
---|---|---|
NVIDIA A100 | 450.80.02 or later | CUDA Toolkit 11.1 or later |
- For detailed information on downloading NVIDIA drivers, visit the NVIDIA Driver Downloads page.
- For instructions on installation and configuration, refer to the NVIDIA Driver Installation Quickstart Guide.
-
Check if the instance has an NVIDIA device by running the following command:
Check for NVIDIA devicelspci | grep -i NVIDIA
-
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-driverssudo apt install ubuntu-drivers-common
Then, check available drivers:
Check available driver versionsubuntu-drivers devices
Example output:
Example outputubuntu-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
-
-
Select and install a compatible driver:
Install NVIDIA driversudo apt install nvidia-driver-470
-
Reboot the instance:
Reboot the instancesudo reboot
-
Verify the driver installation:
Check installed drivernvidia-smi
Example output:
Example outputnvidia-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.
-
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 settingssudo rm -rf /usr/local/cuda*
b. Delete any existing environment variables from
~/.bashrc
or/etc/profile
:Remove previous configurationexport 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.4c. Confirm that
nvcc
is not recognized:Check nvcc versionnvcc -V
Command 'nvcc' not found, but can be installed with: sudo apt install nvidia-cuda-toolkit -
Visit the NVIDIA CUDA Toolkit Archive and select the desired CUDA version. Refer to the Base Installer command listed.
-
Run the first Base Installer command to download the installer:
Download installerwget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux.run
-
Run the second Base Installer command to begin installation:
Run installersudo sh cuda_11.4.0_470.42.01_linux.run
-
Select Continue using arrow keys and press Enter.
-
Enter
accept
and press Enter. -
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.
- If you already have an installation, you may see
-
If the installation completes successfully, you will see a confirmation screen:
-
Add environment variables:
Add environment variablessudo 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 -
Confirm installation with the following command:
nvcc -V