virtuOSo docs v0.8.1

Schedules, snapshots and restore points

Overview

Three features work together, and none of them is on until you turn it on:

  • Schedule starts and stops a VM at set times on chosen days.
  • Snapshot is a full copy of a VM's disk that you can restore later.
  • Restore points are snapshots taken automatically on a schedule and deleted after the number of days you choose.

All of them are in the Schedules and backups card on the VM page. Each section is collapsed to a one line summary, such as "Weekdays, start 08:00, stop 19:00" or "2 snapshots, newest 1 hour ago", and opens by itself when something needs your attention. Every action is also available from the CLI, REST API and MCP server. Schedules, snapshots and restore point policies can also be managed with Terraform. Restoring is the one action that Terraform does not manage, because a restore is something you do and not a state to maintain.

On-prem and AWS. Everything on this page works for on-prem (KVM) VMs and for AWS instances that virtuOSo launched. On-prem snapshots need a VM with one qcow2 disk, which is every VM virtuOSo creates from a cloud image. AWS snapshots are EBS snapshots of the instance's root volume. The AWS permissions in the policy on the AWS page must include the snapshot and lifecycle statements. VMs that belong to an app, such as a Kubernetes cluster, can be managed from the API, CLI and MCP, and their app page keeps its own controls.

Scheduled Start and Stop

Open a VM, then expand Schedule in the Schedules and backups card. Choose the days, a start time, a stop time, or both, and a time zone. Leave the time zone blank to use the server's zone.

  • Each time applies on the days checked. No days checked means every day.
  • A stop is a normal shutdown, the same as the Stop button. Starting a VM that is already running, or stopping one that is already stopped, does nothing.
  • A start or stop that was missed because virtuOSo was down is skipped, not replayed. A schedule never fights a manual start or stop made outside its times.
  • The section shows the last action and whether it worked.
  • Deleting a VM deletes its schedule.
  • AWS. A stop shuts the instance down through the operating system, and a start boots it. An instance usually gets a new public address when it starts, and virtuOSo updates the address it shows. A stopped instance does not cost for compute, but its disk and snapshots still do.
vm schedule set dev-box --days weekdays --start 08:00 --stop 19:00 --tz America/New_York
vm schedule list
vm schedule clear dev-box

Snapshots

Expand Snapshots to take one. You can give it a name and choose how long to keep it: 1, 3, 5, 7, 14 or 28 days, or until you delete it.

  • Full copy. Each snapshot is a standalone copy of the VM's disk, so deleting one never affects another.
  • Running or stopped. A snapshot of a running VM is crash consistent, as if the power had been cut, and the VM keeps running. Stop the VM first for a clean copy.
  • Where they are stored. Beside the VM storage, in a snapshots folder, so they use the same free space as your VMs.
  • One operation at a time. A VM can only have one snapshot or restore running at once. A second request is refused until the first finishes.
  • Deleting a VM deletes its snapshots.
vm snapshot create web1 --name "before upgrade" --keep 7
vm snapshot list web1
vm snapshot delete web1 snap-20260301-020000-ab12cd

Restoring a Snapshot

Choose Restore next to a snapshot. virtuOSo then:

  1. Shuts the VM down. If it does not shut down within about 90 seconds it is stopped by force.
  2. Saves a safety copy of the current state and keeps it for 7 days.
  3. Replaces the VM's disk with the snapshot.
  4. Starts the VM again if it was running.

On AWS, the restore takes several minutes. AWS only replaces a root volume on a running instance, so virtuOSo shuts the instance down for a clean safety copy, starts it for the replacement, shuts it down again, and then starts it if it was running. The old root volume is deleted. The instance keeps its instance ID, and its public address changes. If a restore fails, the VM is started again if it was running before, and the error names the safety copy.

If the safety copy cannot be saved, for example because the disk is full, nothing is restored. To undo a restore, restore the safety copy. It is listed with the source before-restore.

Everything changed since the snapshot is lost when you restore, so the UI asks you to confirm. A small VM restores in about a minute.

vm snapshot restore web1 snap-20260301-020000-ab12cd

Restore Points

The Restore points section takes snapshots for you. Choose the days, a time of day, a time zone, and how many days to keep each one (1, 3, 5, 7, 14 or 28). They appear in the snapshot list marked scheduled, and you restore them like any other snapshot.

  • Off by default. A VM has no restore points until you create a policy.
  • Always expire. A restore point is deleted after its keep time. Use a manual snapshot for something you want to keep.
  • Skipped, with a reason. If disk space is short or the VM is busy at the time, that run is skipped and the section says why. It is not retried straight away.
  • Estimate. The section shows how many copies exist at once and roughly how much space they use.
vm restore-point set web1 --at 02:00 --keep 7
vm restore-point show web1
vm restore-point clear web1

Disk Space and Retention

On AWS snapshots are incremental and stored by AWS, so they use no space on this server, and the free space check does not apply. You pay AWS for the data they hold, so long retention on a busy disk adds up. Check your AWS bill the first time you turn on restore points.

On-prem, every snapshot is a full copy, so space is the main cost. A fresh Ubuntu VM is under 1 GB, and a VM with a lot of data is much larger. Nightly restore points kept for 28 days means 28 copies.

  • virtuOSo shows an estimate before you take a snapshot, and refuses to start one if less than 5 GB of free space would remain.
  • Expired snapshots are deleted automatically once an hour. The newest snapshot of a VM is never deleted automatically, even if it has expired, so a VM always keeps something to restore. Snapshots kept until you delete them are never removed.
  • The safety copy taken before a restore is kept for 7 days.

UI, CLI, API, MCP and Terraform

ActionCLIREST APIMCP toolTerraform
Set a schedulevm schedule setPUT /api/v1/vms/{name}/scheduleset_vm_schedulevirtuoso_vm_schedule
Read or remove a schedulevm schedule show, clearGET, DELETE same pathget_vm_schedule, clear_vm_schedulesame resource
List all schedulesvm schedule listGET /api/v1/schedules (admin)list_vm_schedules
Take a snapshotvm snapshot createPOST /api/v1/vms/{name}/snapshotscreate_vm_snapshotvirtuoso_snapshot
List snapshotsvm snapshot listGET /api/v1/vms/{name}/snapshotslist_vm_snapshotssame resource
Delete a snapshotvm snapshot deleteDELETE /api/v1/vms/{name}/snapshots/{id}delete_vm_snapshotsame resource
Restore a snapshotvm snapshot restorePOST /api/v1/vms/{name}/snapshots/{id}/restorerestore_vm_snapshotnot available
Set restore pointsvm restore-point setPUT /api/v1/vms/{name}/restore-policyset_vm_restore_policyvirtuoso_restore_policy
Read or remove restore pointsvm restore-point show, clearGET, DELETE same pathget_vm_restore_policy, clear_vm_restore_policysame resource

Creating a snapshot and restoring one return at once with HTTP 202. Poll the snapshot list until the status is ready. Example:

curl -sk -X POST https://your-server/api/v1/vms/web1/snapshots \
  -H "Authorization: Bearer $VIRTUOSO_API_KEY" \
  -d '{"name":"before upgrade","retention_days":7}'

curl -sk https://your-server/api/v1/vms/web1/snapshots \
  -H "Authorization: Bearer $VIRTUOSO_API_KEY"

Terraform snapshots default to retention_days = 0, which keeps them until the resource is destroyed. A snapshot with a keep time is removed by virtuOSo when it expires, and Terraform then plans to create it again.

The CLI commands run on the server and read the same database as the service. The API and MCP tools need an API key from the Profile page, and the user needs access to the VM.

Troubleshooting

  • "not enough free disk space". Delete old snapshots, shorten the keep time of a restore point, or add storage. The message says how much is needed and how much is free.
  • "another operation is running on this VM". A snapshot or restore is in progress. Wait for it to finish.
  • A snapshot shows "failed". The reason is shown next to it. Partial files are removed. Failed entries can be deleted.
  • On AWS, "not allowed to ..." with a permission name. The IAM user behind the saved credentials is missing that permission. Add the two snapshot and lifecycle statements from the AWS page.
  • "snapshots need a VM with exactly one disk". Snapshots support VMs with a single qcow2 disk. VMs with extra data disks are not supported yet.
  • "still running on ... from an interrupted snapshot". If the service stopped in the middle of a live snapshot, the VM can keep running on a temporary file. The message gives the exact virsh blockcommit command that merges it back. Run it as root, then try again.
  • A scheduled start or stop did not happen. Check the card for the last result, the time zone, and that the schedule is enabled. Times missed while virtuOSo was down are skipped.