diff --git a/docs/advanced/addons/vmimport.md b/docs/advanced/addons/vmimport.md index 988e74b6bc..1119c903ba 100644 --- a/docs/advanced/addons/vmimport.md +++ b/docs/advanced/addons/vmimport.md @@ -128,6 +128,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -145,6 +146,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on 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. +If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field. + The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks. If a match is not found, each unmatched network interface is attached to the default `managementNetwork`. @@ -185,4 +188,7 @@ 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. diff --git a/versioned_docs/version-v1.3/advanced/addons/vmimport.md b/versioned_docs/version-v1.3/advanced/addons/vmimport.md index b7734daa18..fb226583d1 100644 --- a/versioned_docs/version-v1.3/advanced/addons/vmimport.md +++ b/versioned_docs/version-v1.3/advanced/addons/vmimport.md @@ -128,6 +128,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -145,6 +146,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on 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. +If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field. + The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks. If a match is not found, each unmatched network interface is attached to the default `managementNetwork`. @@ -185,4 +188,14 @@ 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 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: + ```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 rename the source virtual machine to allow successful completion of the import. diff --git a/versioned_docs/version-v1.4/advanced/addons/vmimport.md b/versioned_docs/version-v1.4/advanced/addons/vmimport.md index f9f92f602e..ab0391fcb5 100644 --- a/versioned_docs/version-v1.4/advanced/addons/vmimport.md +++ b/versioned_docs/version-v1.4/advanced/addons/vmimport.md @@ -128,6 +128,7 @@ metadata: namespace: default spec: virtualMachineName: "alpine-export-test" + folder: "Discovered VM" networkMapping: - sourceNetwork: "dvSwitch 1" destinationNetwork: "default/vlan1" @@ -144,6 +145,8 @@ This will trigger the controller to export the VM named "alpine-export-test" on 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. +If the source virtual machine is placed in a folder, you can specify the folder name in the optional `folder` field. + The list of items in `networkMapping` will define how the source network interfaces are mapped to the Harvester Networks. If a match is not found, each unmatched network interface is attached to the default `managementNetwork`. @@ -185,4 +188,14 @@ 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 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: + ```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 rename the source virtual machine to allow successful completion of the import.