How to Create VM Instances | Step-by-Step Cloud VM Provisioning Guide

This guide walks you through the process of creating a new virtual machine instance on your preferred cloud provider using Nife.

Prerequisites#

Before creating a VM instance, ensure you have:

  • Active Organization: An organization created in your Nife account
  • Cloud Provider Account: An active account with AWS, GCP, or Azure
  • Proper Credentials: The necessary API keys, service accounts, or credentials for your cloud provider
  • Required Permissions: Appropriate IAM permissions to create and manage VM instances

Creating a New VM Instance#

Step 1: Access VM Creation#

  1. Navigate to VM Management section in your Nife dashboard
  2. Click the Create VM button in the top-right corner
  3. The Create VM Instance dialog will open

Step 2: Basic Configuration#

In the Basic Configuration section:

Cloud Provider Selection#

Choose your cloud provider from the dropdown:

  • Google Cloud Platform (GCP): For Google Compute Engine instances
  • Amazon Web Services (AWS): For EC2 instances
  • Microsoft Azure: For Azure Virtual Machines

Organization Selection#

Select the organization that will own this VM instance. The instance will be associated with this organization for billing and access control purposes.

Instance Name#

Enter a unique name for your VM instance. The name should be:

  • Lowercase letters, numbers, and hyphens only
  • Descriptive and easy to identify
  • Example: web-server-prod-01, api-backend-staging
info

The instance name must be provided before uploading service account files for GCP.

Step 3: Provider-Specific Configuration#

The configuration fields change based on your selected cloud provider.

AWS Configuration#

Required Fields#

Region

  • The AWS region where your instance is located
  • Examples: us-east-1, us-west-2, eu-west-1
  • Must match the region of your EC2 instance

Instance ID

  • Your EC2 instance ID
  • Format: Starts with i- followed by alphanumeric characters
  • Example: i-1234567890abcdef0
  • Find this in your AWS EC2 Dashboard under "Instances"

Access Key ID

  • Your AWS IAM access key ID
  • Format: Starts with AKIA followed by characters
  • ⚠️ Keep this secure: Never share or expose this key
  • Create new keys in AWS IAM Console if needed

Secret Access Key

  • Your AWS IAM secret access key
  • Only visible once when created in AWS IAM Console
  • ⚠️ Keep this secure: Store it in a secure location
  • This field is hidden after input for security

Getting AWS Credentials#

  1. Log in to your AWS Management Console
  2. Navigate to IAM (Identity and Access Management)
  3. Go to Users and select your user
  4. Click Create access key under "Access Keys"
  5. Copy your Access Key ID and Secret Access Key
  6. Store the secret key securely (it won't be visible again)

GCP Configuration#

Required Fields#

Zone

  • The Google Cloud zone where your instance will be created
  • Examples: us-central1-a, europe-west1-b, asia-southeast1-c
  • Must match your GCP Compute Engine zone
  • Check available zones in GCP Console

Service Account Key File

  • Upload your GCP service account JSON key file
  • Click the file input and select your downloaded JSON key file
  • The file will be uploaded and validated

Uploading Service Account File#

  1. First, enter an Instance Name (required before file upload)
  2. Click the File Input field or drag and drop your JSON file
  3. Select the service account JSON file from your computer
  4. Click the Upload button
  5. Wait for upload confirmation (green success message)

Getting GCP Service Account Key#

  1. Go to Google Cloud Console
  2. Navigate to Service Accounts
  3. Select or create a service account
  4. Click Keys tab
  5. Click Add KeyCreate new key
  6. Choose JSON format
  7. The key will be automatically downloaded to your computer
  8. Store it securely
warning

Keep your service account key file secure. Anyone with this file can access your GCP resources.

Azure Configuration#

Required Fields#

Subscription ID

  • Your Azure subscription ID
  • Format: GUID (example: 12345678-1234-1234-1234-123456789012)
  • Find this in Azure Portal under Subscriptions

Resource Group Name

  • The name of the resource group containing your VM
  • Example: production-resources, dev-rg
  • Must exist in your Azure subscription

Tenant ID

  • Your Azure Active Directory (Azure AD) tenant ID
  • Format: GUID (example: 12345678-1234-1234-1234-123456789012)
  • Also called Directory ID
  • Find this in Azure Portal under Azure AD

Client ID

  • Your Azure service principal client ID
  • Format: GUID (example: 12345678-1234-1234-1234-123456789012)
  • Also called Application ID
  • Find this in Azure AD under App registrations

Client Secret

  • Your Azure service principal client secret
  • ⚠️ Keep this secure: Never share or expose this secret
  • This field is hidden after input for security
  • Create new secrets in App registration if needed

Getting Azure Credentials#

  1. Log in to Azure Portal
  2. Navigate to Azure Active DirectoryApp registrations
  3. Create a new app registration or select an existing one
  4. Copy the Application (client) ID and Directory (tenant) ID
  5. Go to Certificates & secrets
  6. Click New client secret
  7. Copy the secret value (visible only once)
  8. Store all secrets securely

Submitting the Form#

Validation#

Before submitting, ensure all required fields are completed:

  • Cloud provider is selected
  • Organization is selected
  • Instance name is provided
  • All provider-specific required fields are filled

The Add Instance button will be disabled until all required fields are valid.

Creating the Instance#

  1. Review all entered information
  2. Click the Add Instance button
  3. Wait for the instance to be created and validated
  4. A success message will appear once the instance is registered
  5. The instance will now appear in your VM instances list

Troubleshooting#

File Upload Issues (GCP)#

"Please enter an instance name before uploading the file"

  • Enter the instance name in the Basic Configuration section first

"Please select a valid JSON file"

  • Ensure you're uploading a .json file
  • The file should be the GCP service account key file

"Failed to upload file"

  • Check your internet connection
  • Verify the file is valid JSON
  • Try again with a different file

Credential Validation Issues#

"AWS credentials are invalid"

  • Verify the Access Key ID and Secret Key are correct
  • Ensure the key has EC2 permissions
  • Check that the instance exists in the specified region

"GCP service account is invalid"

  • Verify the service account key file is correct
  • Ensure the service account has Compute Engine permissions
  • Check the zone is available in your GCP project

"Azure credentials are invalid"

  • Verify all IDs match your Azure account
  • Ensure the service principal has necessary permissions
  • Check that the subscription and resource group exist

Next Steps#

After creating VM instances: