Cloning a virtual machine

Last Updated : Sep 24, 2024 |

Procedure

  1. Run the following command to shutdown a VM:

    virsh shutdown <VM name>

  2. Run the following command to shutdown a VM:

    virt-clone --connect=qemu:///system --original <VM name> --name <Clone name> --file /home/sadmin/<Clone name>.qcow2

    For example: virt-clone --connect=qemu:///system --original KVM-SBCE-7.2 --name Clone-7.2 --file /home/sadmin/Clone-7.2.qcow2

  3. Run the following command to verify that the clone is created:

    virsh list --all