Commit Graph

4 Commits

Author SHA1 Message Date
Volker Theile
4659913073 Make sure the label harvesterhci.io/imageDisplayName is valid
If it gets longer than 63 characters, then replace the label value by a hash to do not abort the VM import. The origin value is still used as `VirtualMachineImageSpec.DisplayName`. The label is currently used to search for the `VirtualMachineImage` object during the reconciliation phase.

Related to: https://github.com/harvester/harvester/issues/6463

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-02-17 17:37:44 +08:00
Volker Theile
29629c75f8
Enhance importer to handle several issue (#42)
- Import OpenStack server by UUID
- Import OpenStack server with upper case characters in its name

The following improvements have been done:
- Sanitize the configured `VirtualMachineName` field, e.g. convert upper case to lower case to make it RFC 1123 compliant.
- Convert UUID to real name for OpenStack imports
- Reduce waiting time to recheck if created VM is running from 5min to 2min
- Rename variable `uuid` to `serverUUID` in the OpenStack client code to do not collide with the imported uuid module
- Improve error and log messages
- Fix typos
- Add comments

Related to: https://github.com/harvester/harvester/issues/6500
Related to: https://github.com/harvester/harvester/issues/6505

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-02-04 07:42:42 +01:00
Gaurav Mehta
bb1cef97a5 added debug logging and also change behaviour of controller when vm export from source fails to stop rather than keep trying
added more debug info

close lease earlier

stage vmware migration improvements

improve openstack migration to check uefi/tpm/secureboot from associated image

improve firmware lookup for openstack, and add ability to specify custom storage classes

fix storage class caching issue

drop need for sync

fix imports
2024-08-02 12:23:45 +10:00
Gaurav Mehta
40948a8ba9
work around to reconcile vm images more effectively (#16)
simplify disk condition checks

convert disk image status reconcile into a wrapper

move VM reconcile to a wrapper method

move preflight checks to a wrapper

more wrappers
2023-08-04 13:04:29 +08:00