Skip to main content

GPU Virtual Machine with Cloud Config Authentication

In this tutorial, we will show you how to create a virtual machine with GPU, the new service of DT Cloud.

Prerequisites

info

Preparation for creating a Virtual Machine

Before creating a virtual machine, if you do not want to use the default public IP, you must follow these steps.

Create a Virtual Network

  1. Go to the "Networks" page.
  2. Click "Add New" button.
  3. Specify the name(GPU-Network)
  4. Enter the CIDR (10.0.0.0/12)
  5. Enter the Gateway (10.0.0.1)
  6. Add "Allocation Pools" (10.0.0.3-10.0.0.10)
  7. Add "DNS Servers" (8.8.8.8)
  8. Click "Create A Virtual Network" button.

Create a Router

  1. Go to the "Routers" page.
  2. Click "Add New" button.
  3. Enter the name(GPU-Router).
  4. In the Network section, select "VM_PUBLIC_2".
  5. Choose an Internal Interface (GPU-Network)
  6. Click "Create A Router" button.

Create a GPU Virtual Machine

  1. On the Virtual Machines page, click the "Create A Virtual Machine" button.

  2. Write "GPU-Machine" input in name field.

  3. Choose, "Choose an Image" deployment option.

  4. Click the "Choose an Image" button and select "Ubuntu 22.04-Cloudimage-GPU-Optimized-T4-4GB(Template(VM))" on "GPU-Optimized" option.

  5. Click "Choose a Virtual Machine Type" button and select "m.small" type.

  6. Click "Choose a Network" button. On the "Add network interface" page, select "GPU-Network" option and then click the "Add Network" button.

  7. Select the "Config" authentication method and click "Authentication with Cloud Config" button. And then, specify the hostname(Test-GPU), username(GPU-VM) and password(TestGPU).

  8. Click "Create A Virtual Machine" button.

Create an Elastic IP

After creating Virtual Machine, we need to define Elastic IP to complete the connection.

  1. Go to the "Elastic IPs" page.
  2. Click "Add New" button.
  3. On the "Network" section, select "VM_PUBLIC_2".
  4. Choose Virtual Machine (GPU-Machine)
  5. Select IP Address (GPU-Network - 10.0.0.10)
  6. Click "Create an Elastic IP" button.

After all these stages, the virtual machine is now ready. To connect to the virtual machine, click on the virtual machine and click the console button in the window that opens on the right. In the console that opens, we can connect to the virtual machine by entering the username and password we provided in the cloud config authentication method.