diff --git a/docs/advanced/addons/vmimport.md b/docs/advanced/addons/vmimport.md index c119a15891..24f95cf30a 100644 --- a/docs/advanced/addons/vmimport.md +++ b/docs/advanced/addons/vmimport.md @@ -130,6 +130,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" #optional folder name, in case your vm is placed in a folder networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -184,4 +185,15 @@ spec: :::note 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. -::: \ No newline at end of file +::: + +#### Known issues +* **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. + + +* **Virtual machine image name 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: +```shell +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 +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" +``` +You may need to modify the assigned labels to allow successful completion of the import. \ No newline at end of file diff --git a/versioned_docs/version-v1.3/advanced/addons/vmimport.md b/versioned_docs/version-v1.3/advanced/addons/vmimport.md index c41883982e..e436797ce6 100644 --- a/versioned_docs/version-v1.3/advanced/addons/vmimport.md +++ b/versioned_docs/version-v1.3/advanced/addons/vmimport.md @@ -130,6 +130,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" #optional folder name, in case your vm is placed in a folder networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -184,4 +185,16 @@ spec: :::note 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. -::: \ No newline at end of file +::: + +#### Known issues +* **Source VM name is not RFC1123 compliant:** vm-import-controller will create the Harvester VM object with the same name as the source VM name. Harvester VM names need to be meet the K8s Object naming [criteria](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names). +In case the source VM does not meet these criteria the VM import may fail. Users may need to rename the source VM to allow import to be successful. + + +* **VM image name too long:** vm-import-controller, labels each imported disk with a label of format `vm-import-$VMname-$DiskName`. In certain scenarios this can exceed 63 characters. Users will notice the following error in the vm-import-controller logs +```shell +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 +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" +``` +Users may need to rename the source VM to allow import to be successful. \ No newline at end of file diff --git a/versioned_docs/version-v1.4/advanced/addons/vmimport.md b/versioned_docs/version-v1.4/advanced/addons/vmimport.md index c119a15891..ef53acc63a 100644 --- a/versioned_docs/version-v1.4/advanced/addons/vmimport.md +++ b/versioned_docs/version-v1.4/advanced/addons/vmimport.md @@ -130,6 +130,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" #optional folder name, in case your vm is placed in a folder networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -184,4 +185,16 @@ spec: :::note 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. -::: \ No newline at end of file +::: + +#### Known issues +* **Source VM name is not RFC1123 compliant:** vm-import-controller will create the Harvester VM object with the same name as the source VM name. Harvester VM names need to be meet the K8s Object naming [criteria](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names). +In case the source VM does not meet these criteria the VM import may fail. Users may need to rename the source VM to allow import to be successful. + + +* **VM image name too long:** vm-import-controller, labels each imported disk with a label of format `vm-import-$VMname-$DiskName`. In certain scenarios this can exceed 63 characters. Users will notice the following error in the vm-import-controller logs +```shell +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 +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" +``` +Users may need to rename the source VM to allow import to be successful. \ No newline at end of file