Virtual Servers in Oracle Cloud Infrastructure (OCI): What They Are and How to Create a VM
After your network is ready, provision compute. This guide explains OCI virtual machines (VMs), shape selection, networking, and step-by-step creation via Console and CLI.
1. What Is a Virtual Server in OCI?
An OCI VM is an isolated compute instance on shared hardware. You control the OS, packages, and services, just like a traditional server—without managing physical infrastructure.
- Elastic performance: choose CPU, RAM, storage.
- OS flexibility: Oracle Linux, Ubuntu, Windows, custom images.
- Global placement: any region/AD.
- Integrated security: IAM, NSGs, private networking.
2. VM Shapes — Picking the Right Size
| Shape Type | Description | Typical Use |
|---|---|---|
| VM.Standard.E5/E4/E3 | AMD-based, balanced | General web/app servers |
| VM.Standard3.Flex | Flexible OCPU/RAM | Cost-efficient workloads |
| VM.Standard.A1.Flex | Arm-based Ampere (Always Free eligible) | Light web/API, dev |
| VM.DenseIO | NVMe local storage | DBs, caching, IO-heavy |
| VM.GPU | NVIDIA GPUs | AI/ML, graphics |
Tip: Start with a flexible shape, then right-size as usage grows.
3. Networking the VM
Place VMs in a VCN and subnet:
- Public subnet: for web-facing servers needing a public IP.
- Private subnet: for databases/internal tiers.
VCN: 10.0.0.0/16 ├─ Public Subnet: 10.0.1.0/24 (Web VM) └─ Private Subnet: 10.0.2.0/24 (DB VM)
4. Launch a VM from the Console
- Compute → Instances → Create: name, compartment, AD.
- Image: e.g., Oracle Linux 9.
- Shape: pick VM.Standard3.Flex or A1.Flex (for Free).
- Networking: choose VCN/subnet; public IP if needed.
- SSH Keys: upload/generate public key.
- Boot Volume: size & backups.
- Create: when running, SSH in:
ssh -i ~/.ssh/id_rsa opc@<public-ip>
5. Manage & Scale
- Scale: change shape, attach block volumes, autoscale behind an LB.
- Monitor: use OCI Monitoring & Alarms.
- Security: restrict SSH, update OS regularly, back up boot volumes, use images.
6. Always Free VM Options
- Up to 2× A1.Flex instances (Arm) within Free limits.
- Up to 4 OCPUs / 24 GB RAM total, plus block storage and generous egress.
Great for websites, APIs, dev boxes—at zero cost.
7. Automate with OCI CLI (Optional)
oci compute instance launch \ --compartment-id ocid1.compartment.oc1... \ --availability-domain "Uocm:PHX-AD-1" \ --display-name "DevServer01" \ --shape VM.Standard3.Flex \ --shape-config '{"ocpus":1,"memoryInGBs":4}' \ --subnet-id ocid1.subnet.oc1... \ --assign-public-ip true \ --image-id ocid1.image.oc1... \ --ssh-authorized-keys-file ~/.ssh/id_rsa.pub
8. Summary
OCI VMs provide control and flexibility for apps, APIs, and services. Choose the right shape, place instances correctly in your VCN, and use automation to keep deployments consistent.