Introduction
Getting Started
VM Life Cycle Management
Support
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
VM Clone
Copy Markdown
Open in ChatGPT
Open in Claude
A VM clone is a copy of a virtual machine. After the cloning operation, the clone VM runs as a separate virtual machine.
The clone.kubevirt.io API Group defines resources for cloning KubeVirt VMs.
Creating a VM Clone
Under the hood, the clone API relies upon Snapshot & Restore APIs. Therefore, in order to be able to use the clone API, please see VM Snapshot & Restore pre-requisites.
In order to initiate cloning, a VirtualMachineClone object (CRD) needs to be created on the cluster. An example for such an object is:
YAML
xxxxxxxxxxkind: VirtualMachineCloneapiVersion: "clone.kubevirt.io/v1alpha1"metadata: name: clone-fedora-1spec: # source & target definitions source: apiGroup: kubevirt.io kind: VirtualMachine name: fedora-vm-1 target: apiGroup: kubevirt.io kind: VirtualMachine name: fedora-vm-1-cloneApply it and see the clone progress:
YAML
xxxxxxxxxxkubectl get vmclone -wNAME PHASE SOURCEVIRTUALMACHINE TARGETVIRTUALMACHINEclone-fedora-1 fedora-vm-1 fedora-vm-1-cloneclone-fedora-1 SnapshotInProgress fedora-vm-1 fedora-vm-1-cloneclone-fedora-1 RestoreInProgress fedora-vm-1 fedora-vm-1-cloneclone-fedora-1 Succeeded fedora-vm-1 fedora-vm-1-cloneSource & Target
The source and target indicate the source/target API group, kind and name. A few important notes:
- Currently, the only supported kinds are
VirtualMachine(ofkubevirt.ioapi group) andVirtualMachineSnapshot( ofsnapshot.kubevirt.ioapi group), but more types are expected to be supported in the future. See "future roadmap" below for more info. - The target name is optional. If unspecified, the clone controller will generate a name for the target automatically.
- The target and source must reside in the same namespace.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message