Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add content about vmimage backup #613

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
37 changes: 3 additions & 34 deletions docs/vm/backup-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,42 +84,11 @@ You can choose to either delete or retain the previous volumes. By default, all

### Restore a new VM on another Harvester cluster

_Available as of v1.0.0_
_Available as of v1.4.0_

Users can now restore a new VM on another cluster by leveraging the VM metadata & content backup feature.

:::info prerequisites

You must manually configure the virtual machine images with the same name on the new cluster first, otherwise the virtual machines will be failed to recover.

:::

#### Upload the same VM images to a new cluster

1. Check the existing image name (normally starts with `image-`) and create the same one on the new cluster.
```
$ kubectl get vmimages -A
NAMESPACE NAME DISPLAY-NAME SIZE AGE
default image-79hdq focal-server-cloudimg-amd64.img 566886400 5h36m
default image-l7924 harvester-v1.0.0-rc2-amd64.iso 3964551168 137m
default image-lvqxn opensuse-leap-15.3.x86_64-nocloud.qcow2 568524800 5h35m
```
2. Apply a VM image YAML with the same name and content in the new cluster.
```
$ cat <<EOF | kubectl apply -f -
apiVersion: harvesterhci.io/v1beta1
kind: VirtualMachineImage
metadata:
name: image-lvqxn
namespace: default
spec:
displayName: opensuse-leap-15.3.x86_64-nocloud.qcow2
pvcName: ""
pvcNamespace: ""
sourceType: download
url: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_15.3/images/openSUSE-Leap-15.3.x86_64-NoCloud.qcow2
EOF
```
Harvester automatically handles VM image data. If a volume is based on a VM image with a backup, Harvester automatically syncs the VM image with the backup target.
In a new cluster, it the VMbackup is restored to a new VM, Harvester will automatically create the VM image from the backup target.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In a new cluster, it the VMbackup is restored to a new VM, Harvester will automatically create the VM image from the backup target.
In a new cluster, if the VM backup is restored to a new VM, Harvester automatically creates the VM image from the backup target.


#### Restore a new VM in a new cluster

Expand Down