Rebooting a Virtual Machine

This guide explains different methods for rebooting virtual machines in Thalassa Cloud. Choose the method that best fits your use case and access level.

Prerequisites

  • A virtual machine running in Thalassa Cloud
  • Appropriate access credentials (SSH for OS-level reboot, API token or CLI for platform-level operations)

Methods for Rebooting

Method 1: OS-Level Reboot (Recommended)

Reboot the VM from within the operating system. This is the safest method as it allows the OS to shut down services gracefully.

Step 1: Connect to the VM

SSH into your virtual machine:

ssh user@your-vm-ip

Step 2: Reboot the System

Use the standard reboot command:

sudo reboot

Or use the shutdown command with reboot option:

sudo shutdown -r now

For a scheduled reboot (e.g., in 10 minutes):

sudo shutdown -r +10

To cancel a scheduled reboot:

sudo shutdown -c

Method 2: Using Thalassa Cloud CLI

Use the Thalassa Cloud CLI to stop and start the VM. This method is useful for automation and when you don’t have SSH access.

Step 1: Stop the VM

Stop the virtual machine:

tcloud compute machines stop <machine-id> --wait

Replace <machine-id> with your VM’s identifier. The --wait flag waits for the operation to complete.

Step 2: Start the VM

Start the virtual machine:

tcloud compute machines start <machine-id> --wait

Note

The stop/start method performs a full shutdown and boot cycle, which is equivalent to a reboot but takes longer than an OS-level reboot.

Method 3: Using the Thalassa Cloud API

Reboot a VM programmatically using the REST API.

Step 1: Stop the VM

curl -X POST \
  https://api.thalassa.cloud/v1/compute/machines/<machine-id>/stop \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Step 2: Start the VM

curl -X POST \
  https://api.thalassa.cloud/v1/compute/machines/<machine-id>/start \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Replace <machine-id> with your VM’s identifier and YOUR_API_TOKEN with your personal access token.

Verifying Reboot

After rebooting, verify the system is running correctly:

# Check system uptime
uptime

# Check system logs
sudo journalctl -b

# Verify services are running
sudo systemctl status <service-name>

References