Virtual Machines

Virtual Machines in Thalassa Cloud IaaS

Thalassa Cloud provides Virtual Machines (VMs) as part of its Infrastructure as a Service (IaaS) offering. Virtual Machines allow users to run workloads in isolated environments with dedicated compute, memory, and storage resources.

Thalassa Cloud VMs are highly customizable, with support for:

  • Different machine types to match performance requirements.
  • Custom and predefined machine images for rapid provisioning.
  • Cloud-init support for automated configuration.
  • Subnet integration for networking within virtual private clouds (VPCs).

This guide covers the capabilities, configuration, and API interactions for managing virtual machines in Thalassa Cloud.

Virtual Machine Capabilities

Compute Resources

Each VM is provisioned with a specific machine type, which defines the amount of CPU, memory, and storage available to the instance. Machine types range from general-purpose to compute-optimized configurations, allowing users to select the appropriate balance of resources for their workload.

Storage

VMs are deployed with a root volume, which is required to boot the machine. Additional storage can be attached as separate volumes. Thalassa Cloud supports:

  • Block storage for persistent data
  • Custom volume sizes
  • Predefined volume types for performance tuning

Networking

VMs are assigned to a subnet within a Virtual Private Cloud (VPC). They can communicate with other VMs in the same subnet or across different networks based on configured routing and firewall rules.

Automation & Configuration

Thalassa Cloud supports Cloud-Init, allowing users to define startup scripts, preconfigure operating system settings, and automate application deployment at boot time.

Virtual Machine API

Thalassa Cloud provides a RESTful API for managing virtual machines programmatically.

Listing Virtual Machines

Retrieve all VMs within a project:

GET /api/v1/machines

Creating a Virtual Machine

To create a VM, users must specify a machine image, machine type, and root volume. Example request:

{
  "name": "web-server",
  "description": "Primary web server",
  "labels": { "environment": "production" },
  "subnet": "subnet-12345",
  "machineImage": "ubuntu-22.04",
  "machineType": "pgp-medium",
  "rootVolume": {
    "name": "web-root",
    "size": 50,
    "volumeTypeIdentity": "premium"
  },
  "cloudInit": "#cloud-config\npackages:\n  - nginx"
}

Updating a Virtual Machine

To modify an existing VM:

PUT /api/v1/machines/{identity}

Users can update name, description, labels, machine type, and subnet.

Managing VM State

Thalassa Cloud allows users to start, stop, and restart virtual machines:

  • Start a VM: POST /api/v1/machines/{identity}/start
  • Stop a VM: POST /api/v1/machines/{identity}/stop
  • Restart a VM: POST /api/v1/machines/{identity}/restart

Deleting a Virtual Machine

VMs can be deleted unless delete protection is enabled:

DELETE /api/v1/machines/{identity}

Console and Remote Access

Thalassa Cloud provides serial console and VNC access for remote management:

  • Serial Console: GET /api/v1/machines/{identity}/console
  • VNC Access: GET /api/v1/machines/{identity}/vnc

Machine Images

Machine images define the operating system and preinstalled software on a VM. Thalassa Cloud supports:

  • Official images (e.g., Ubuntu, Debian, CentOS, ..)
  • Custom images uploaded by users

To list available machine images:

GET /api/v1/machine-images

When creating a VM, specify the image using the image identifier or slug:

"machineImage": "ubuntu-22.04"