Skip to content

Commit 7f83cd9

Browse files
authored
[FEATURE] OVF import (#908)
* [FEATURE] OVF import Related to: harvester/harvester#4742 Signed-off-by: Volker Theile <[email protected]> * Fix typo Signed-off-by: Volker Theile <[email protected]> * Apply review comments Signed-off-by: Volker Theile <[email protected]> --------- Signed-off-by: Volker Theile <[email protected]>
1 parent 11e2192 commit 7f83cd9

File tree

9 files changed

+61
-19
lines changed

9 files changed

+61
-19
lines changed

docs/advanced/addons/vmimport.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: "VM Import"
1010

1111
_Available as of v1.1.0_
1212

13-
With the vm-import-controller addon users can import their virtual machines from VMware and OpenStack into Harvester.
13+
With the vm-import-controller add-on, you can import virtual machines from VMware, OpenStack, and Open Virtual Appliance (OVA) packages.
1414

1515
To use the VM import feature, users need to enable the vm-import-controller addon.
1616

@@ -29,6 +29,7 @@ To avoid this, users are advised to enable PVC-backed storage and customize the
2929
Currently, the following source providers are supported:
3030
* VMware
3131
* OpenStack
32+
* Open Virtual Appliance (OVA)
3233

3334
## API
3435
The vm-import-controller introduces two CRDs.
@@ -71,7 +72,7 @@ Once this check is passed, the source is marked as ready and can be used for VM
7172

7273
```shell
7374
$ kubectl get vmwaresource.migration
74-
NAME STATUS
75+
NAME STATUS
7576
vcsim clusterReady
7677
```
7778

@@ -107,14 +108,54 @@ stringData:
107108
"ca_cert": "pem-encoded-ca-cert"
108109
```
109110

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
111+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111112

112113
```shell
113-
$ kubectl get opestacksource.migration
114+
$ kubectl get openstacksource.migration
114115
NAME STATUS
115116
devstack clusterReady
116117
```
117118

119+
For OVA-based sources, an example definition is as follows:
120+
121+
```yaml
122+
apiVersion: migration.harvesterhci.io/v1beta1
123+
kind: OvaSource
124+
metadata:
125+
name: example
126+
namespace: default
127+
spec:
128+
url: "http://192.168.0.1:8080/example.ova"
129+
httpTimeoutSeconds: 300
130+
credentials:
131+
name: example-ova-credentials
132+
namespace: default
133+
```
134+
135+
The optional `httpTimeoutSeconds` field allows you to specify the maximum time (in seconds) Harvester waits for an HTTP request to be completed. This period covers the entire transaction, including establishing the connection, handling redirects, and reading the response body. When the value is `0`, the timeout feature is disabled. The default value is `600` (10 minutes).
136+
137+
When configuring the secret, you can include basic authentication credentials for the URL and a CA certificate if the endpoint uses HTTPS.
138+
139+
```yaml
140+
apiVersion: v1
141+
kind: Secret
142+
metadata:
143+
name: example-ova-credentials
144+
namespace: default
145+
stringData:
146+
"username": "user"
147+
"password": "password"
148+
"ca.crt": "pem-encoded-ca-cert"
149+
```
150+
151+
As part of the reconciliation process, the controller issues a HEAD request to the specified URL to confirm its validity before marking the source as ready.
152+
153+
```shell
154+
$ kubectl get ovasource.migration
155+
NAME STATUS
156+
example clusterReady
157+
```
158+
118159
### VirtualMachineImport
119160
The VirtualMachineImport CRD provides a way for users to define a source VM and map to the actual source cluster to perform VM export/import.
120161

@@ -174,6 +215,7 @@ The `defaultDiskBusType` field allows you to specify the bus type for imported d
174215

175216
- VMware sources: The value is used only if Harvester is unable to automatically detect the bus type.
176217
- OpenStack sources: The value is used for all imported disks.
218+
- Open Virtual Appliance (OVA) sources: The value is used only if Harvester is unable to automatically detect the bus type.
177219

178220
The valid values are `sata`, `scsi`, `usb`, and `virtio`. If you do not specify a value, `virtio` is used by default.
179221

@@ -232,7 +274,7 @@ OpenStack allows users to have multiple instances with the same name. In such a
232274
When creating a virtual machine object, the vm-import-controller add-on uses the name of the source virtual machine, which may not meet the Kubernetes object [naming criteria](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names). You may need to rename the source virtual machine to allow successful completion of the import.
233275
##### VMware-Based Virtual Machine Without VMware Tools Is Not Migrated
234276

235-
When you attempt to import a VMware-based virtual machine in Harvester v1.6.0, the following occur if [VMware Tools](https://knowledge.broadcom.com/external/article/315382/overview-of-vmware-tools.html) is not installed on the virtual machine:
277+
When you attempt to import a VMware-based virtual machine in Harvester v1.6.0, the following issues occur if [VMware Tools](https://knowledge.broadcom.com/external/article/315382/overview-of-vmware-tools.html) is not installed on the virtual machine:
236278

237279
- The vm-import-controller does not gracefully shut down the guest operating system.
238280
- When the graceful shutdown period (`gracefulShutdownTimeoutSeconds`) lapses, the vm-import-controller does not force a hard poweroff.

i18n/zh/docusaurus-plugin-content-docs/current/advanced/vmimport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ stringData:
108108
OpenStack 源的调协过程会尝试列出项目中的虚拟机并将源标记为 Ready:
109109

110110
```shell
111-
$ kubectl get opestacksource.migration
111+
$ kubectl get openstacksource.migration
112112
NAME STATUS
113113
devstack clusterReady
114114
```

i18n/zh/docusaurus-plugin-content-docs/version-v1.1/advanced/vmimport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ stringData:
108108
OpenStack 源的调协过程会尝试列出项目中的虚拟机并将源标记为 Ready:
109109

110110
```shell
111-
$ kubectl get opestacksource.migration
111+
$ kubectl get openstacksource.migration
112112
NAME STATUS
113113
devstack clusterReady
114114
```

versioned_docs/version-v1.1/advanced/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

versioned_docs/version-v1.2/advanced/addons/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

versioned_docs/version-v1.3/advanced/addons/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

versioned_docs/version-v1.4/advanced/addons/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

versioned_docs/version-v1.5/advanced/addons/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

versioned_docs/version-v1.6/advanced/addons/vmimport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ stringData:
107107
"ca_cert": "pem-encoded-ca-cert"
108108
```
109109

110-
The OpenStack source reconciliation process attempts to list VMs in the project and marks the source as ready.
110+
As part of the reconciliation process, the controller attempts to list VMs in the project and marks the source as ready.
111111

112112
```shell
113-
$ kubectl get opestacksource.migration
113+
$ kubectl get openstacksource.migration
114114
NAME STATUS
115115
devstack clusterReady
116116
```

0 commit comments

Comments
 (0)