Skip to main content

Create and connect instance

Create instance

An instance is a virtualized hardware resource, and you can configure a server by selecting from various instance types. The following describes how to create an instance in the Virtual Machine service.

info
  • A public IP that can be accessed externally can be assigned after the instance is created in Connect public IP.
  • After the instance is created, the host name is updated to the host-IP format during the networking stage, and the instance name may be displayed temporarily as the host name right after creation.
  • The process of handling network access after instance creation can take up to 10 minutes, so the server may not be accessible immediately after creation.
  1. Go to Compute > Beyond Compute Service > Virtual Machine in the KakaoCloud console.

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

  3. Enter the information, then click the [Create] button.

    Create instance

    ItemDescription
    ① Basic informationName: Name of the instance
    - Duplicate instance names can be used within the same project
    - The host name is automatically set in the private IP format of the primary network interface (example: host-100-100-17-22 )
    Quantity: Number of instances to create. When creating two or more instances, it is automatically entered based on the name of the first instance created
    Description: Description of the instance
    ② ImageImage to use
    - Default tab: Images provided by Kakao Enterprise
    - Custom image tab: Images created in the account
    ③ Instance typeSee Instance type specifications
    ④ VolumeVolume attached to the instance
    - Type: The root volume is displayed by default, and up to 9 custom volumes can be added if needed
    - Volume type: Only SSD is supported
    - Size: Can be created with a size from 1 to 16,384GB
    - Maximum IOPS: Preset IOPS information by volume size (modification support planned)
    - Delete with instance: Option to delete the volume together when the instance is deleted

    ⚠️ Volumes for which Delete with instance is not selected remain as detached volumes and continue to incur charges even after the instance is deleted.
    To avoid charges, you must delete the volume directly from the volume list.
    ⑤ Key pairKey pair to apply to the instance
    ⑥ NetworkSubnet: Select one of the subnets created in the network
    - If a new VPC and subnet are required, create them in VPC
    Network interface type: Primary network interface of the instance to create
    IP allocation method: If New interface is selected, an IP address can be assigned arbitrarily from the subnet CIDR block excluding reserved IP addresses
    Security group: Security group to apply to the instance
    Detailed rules
    - Inbound rules tab: Inbound rules applied to the security group above
    💡 To connect to the instance, the following inbound ports must be allowed depending on the selected image (required)
     ㄴ Linux family: TCP port 22 must be allowed
     ㄴ Windows: TCP port 3389 must be allowed
     ㄴ Windows + MSSQL: TCP ports 3389 and 1433 must be allowed
    - Outbound rules tab: Outbound rules that allow all protocols and ports
    ⑦ Advanced settingsUser script: Script that automatically runs user data at instance startup to configure the initial environment (runs only at the first startup of the instance)
    - Enter a user data script and cloud-init command within 16KB or upload a file
    - The script is copied and run under /var/lib/cloud/instances
    - To check the script execution log, run the following command
     ㄴ 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
    ⚠️ If you enter an incorrect user script or a script that does not complete, booting may fail.

    CPU multithreading: Option to optimize performance by assigning a single thread per CPU core
    - Recommended to disable for specific workloads such as high performance computing (HPC).
caution

The number of resources that can be attached to a single instance, such as network interfaces, volumes, and GPUs, is limited and cannot exceed that limit.
The total number of attachable resources differs by instance family. If attaching an additional network interface or volume fails, reduce the number of currently attached resources and try again.

Connect to instance

To connect to an instance, you must be able to access metadata. If the security group of the instance you want to connect to does not include the Default security group, you must define an outbound rule for metadata retrieval in a custom security group. For more information, see Custom security group.

Connect to instance created with linux operating system

An instance created with a Linux operating system is connected through the SSH command. To connect to the instance, you must configure the security group according to the image and prepare an environment that can access it through a public or private IP.

  • Check the guide in the console: Virtual Machine > Instance menu > [⋮] button > click Connect to instance
Operating systemSecurity group ruleAllowed port
LinuxInbound     TCP port 22 (default)
Step.1 Prepare ssh client

To use the SSH command, you must install an SSH client in advance. The preparation requirements by operating system are as follows.

Operating systemRequirement
Linux/macOSUse the ssh command in the terminal after installing an SSH client
WindowsInstall the OpenSSH client and use the ssh command in Command Prompt (cmd), or install a separate SSH client such as PuTTY
Step.2 Connect via ssh

Use the SSH command to connect to the instance. You can connect by entering the path and file name of the private key file you have, the user name, and the address of the instance to connect to.

SSH connection command
ssh -i {PATH_TO_PRIVATE_KEY} {USERNAME}@{INSTANCE_IP}
ItemDescription
{PATH_TO_PRIVATE_KEY}Private SSH key path
{USERNAME}User name to enter when connecting to the instance
- Pre-created for each operating system provided by the default image
{INSTANCE_IP}IP address of the network interface connected to the instance
- Enter a public IP or private IP according to the connection environment

Connect to instance created with windows operating system

An instance created with a Windows operating system can be accessed remotely through RDP (Remote Desktop Protocol). Use an RDP client appropriate for your operating system, and access it through the public IP assigned to the instance or a private IP within the same VPC.

Step.1 Prepare rdp client

To connect to an instance created with a Windows operating system, you need an RDP (Remote Desktop Protocol) client appropriate for the operating system you are using.

Operating systemRequirement
WindowsUse the built-in Remote Desktop Connection program or run the mstsc command
MacOSInstall Windows App from the App Store
Step.2 Connect via rdp

Check the account information for RDP connection available in the KakaoCloud console, then register the target instance for connection based on this information.
Depending on the operating system you are using, Windows or macOS, you can select the remote access setup method below.

  1. Go to Compute > Beyond Compute Service > Virtual Machine in the KakaoCloud console.

  2. In the Instance menu, select [⋮] button > Connect to instance. Please check the detailed information required for connection in the RDP connection pop-up window.

    ItemDescription
    Public IPAssign a public IP to connect from the source PC to the instance created with a Windows operating system
    - A public IP can be assigned in [⋮] button > Assign public IP**
    - Allow TCP/3389 port in the inbound rules of the security group
    User nameFixed as administrator
    PasswordCan be checked by clicking the [Register key pair] button and uploading the key pair file set when the instance was created
    When connecting from an internal network

    You can also connect through a private IP by using a Bastion server within the same VPC. In this case, connect to the Bastion server first, then run Windows App or mstsc on that server to connect to the private IP of the instance.

  3. Run Windows App. Select Devices from the left menu, then click the [+] icon at the top right and select Add PC. Based on the information of the instance created with the Windows operating system that you checked earlier, enter the information as follows and use the default values for the remaining options.

    ItemDescription
    PC namePublic IP address assigned to the instance created with the Windows operating system
    CredentialsSelect Add Credentials, then enter the information checked in step 2 in Username and Password respectively
  4. In the Devices menu, check Saved PCs in the center screen. The added instance appears in the list, and you can connect to it by double-clicking it.


info
  • It may take several minutes after the instance is created until the initial password setup is completed.
  • You can connect only with the password initially obtained through the key pair file. If the password is changed, the user must change it directly in the operating system. The console provides only the initially obtained password and does not provide any changed password afterward.
  • Instances created with the Windows operating system provided by KakaoCloud support WSL 1.
caution

If there are instances with the same host name in the same network (VPC), some network features may cause errors. Please use caution when changing the instance name or changing the host name directly.