# VMs & Baremetals

Krutrim Cloud offers high-performance **Virtual Machines (VMs)** for compute workloads, including GPU-powered VMs for AI/ML tasks and CPU-based machines for general-purpose use. Users can customize, monitor, and manage their machines with flexible volume and networking configurations.

{% hint style="info" %}
Network speed - All our Virtual Machines support up to **10 Gbps network speed**.
{% endhint %}

***

### Creating a VM <a href="#creating-a-vm" id="creating-a-vm"></a>

To create a new virtual machine:

1. Navigate to the **VM configurations** page and click **“Reserve”** next to your preferred setup.
2. On the creation form, configure the following fields:

#### Required Fields <a href="#required-fields" id="required-fields"></a>

* **Name**: Unique name for your machine (e.g., `vm-ai-builder`).
* **VPC**: Select a VPC based on the region of the selected VM. You can also create a new VPC in the same region directly from this interface.
* **Volumes**:
  * **Bootable volumes** (required)
  * Optional: **Storage volumes**
* **SSH Key**: Upload or paste your public SSH key for secure terminal access.
  * Learn how to create and connect your SSH key [here](https://krutrim-cloud-documentation.gitbook.io/krutrim-cloud-documentation/~/revisions/d4NYBPQU0HIXDoAQnCSW/basics/compute/ssh-key).
* **Startup Script**: Optional. Bash scripts only. This is the script that will run every time your Machine starts
* **Tags**: Add custom tags for VM identification and billing filters.
* **Price Summary**: A live cost summary based on your configuration.

#### 💡 Note: <a href="#note" id="note"></a>

> To attach a reserved IP or control network access (ports), configure them in the **Advanced Settings** section.

### Advanced Settings <a href="#advanced-settings" id="advanced-settings"></a>

#### Subnet <a href="#subnet" id="subnet"></a>

* Select from existing subnets within the selected VPC.
* New subnets can be created (preselected VPC).
* If no subnet is selected, a **default public subnet** is attached silently.

#### IP Address Type <a href="#ip-address-type" id="ip-address-type"></a>

* Shown only if a **public subnet** is selected in the previous settings
* Choose between:
  * **Floating IP** – Dynamic, assigned from IP pool. Reassigned on restart.
  * **Reserved IP** – Static, retains the same IP across restarts.
* If “Reserved IP” is selected, choose from unassigned reserved IPs in the dropdown.

#### &#x20;Security Group <a href="#security-group" id="security-group"></a>

* Select from existing Security Groups under the selected VPC.
* New groups can be created here (VPC pre-selected).
* If no group is selected, then no traffic will be allowed in/out of the machine

{% hint style="warning" %}
Please note that Port 22 or the SSH protocol should be enabled if you want to SSH into the VMs
{% endhint %}

***

### &#x20;Attaching & Detaching a Volume <a href="#attaching-and-detaching-a-volume" id="attaching-and-detaching-a-volume"></a>

Volumes can be attached or detached after VM creation via the **My Machines** page.

#### &#x20;Attaching a Volume <a href="#attaching-a-volume" id="attaching-a-volume"></a>

1. Click the **three-dot menu (⋮)** for the target VM.
2. Select **Attach/Detach Volumes**.
3. Click "Change Bootable volumes" if you want to change the bootable volume or "Attach Storage volumes" if you want to attach a storage volume
4. A pop-up will show all **active, unattached volumes within the same VPC**.
5. Choose volumes to attach/change and confirm.
6. A prompt will notify:

   **The VM has to be restarted to attach the volume. Confirm restart to proceed.**
7. Once attached, volumes are attached/changed

#### Detaching a Volume <a href="#detaching-a-volume" id="detaching-a-volume"></a>

1. Click the **three-dot menu (⋮)** and choose **Attach/Detach Volumes**.
2. Bootable volumes can't be detached; they can only be changed.
3. Click "Change Bootable volumes" if you want to change the bootable volume
4. To detach a storage volume, click on the "Delete" icon near the storage volume
5. Confirm the warning:

   **The VM has to be restarted to detach the volume. Confirm restart to proceed.**

⚠️ One VM can be attached to multiple volumes, but each volume can only be attached to one VM at a time.

***

### Editing a VM <a href="#editing-a-vm" id="editing-a-vm"></a>

VMs can be edited for network and SSH configurations. To edit a VM:

1. Go to **My Machines**.
2. Click the **three-dot menu (⋮)** > **Edit VM**.
3. Editable fields:
   * Description
   * Tags

***

### Attaching/Detaching Security group <a href="#connecting-to-the-machine" id="connecting-to-the-machine"></a>

Only one security group can be attached to a VM at a time

**Attach/change/detach security group**

1. Click on the three dots
2. Click on "Attach/detach security group"
3. The currently attached security group, if any, will be visible here
4. If you want to change/detach the security group, click on the "detach" button
5. A confirmation pop-up will appear. Once confirmed, the currently attached security group will be detached. Please note that once a security group is detached, no traffic in/out to/from your VM will be allowed
6. Click on attach if you want to attach a new one.
7. Select from the existing security groups which one you want to attach
8. Give confirmation, and the security group will be attached

***

### Attaching/Detaching Public IP address <a href="#connecting-to-the-machine" id="connecting-to-the-machine"></a>

1. Click on the three dots
2. Click on Attach/detach Public IP
3. If there are any attached Public IPs, they will be mentioned there.
   1. If no Public IPs are attached, then click on attach IP and select from the reserved IP, or assign a random floating IP to your VM
   2. Please note that the private IP will also change once you change/attach a new IP
4. Click on delete, which will then open up a confirmation pop-up. Once confirmed, the Public IP will be detached
5. Click on attach IP and select from the reserved IP, or assign a random floating IP to your VM
   1. Please note that the private IP will also change once you change/attach a new IP

***

### Creating Machine Image <a href="#connecting-to-the-machine" id="connecting-to-the-machine"></a>

Machine image is a way for you to reuse your current VMs to easily make more copies of it

1. Click on the three dots
2. Click on "Create Machine Image"
3. Enter the name of the Image
4. Click on create. This will create a Machine Image for your VM immediately

***

### Connecting to the Machine <a href="#connecting-to-the-machine" id="connecting-to-the-machine"></a>

Once the VM is active:

1. Use an SSH client (e.g., OpenSSH, PuTTY).
2. Run the command:

   `bash`

   CopyEdit

   `ssh -i <path-to-your-private-key> ubuntu@<public-ip>`

   Example:

   `bash`

   CopyEdit

   `ssh -i ~/.ssh/my-key.pem ubuntu@206.1.53.62`

Upon connection, you're ready to interact with your virtual machine.

***

### Stopping/Restarting a VM <a href="#my-machines-page" id="my-machines-page"></a>

1. Click on the three dots
2. Click on "Stop Machine"
3. A confirmation pop-up will appear. Once confirmed, the VM will be stopped.
   1. You won't be charged for the VM when it's stopped. Only the volumes will be charged during this duration
   2. Please note that there's no guarantee that you can get the same VM configuration once stopped
4. To restart, click on the three dots and click on restart VM
5. This will restart the VM

***

### Rebooting a VM <a href="#my-machines-page" id="my-machines-page"></a>

1. Click on the three dots
2. Click on "Reboot VM"
3. A confirmation pop-up will appear. Once confirmed, the VM will be rebooted

***

### Terminating a VM <a href="#my-machines-page" id="my-machines-page"></a>

1. Click on the three dots
2. Click on "Terminate VM"
3. A confirmation pop-up will appear. Once confirmed, the VM will be terminated, and the VM will not be accessible anymore

### My Machines Page <a href="#my-machines-page" id="my-machines-page"></a>

This dashboard allows you to view and manage all your VMs.

#### 🔎 Table Overview <a href="#table-overview" id="table-overview"></a>

* **Machine Name**: Unique identifier (e.g., `vm_test`)
* **Public IP**: External IP for remote access
* **Status**: Active / Stopped
* **Actions (⋮)**:
  * How to Connect
  * Stop Machine
  * Reboot
  * Terminate Machine

#### 🔍 Machine Details (on click) <a href="#machine-details-on-click" id="machine-details-on-click"></a>

* **Start Time**
* **Configuration**: e.g., `CPU-1x-4GB`
* **Hours Utilized**: e.g., `00 d : 02 h : 15 min`

You can manage machine state, view usage details, or initiate secure connections from this panel.

***

### Billing

You will be charged for the VM as long as it is active (running). If your machine is stopped or paused, or terminated, then it won’t be charged.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloud.olakrutrim.com/basics/core-infrastructure/compute/vms-and-baremetals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
