Create a VM
Updated
A classic VM is a normal Linux server: its own kernel, its own disk, cloud-init on first boot, and a console. If you have used a cloud instance before, none of this will surprise you.
Before you start you need a storage pool and at least one cached image. See First-run setup and Images and templates.
Create one
Section titled “Create one”-
Open Instances under Virtual machines and start a new VM.
-
Pick an image and size the machine.
Choose a cached cloud image, then set vCPUs, memory, and disk size. The disk is a full copy of the image and can be larger than the original, so size it for what the workload will actually store.
-
Attach it to a network.
Leaving the default is right for most hosts: the VM joins the host’s default VM network and gets an address from your existing DHCP server. To pin an address instead, switch the interface to a static IPv4 address and set the gateway and DNS servers yourself.
-
Set the first-boot configuration.
Apply a template, or fill in the hostname, user, SSH keys, and password directly. This is what cloud-init consumes the first time the machine boots.
-
Boot it.
Leave Boot after creation on and the machine starts as soon as it is built.
Reaching the machine
Section titled “Reaching the machine”The Instances list shows the VM moving to running, then reports the address it was observed at. SSH to that address with the credentials you configured.
If the state stays at booting, the machine started but was never seen on the network. Open its console from the VM detail page and look at the boot output. A VM that never appears is eventually marked failed rather than left claiming to be healthy.
Options worth knowing
Section titled “Options worth knowing”| Option | Why you would use it |
|---|---|
| Batch create | Build several identically shaped VMs at once, with hostnames and addresses stepped automatically |
| Additional interfaces | Attach a VM to more than one network |
| CPU pinning | Bind vCPUs to specific host CPUs for latency-sensitive workloads |
| Disk I/O limits | Cap IOPS and bandwidth so one machine cannot starve the others |
| Anti-spoof and port isolation | Restrict what the machine may send, and stop it talking to its neighbours |
| Console auto-login | Get a console session without a password, useful when you are still setting up access |
Changing a VM later
Section titled “Changing a VM later”Shape changes such as vCPUs, memory, and network attachment are made while the machine is created or stopped, not while it runs. Anti-spoof and port isolation are the exception: those take effect immediately, without a reboot.