Platform engineers and developers
How to Create a Virtual Machine
Provision a VM through the cloud console with key pair, security group, networking, and floating IP attachment.
14 min read · Updated 2026-03-19
Prerequisites
- • Project role with compute/network create permissions
- • Ubuntu 24.04 image available in image catalog
- • Existing private network and router or permission to create one
1. Create or import SSH key pair
In the cloud console, navigate to Compute > Key Pairs and create a key pair or import your public key.
Keep the private key secure on your workstation and limit file permissions to owner-read.
ssh-keygen -t ed25519 -C "your-email@example.com" -f ~/.ssh/monal-cloudchmod 600 ~/.ssh/monal-cloud2. Prepare security group rules
Create a security group for the VM and add least-privilege ingress rules.
- Add inbound TCP 22 from your office or personal static IP.
- Add inbound TCP 80 and 443 only if hosting web traffic.
- Leave wide-open inbound rules disabled unless absolutely required.
3. Launch the instance
Go to Compute > Instances > Create Instance. Choose image, flavor, key pair, network, and security group.
For naming, use environment and workload markers such as prod-nginx-web-01.
- Image: Ubuntu 24.04 LTS
- Flavor: 2 vCPU / 4 GB RAM for small production workloads
- Storage: Boot volume of at least 40 GB for web stacks
- Network: attach private VPC subnet
- Security Group: select previously created web policy
4. Attach floating IP and verify access
Allocate a floating IP from the external network and associate it with the instance port.
Use SSH to verify bootstrap completion and update system packages.
ssh -i ~/.ssh/monal-cloud ubuntu@<floating-ip>sudo apt update && sudo apt -y upgradeOperator tips
- • If SSH fails, confirm security group inbound rule and that cloud-init completed.
- • Reserve floating IP for stable endpoint usage.