1

I want to create virsh snapshot that does not create any files, just keeps it in the same .qcow2 file.

Basically the same thing that virt-manager does in the 'Manager VM Snapshots' page.

How can I do that?

Hristo Kolev
  • 440
  • 1
  • 6
  • 16

1 Answers1

1

sudo virsh snapshot-create-as YOUR-VM-NAME --name NEW-SNAPSHOT-NAME

Cole Robinson
  • 241
  • 1
  • 3
  • Can I make this disk-only? Without RAM? – Hristo Kolev Oct 31 '19 at 13:29
  • For the internal snapshots that virt-manager uses, the only way is to shutoff the VM. snapshot-create-as has a --disk-only option but it doesn't work with snapshot-revert like expected. It's complicated unfortunately – Cole Robinson Nov 01 '19 at 16:02
  • What I always tried to do is to use `snapshot-create-as` with the `disk-only` because that is what I wanted conceptually. The thing is that it creates 2 separate type of snapshots depending on the parameters and it's not really clear that it does that. I usually use external snapshots to take backups of running machines, but not I want to create internal ones for convenience, so that my colleagues can revert to them with virt-manager, because that is what they use. I wanted `disk-only` for performance reasons, but now I get that it's not going to happen. – Hristo Kolev Nov 01 '19 at 23:23