Skip to content

Commit 8a6dd01

Browse files
committed
Add KVM support to VM Importer
Related to: harvester/harvester#9948 Signed-off-by: Volker Theile <vtheile@suse.com>
1 parent 5bd19e2 commit 8a6dd01

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

docs/advanced/addons/vmimport.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ Currently, the following source providers are supported:
2424
* VMware
2525
* OpenStack
2626
* Open Virtual Appliance (OVA)
27+
* KVM
2728

2829
## API
2930
The vm-import-controller introduces two CRDs.
3031

3132
### Sources
3233
Sources allow users to define valid source clusters.
3334

34-
For example:
35+
#### VMware
3536

3637
```yaml
3738
apiVersion: migration.harvesterhci.io/v1beta1
@@ -70,6 +71,8 @@ NAME STATUS
7071
vcsim clusterReady
7172
```
7273

74+
#### OpenStack
75+
7376
For OpenStack-based source clusters, an example definition is as follows:
7477

7578
```yaml
@@ -110,6 +113,8 @@ NAME STATUS
110113
devstack clusterReady
111114
```
112115

116+
#### Open Virtual Appliance
117+
113118
For OVA-based sources, an example definition is as follows:
114119

115120
```yaml
@@ -150,6 +155,40 @@ NAME STATUS
150155
example clusterReady
151156
```
152157

158+
#### KVM
159+
160+
For KVM-based sources, an example definition is as follows:
161+
162+
```yaml
163+
apiVersion: migration.harvesterhci.io/v1beta1
164+
kind: KVMSource
165+
metadata:
166+
name: kvm
167+
namespace: default
168+
spec:
169+
libvirtURI: "qemu+ssh://192.168.0.1/system"
170+
credentials:
171+
name: example-kvm-credentials
172+
namespace: default
173+
```
174+
175+
Check out the libvirt documentation on how to configure the [libvirtURI](https://libvirt.org/uri.html) field.
176+
When configuring the secret, you can include the authentication credentials that are used to log into the source system via SSH.
177+
178+
```yaml
179+
apiVersion: v1
180+
kind: Secret
181+
metadata:
182+
name: example-kvm-credentials
183+
namespace: default
184+
stringData:
185+
"username": "user"
186+
"password": "password"
187+
"privateKey": "pem-encoded-private-key"
188+
```
189+
190+
As part of the reconciliation process, the controller issues a `virsh` command on the specified URI to confirm its validity before marking the source as ready.
191+
153192
### VirtualMachineImport
154193
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.
155194

0 commit comments

Comments
 (0)