Skip to content

Commit c7ea670

Browse files
ibrokethecloudjillian-maroketvotdev
authored
known vm-import-controller issues (#685)
* known vm-import-controller issues Signed-off-by: Gaurav Mehta <[email protected]> * Apply suggestions from code review include feedback from Jillian. Co-authored-by: Jillian <[email protected]> Signed-off-by: Gaurav Mehta <[email protected]> * Several improvements Signed-off-by: Volker Theile <[email protected]> Signed-off-by: Gaurav Mehta <[email protected]> * Address review comments Signed-off-by: Volker Theile <[email protected]> Signed-off-by: Gaurav Mehta <[email protected]> --------- Signed-off-by: Gaurav Mehta <[email protected]> Signed-off-by: Volker Theile <[email protected]> Co-authored-by: Jillian <[email protected]> Co-authored-by: Volker Theile <[email protected]>
1 parent 6738aa4 commit c7ea670

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

docs/advanced/addons/vmimport.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ metadata:
128128
namespace: default
129129
spec:
130130
virtualMachineName: "alpine-export-test"
131+
folder: "Discovered VM"
131132
networkMapping:
132133
- sourceNetwork: "dvSwitch 1"
133134
destinationNetwork: "default/vlan1"
@@ -145,6 +146,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on
145146

146147
This can take a while based on the size of the virtual machine, but users should see `VirtualMachineImages` created for each disk in the defined virtual machine.
147148

149+
If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field.
150+
148151
The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks.
149152

150153
If a match is not found, each unmatched network interface is attached to the default `managementNetwork`.
@@ -185,4 +188,7 @@ spec:
185188

186189
:::note
187190
OpenStack allows users to have multiple instances with the same name. In such a scenario, users are advised to use the Instance ID. The reconciliation logic tries to perform a name-to-ID lookup when a name is used.
188-
:::
191+
:::
192+
193+
#### Known issues
194+
* **Source virtual machine name is not RFC1123 compliant**: 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.

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ metadata:
128128
namespace: default
129129
spec:
130130
virtualMachineName: "alpine-export-test"
131+
folder: "Discovered VM"
131132
networkMapping:
132133
- sourceNetwork: "dvSwitch 1"
133134
destinationNetwork: "default/vlan1"
@@ -145,6 +146,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on
145146

146147
This can take a while based on the size of the virtual machine, but users should see `VirtualMachineImages` created for each disk in the defined virtual machine.
147148

149+
If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field.
150+
148151
The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks.
149152

150153
If a match is not found, each unmatched network interface is attached to the default `managementNetwork`.
@@ -185,4 +188,14 @@ spec:
185188

186189
:::note
187190
OpenStack allows users to have multiple instances with the same name. In such a scenario, users are advised to use the Instance ID. The reconciliation logic tries to perform a name-to-ID lookup when a name is used.
188-
:::
191+
:::
192+
193+
#### Known issues
194+
* **Source virtual machine name is not RFC1123 compliant**: 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.
195+
196+
* **Virtual machine image name is too long**: The vm-import-controller add-on labels each imported disk using the format `vm-import-$VMname-$DiskName`. If a label exceeds 63 characters, you will see the following error message in the vm-import-controller logs:
197+
```shell
198+
harvester-vm-import-controller-5698cd57c4-zw9l5 time="2024-08-30T19:20:34Z" level=error msg="error syncing 'default/mike-mr-tumbleweed-test': handler virtualmachine-import-job-change: error creating vmi: VirtualMachineImage.harvesterhci.io \"image-z
199+
nqsp\" is invalid: metadata.labels: Invalid value: \"vm-import-mike-mr-tumbleweed-test-mike-mr-tumbleweed-test-default-disk-0.img\": must be no more than 63 characters, requeuing"
200+
```
201+
You may need to rename the source virtual machine to allow successful completion of the import.

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ metadata:
128128
namespace: default
129129
spec:
130130
virtualMachineName: "alpine-export-test"
131+
folder: "Discovered VM"
131132
networkMapping:
132133
- sourceNetwork: "dvSwitch 1"
133134
destinationNetwork: "default/vlan1"
@@ -144,6 +145,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on
144145

145146
This can take a while based on the size of the virtual machine, but users should see `VirtualMachineImages` created for each disk in the defined virtual machine.
146147

148+
If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field.
149+
147150
The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks.
148151

149152
If a match is not found, each unmatched network interface is attached to the default `managementNetwork`.
@@ -185,4 +188,14 @@ spec:
185188

186189
:::note
187190
OpenStack allows users to have multiple instances with the same name. In such a scenario, users are advised to use the Instance ID. The reconciliation logic tries to perform a name-to-ID lookup when a name is used.
188-
:::
191+
:::
192+
193+
#### Known issues
194+
* **Source virtual machine name is not RFC1123 compliant**: 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.
195+
196+
* **Virtual machine image name is too long**: The vm-import-controller add-on labels each imported disk using the format `vm-import-$VMname-$DiskName`. If a label exceeds 63 characters, you will see the following error message in the vm-import-controller logs:
197+
```shell
198+
harvester-vm-import-controller-5698cd57c4-zw9l5 time="2024-08-30T19:20:34Z" level=error msg="error syncing 'default/mike-mr-tumbleweed-test': handler virtualmachine-import-job-change: error creating vmi: VirtualMachineImage.harvesterhci.io \"image-z
199+
nqsp\" is invalid: metadata.labels: Invalid value: \"vm-import-mike-mr-tumbleweed-test-mike-mr-tumbleweed-test-default-disk-0.img\": must be no more than 63 characters, requeuing"
200+
```
201+
You may need to rename the source virtual machine to allow successful completion of the import.

0 commit comments

Comments
 (0)