Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 51 additions & 10 deletions docs/vm/clone-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,58 @@ _Available as of v1.1.0_

VM can be cloned with/without data. This function doesn't need to take a VM snapshot or set up a backup target first.

## Clone VM with volume data
The cloned virtual machine inherits the source's basic configuration. You can choose whether to include the source's volume data, as well as customize the clone's name and [run strategy](./create-vm.md#run-strategy).

1. On the `Virtual Machines` page, click `Clone` of the VM actions.
1. Set a new VM name and click `Create` to create a new VM.
![clone-vm-with-data.png](/img/v1.2/vm/clone-vm-with-data.png)
## Clone a Virtual Machine with Volume Data

## Clone VM without volume data
1. On the **Virtual Machines** screen, locate the target virtual machine and select **⋮ > Clone**.
![clone-vm-with-data.png](/img/v1.8/vm/clone-vm-with-data.png)

Cloning a VM without volume data creates a new VM with the same configuration as the source VM.
2. Specify a unique name for the cloned virtual machine.

1. On the `Virtual Machines` page, click `Clone` of the VM actions.
1. Unclick the `clone volume data` checkbox.
1. Set a new VM name and click `Create` to create a new VM.
![clone-vm-without-data.png](/img/v1.2/vm/clone-vm-without-data.png)
3. Select a [run strategy](./create-vm.md#run-strategy).
The cloned virtual machine uses the source's run strategy by default.

4. Click **Create**.

## Clone a Virtual Machine Without Volume Data

Cloning a virtual machine without volume data creates a new virtual machine with the same configuration as the source virtual machine.

1. On the **Virtual Machines** screen, locate the target virtual machine and select **⋮ > Clone**.
![clone-vm-without-data.png](/img/v1.8/vm/clone-vm-without-data.png)

2. Clear **Clone volume data**.

3. Specify a unique name for the cloned virtual machine.

4. Select a [run strategy](./create-vm.md#run-strategy).
The cloned virtual machine uses the source's run strategy by default.

5. Click **Create**.
![clone-vm-without-data-config.png](/img/v1.8/vm/clone-vm-without-data-config.png)

## EFI and vTPM Persistent State

Harvester supports cloning virtual machines that use persistent EFI or vTPM states. During cloning, Harvester copies the underlying persistent data that the guest operating system depends on. This ensures the cloned virtual machine retains vital configuration details, such as EFI NVRAM settings and vTPM-stored data (including BitLocker recovery keys).

You can enable EFI and/or vTPM independently before cloning. Harvester preserves only the persistent state required by the cloned virtual machine.

| EFI Status | vTPM Status | Harvester Behavior |
| --- | --- | --- |
| Enabled | Enabled | Preserves both persistent states |
| Enabled | Disabled | Preserves only the EFI state |
| Disabled | Enabled | Preserves only the vTPM state |
| Disabled | Disabled | Skips processing of persistent state storage |

The cloned virtual machine may remain in the `Pending` state while Harvester prepares the persistent state storage.

![efi-tpm-clone.png](/img/v1.9/vm/efi-tpm-clone.png)

:::caution

EFI and vTPM persistent state is stored separately from the volumes listed in `spec.template.spec.volumes`. Harvester creates this storage only after the source virtual machine has been started at least once. If the source virtual machine has never been started, cloning a virtual machine with EFI or vTPM persistent state can fail because the required source storage does not exist.

Because the persistent state is copied from the source virtual machine, guest-visible firmware identifiers such as the firmware UUID will be the same on the cloned virtual machine. The cloned virtual machine still has its own object identity in Harvester.

:::
Binary file added static/img/v1.8/vm/clone-vm-with-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.8/vm/clone-vm-without-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.9/vm/efi-tpm-clone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 25 additions & 10 deletions versioned_docs/version-v1.8/vm/clone-vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,32 @@ _Available as of v1.1.0_

VM can be cloned with/without data. This function doesn't need to take a VM snapshot or set up a backup target first.

## Clone VM with volume data
The cloned virtual machine inherits the source's basic configuration. You can choose whether to include the source's volume data, as well as customize the clone's name and [run strategy](./create-vm.md#run-strategy).

1. On the `Virtual Machines` page, click `Clone` of the VM actions.
1. Set a new VM name and click `Create` to create a new VM.
![clone-vm-with-data.png](/img/v1.2/vm/clone-vm-with-data.png)
## Clone a Virtual Machine with Volume Data

## Clone VM without volume data
1. On the **Virtual Machines** screen, locate the target virtual machine and select **⋮ > Clone**.
![clone-vm-with-data.png](/img/v1.8/vm/clone-vm-with-data.png)

Cloning a VM without volume data creates a new VM with the same configuration as the source VM.
2. Specify a unique name for the cloned virtual machine.

1. On the `Virtual Machines` page, click `Clone` of the VM actions.
1. Unclick the `clone volume data` checkbox.
1. Set a new VM name and click `Create` to create a new VM.
![clone-vm-without-data.png](/img/v1.2/vm/clone-vm-without-data.png)
3. Select a [run strategy](./create-vm.md#run-strategy).
The cloned virtual machine uses the source's run strategy by default.

4. Click **Create**.

## Clone a Virtual Machine Without Volume Data

Cloning a virtual machine without volume data creates a new virtual machine with the same configuration as the source virtual machine.

1. On the **Virtual Machines** screen, locate the target virtual machine and select **⋮ > Clone**.
![clone-vm-without-data.png](/img/v1.8/vm/clone-vm-without-data.png)
2. Clear **Clone volume data**.

3. Specify a unique name for the cloned virtual machine.

4. Select a [run strategy](./create-vm.md#run-strategy).
The cloned virtual machine uses the source's run strategy by default.

5. Click **Create**.
![clone-vm-without-data-config.png](/img/v1.8/vm/clone-vm-without-data-config.png)
Loading