What is Virtual Machines?

Learn what Virtual Machines offers, how instances, disks, and networking fit together, and which dimensions you are billed for.

Virtual Machines lets you run virtual machines, called instances in the console, in your projects. You choose a size, a boot source, disks, and networking in a guided wizard, and you see the estimated cost and the quota the request uses before anything is created. Instances run in the regions your platform offers, such as Istanbul 1.

Key features

  • Guided creation. An eight-step wizard shows the estimated cost, your quota after the request, and the REST equivalent of the call before you create anything. See Create a virtual machine.
  • Sizes from the region catalog. Compare every size published in the region by vCPU, memory, GPU, and price, with a live availability check. See Sizes and series.
  • Three boot sources. Start from an image, an existing bootable volume, or a snapshot. See Boot sources.
  • SSH keys, a password, or both. Install one or more SSH key pairs, an administrator account with a password, or both, on the first boot. See Manage SSH key pairs.
  • First-boot configuration. Pass cloud-init user data that runs when the instance boots for the first time. See Configure a virtual machine at first boot with cloud-init.
  • Batch creation. Create up to 20 identical instances from one request. See Create several identical instances.
  • Browser console and serial log. Open a VNC console in your browser, or download the serial console log when the network is unreachable. See Connect to a virtual machine.
  • Resize with a price comparison. Compare the hourly and monthly prices of the current and the new size before you confirm. See Resize a virtual machine.
  • Deletion protection. The console and the REST API refuse to delete a protected instance until you turn the protection off. See Start, stop, reboot, and delete a virtual machine.
  • Tags for cost analysis. Group the cost of your instances by tag in Cost Explorer. See Organize resources with tags.

How it works

An instance belongs to a project and runs in the project's region. Its size sets the number of vCPUs and the amount of memory, and its price. Every instance boots from a Block Storage volume, its OS disk: when you boot from an image or a snapshot, the platform creates a new OS disk in the size you choose; when you boot from an existing bootable volume, that volume becomes the OS disk. Data disks are additional volumes that you add when you create the instance or attach later.

Network interfaces connect the instance to your virtual networks. Security groups filter its traffic, and a Floating IP gives it a public IPv4 address. Your user data and the SSH keys reach the instance through cloud-init on the first boot, so use images that run cloud-init.

Creating, starting, stopping, resizing, and deleting an instance run as asynchronous operations. The console refreshes the instance while it changes state, and an instance accepts one lifecycle action at a time.

The Instances list in the console, with status filters for all, running, stopped, and error instances, and columns for name, status, size, IP address, and creation time.
Console screenshot · illustrative data

Use cases

  • Web and application tiers. Run web and application servers behind a load balancer, and create them in batches from your own image.
  • Business applications. Run line-of-business applications and databases in the regions your platform offers, such as Istanbul 1.
  • Development and test. Create short-lived environments that are billed per second, and track their cost with tags.

Billing

Virtual Machines bills these dimensions:

DimensionHow it's billed
ComputePer second at the size's hourly rate, from creation, while the instance is Running or Stopped.
OS disk and data disksAs Block Storage volumes, per GB-month at each volume's tier rate, for as long as the volume exists.
Floating IPPer hour while the address is allocated, whether or not it's associated with an instance.
MonitoringPer hour while monitoring is on, when monitoring has a price in your region.
Add-ons and licensesFor the period you choose (hourly, monthly, or yearly) while they're attached to the instance.

For when each dimension is billed, see Power states and billing. For how usage becomes charges on your invoice, see How billing works. For prices, see Pricing.

Limits

  • Up to 20 instances in one create request.
  • Up to 8 data disks when you create an instance, each from 1 to 4,096 GB.
  • A new instance's name must be unique within the project.
  • Instances, vCPUs, RAM, volumes, volume storage, and Floating IPs count toward the subscription's quota and the project's allocation.

For all limits, see Virtual Machines limits. To request a quota increase, see Quotas.

Next steps

On this page