Skip to content

Commit 4f0afc4

Browse files
committed
feat: add content about vmimage backup
Signed-off-by: PoAn Yang <[email protected]>
1 parent efda82f commit 4f0afc4

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

docs/vm/backup-restore.md

+3-34
Original file line numberDiff line numberDiff line change
@@ -84,42 +84,11 @@ You can choose to either delete or retain the previous volumes. By default, all
8484

8585
### Restore a new VM on another Harvester cluster
8686

87-
_Available as of v1.0.0_
87+
_Available as of v1.4.0_
8888

8989
Users can now restore a new VM on another cluster by leveraging the VM metadata & content backup feature.
90-
91-
:::info prerequisites
92-
93-
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.
94-
95-
:::
96-
97-
#### Upload the same VM images to a new cluster
98-
99-
1. Check the existing image name (normally starts with `image-`) and create the same one on the new cluster.
100-
```
101-
$ kubectl get vmimages -A
102-
NAMESPACE NAME DISPLAY-NAME SIZE AGE
103-
default image-79hdq focal-server-cloudimg-amd64.img 566886400 5h36m
104-
default image-l7924 harvester-v1.0.0-rc2-amd64.iso 3964551168 137m
105-
default image-lvqxn opensuse-leap-15.3.x86_64-nocloud.qcow2 568524800 5h35m
106-
```
107-
2. Apply a VM image YAML with the same name and content in the new cluster.
108-
```
109-
$ cat <<EOF | kubectl apply -f -
110-
apiVersion: harvesterhci.io/v1beta1
111-
kind: VirtualMachineImage
112-
metadata:
113-
name: image-lvqxn
114-
namespace: default
115-
spec:
116-
displayName: opensuse-leap-15.3.x86_64-nocloud.qcow2
117-
pvcName: ""
118-
pvcNamespace: ""
119-
sourceType: download
120-
url: http://download.opensuse.org/repositories/Cloud:/Images:/Leap_15.3/images/openSUSE-Leap-15.3.x86_64-NoCloud.qcow2
121-
EOF
122-
```
90+
Harvester will handle VM image data automatically. If a volume is based on a VM image and there is a backup for it, Harvester will automatically sync the VM image to backup target.
91+
In a new cluster, it the VMbackup is restored to a new VM, Harvester will automatically create the VM image from the backup target.
12392

12493
#### Restore a new VM in a new cluster
12594

0 commit comments

Comments
 (0)