Take a snapshot of a VM, start a second VM from it, check that your files came across, and clean
up. You need a TIR VM that is Running or Stopped; to create one, see Get started
with TIR Virtual Machines first. To have something to look for later,
sign in to the VM and create a file, for example with echo hello > /root/snapshot-test.txt.
Take the snapshot
Section titled “Take the snapshot”- In TIR, open your project. In the side menu, under Compute, select Virtual Machines.
- Open the VM, then open its Snapshots tab.
- Select Create Snapshot, keep the suggested Snapshot Name, and select Create.
The snapshot starts at once. Create a VM snapshot covers the other ways to take one.
Wait until it is Ready
Section titled “Wait until it is Ready”In the side menu, under Storage, select Snapshots. The new snapshot shows In progress under Status, then Ready. The status changes by itself. Once it shows Ready, you can start a new VM from it.
Start a new VM from it
Section titled “Start a new VM from it”- In the Actions menu of the snapshot, select Create VM.
- The snapshot’s image and version are already chosen. Fill in the rest as for any VM, and give the disk a size at least as large as the snapshot’s Disk Size.
- Select Launch VM.
The new VM starts with the snapshot’s disk. See Create a VM from a snapshot for each choice on the form.
Check your files
Section titled “Check your files”When the new VM shows Running, sign in to it over SSH, as in Connect to a VM over SSH, and look for the file you made:
cat /root/snapshot-test.txtIt prints hello: the new VM has the disk as it was when you took the snapshot.
Delete what you made
Section titled “Delete what you made”A snapshot is billed for its storage until you delete it, and so is the new VM until you delete it. To stop both charges:
- Delete the new VM; see Delete a VM.
- On Storage > Snapshots, open the Actions menu of the snapshot, select Delete Snapshot, and select Delete.
What to do next
Section titled “What to do next”- Schedule VM snapshots to take snapshots automatically.
- Restore a VM from a snapshot to put a VM’s own disk back.
- How snapshots work explains what a snapshot holds.
- Troubleshooting TIR Snapshots when a snapshot shows Failed or an action is unavailable.