Reset and Clone libvirt/KVM guest virtual machines

Published: 20 February 2020

Note: this article is old and may contain outdated or incorrect information.

Prepare the clone

Use the virt-sysprep command to reset a virtual machine. The virtual machine must be shut down before you use this command.

virt-sysprep --connect qemu:///system -d centos7-gold

Create the clone

Use the virt-clone command to create a clone of an existing virtual machine.

virt-clone  --original centos7-gold --name centos7-01 --auto-clone

References