Previous page

Next page

Locate page in Contents

Print this page

Creating Snapshots

To create a snapshot of a virtual machine or Container, use the prlctl snapshot command.

Creating Virtual Machine Snapshots

To create a snapshot of the virtual machine MyVM, do the following:

# prlctl snapshot MyVM

...

The snapshot with ID {12w32198-3e30-936e-a0bbc104bd20} has been successfully created.

A newly created snapshot is saved to the /vz/vmprivate/VM_Name.pvm/Snapshots/Snapshot_ID.pvs file, where VM_Name is the corresponding virtual machine name and Snapshot_ID is a unique snapshot ID. In the above example, the snapshot with ID {12w32198-3e30-936e-a0bbc104bd20} is saved to the file /vz/vmprivate/MyVM.pvm/Snapshots/{12w32198-3e30-936e-a0bbc104bd20}.pvs.

# ls /vz/vmprivate/MyVM.pvm/Snapshots/

{063615fa-f2a0-4c14-92d4-4c935df15840}.pvc

Snapshot IDs are needed to switch to and delete snapshots.

When creating a snapshot, you can also set its name and description:

# prlctl snapshot MyVM -n Clean_System -d "This snapshot was created right after installing Windows XP."

...

The snapshot with ID {0i8798uy-1eo0-786d-nn9ic106b9ik} has been successfully created.

You can then view the set name and description in the /vz/vmprivate/MyVM.pvm/Snapshots.xml file.

Creating Container Snapshots

To create a snapshot of Container 101, do the following:

# prlctl snapshot 101

...

The snapshot with ID {08ddd014-7d57-4b19-9a82-15940f38e7f0} has been successfully created.

A newly created snapshot is saved to the /vz/private/<CT_ID>/dump/<snapshot_ID> file, where <CT_ID> is the Container ID and <snapshot_ID> is a snapshot ID. In the example above, the snapshot with ID {08ddd014-7d57-4b19-9a82-15940f38e7f0} is saved to the file /vz/private/101/dump/{08ddd014-7d57-4b19-9a82-15940f38e7f0}.

# ls /vz/private/101/dump

{08ddd014-7d57-4b19-9a82-15940f38e7f0}

Snapshot IDs are needed to switch to and delete snapshots.

When creating a snapshot, you can also set its name and description:

# prlctl snapshot 101 --n Clean_System --d "This snapshot was created right after installing Windows XP."

...

The snapshot with ID {e78bb2b8-7a99-4c8b-ab9a-491a47648c44} has been successfully created.

The set name and description are stored in the /vz/private/<CT_ID>/Snapshots.xml file.

Snapshot Branching

Snapshot branches can be useful for working with, testing or comparing similar configurations. A snapshot branch is created when you do the following:

  1. Create several snapshots.
  2. Revert to one of the snapshots.
  3. Make changes to the virtual machine or Container.
  4. Create a snapshot.

In this case, the newly created snapshot will start a new branch based on the snapshot from Step 2.

Restrictions and Recommendations

  • Virtual machine and snapshot names and snapshot descriptions containing spaces must be enclosed in quotation marks (e.g., "Windows XP") when supplying them to the prlctl command.
  • Before creating a snapshot, it is recommended that you finish any installations, downloads, and stop writing to external devices. You should also complete or cancel any transactions performed via the virtual machine in external databases.