Skip to content

Manage VM lifecycle

This guide shows you how to manage the lifecycle of virtual machines using the evroc CLI, including viewing, starting, stopping, updating, and deleting VMs.

View all VMs in your project:

Terminal window
evroc compute virtualmachine list

Use evroc compute virtualmachine get <name> for detailed information about a specific VM, including its status and IP addresses.

See List Virtual Machines in the API reference.

Get detailed information about a specific VM:

Terminal window
evroc compute virtualmachine get myvm

See Get a Virtual Machine in the API reference.

Stop a running VM. Stopping shuts down the VM, and you can restart it later. Cloud-init doesn’t run again on restart.

Terminal window
evroc compute virtualmachine update myvm --running=false

Start a stopped VM:

Terminal window
evroc compute virtualmachine update myvm --running=true

See Update a Virtual Machine in the API reference.

You can update certain VM properties after creation.

The following fields can be updated on a running or stopped VM:

  • Running state - Start or stop the VM
  • Public IP - Attach or detach a Public IP
  • Security groups - Add, remove, or replace security groups
  • Disks - Attach additional data disks (requires stop/start for changes to take effect)
  • Placement group - Change placement group (requires VM to be stopped)

The following fields can’t be changed after VM creation:

  • Boot disk
  • Resource profile (CPU, memory, GPU)
  • SSH public keys (via CLI/API - however, you can add additional keys manually within the guest OS after logging in)
  • Cloud-init configuration

Attach a Public IP:

Terminal window
evroc compute virtualmachine update myvm --public-ip=mypublicip

Detach a Public IP:

Terminal window
evroc compute virtualmachine update myvm --public-ip=""

Replace all security groups with a new set:

Terminal window
evroc compute virtualmachine update myvm --security-group=web-sg --security-group=app-sg

Add security groups to the existing list:

Terminal window
evroc compute virtualmachine update myvm --append --security-group=new-sg

Remove a security group by omitting it from the replacement list:

Terminal window
evroc compute virtualmachine update myvm --security-group=web-sg # removes all others

You can attach additional data disks to a VM. The disk will become available after the next stop/start cycle.

Terminal window
evroc compute virtualmachine update myvm --append --disk=mydatadisk

Note: After attaching a disk, you must stop and start the VM for the changes to take effect. The disk will need to be formatted and mounted before use.

To change a VM’s placement group, you must first stop the VM.

Stop the VM:

Terminal window
evroc compute virtualmachine update myvm --running=false

Change placement group and restart:

Terminal window
evroc compute virtualmachine update myvm --placement-group=my-new-pg --running=true

You can change a VM’s stack type after creation by updating the VM. The new stack type must be compatible with the subnet the VM is in.

For example, to change a VM from dual-stack to IPv6-only:

Terminal window
evroc compute virtualmachine update my-vm \
--stack-type=ipv6-only

Note: You must stop the VM in order to change the stack type.

Delete a VM permanently. This operation can’t be undone.

Warning: Deleting a VM doesn’t delete attached disks or Public IPs. These resources must be deleted separately if no longer needed.

Terminal window
evroc compute virtualmachine delete myvm

See Delete a Virtual Machine in the API reference.