Forrest logo
back to the qm tool

qm-delsnapshot:tldr:a1185

qm-delsnapshot: Delete a snapshot from a configuration file (even if removing the disk snapshot fails).
$ qm delsnapshot ${vm_id} ${snapshot_name} --force 1
try on your machine

This command is used to delete a specified snapshot for a virtual machine using the "qm" command line tool. Here is a breakdown of the command structure:

  • "qm" is the command that is being executed.
  • "delsnapshot" is the sub-command used to delete a snapshot.
  • "${vm_id}" is a placeholder for the ID of the virtual machine for which the snapshot needs to be deleted. You need to replace "${vm_id}" with the actual ID of the virtual machine.
  • "${snapshot_name}" is a placeholder for the name of the snapshot that needs to be deleted. You need to replace "${snapshot_name}" with the actual name of the snapshot.
  • "--force 1" is an optional flag that forces the deletion of the snapshot without prompting for confirmation. If this flag is not used, the command may prompt for confirmation before deleting the snapshot.

In summary, this command will delete the specified snapshot for the given virtual machine.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the qm tool