Commit Graph

14 Commits

Author SHA1 Message Date
Volker Theile
d3ad44e039
Add option to select network interface model while importing VM to Harvester using the vm-import-controller (#78)
Add the field `DefaultNetworkInterfaceModel` to `VirtualMachineImportSpec` and `NetworkInterfaceModel` to `NetworkMapping`. With this new fields it is possible to customize the interface models of the VM NICs.

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-05-26 10:55:54 +02:00
Volker Theile
8d4b8a01d9
Make use of strings.EqualFold for case-insensitiv string comparison (#79)
Signed-off-by: Volker Theile <vtheile@suse.com>
2025-05-07 09:18:09 +02:00
Volker Theile
859479d6fa
SMM is not enabled when TPM is enabled in VMware source client (#71)
Related to: https://github.com/harvester/harvester/issues/7984

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-05-06 10:19:12 +02:00
Volker Theile
6956a12edf
Log the origin VM specification for better troubleshooting (#73)
When importing a VM from VMware or OpenStack, there is no log output of the origin VM spec that is going to be imported. In some situations this information would be helpful for troubleshooting and to understand what is going wrong.

For better processing of the amount of data the specification should be printed as JSON to be able to prettify it externally and to inspect it easily.

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-04-29 13:24:30 +02: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
Volker Theile
51ae21800b
Use network service client to query source network (#62)
Related to: https://github.com/harvester/harvester/issues/7432

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-02-04 07:41:58 +01:00
Volker Theile
d7f05cece9 Bump go to v1.23.4
Related to: https://github.com/harvester/harvester/issues/7336

Signed-off-by: Volker Theile <vtheile@suse.com>
2025-01-17 13:33:34 +08:00
Volker Theile
ea161c2fc1
Validate the network mapping configuration (#46)
- A new `apiGroups` is added to the `ClusterRole` to be able to list `network-attachment-definitions`.
- The `network-attachment-definitions` CRD has to be generated in the test env.

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2024-10-09 11:39:48 +02:00
Gaurav Mehta
e14eb3e096 secure boot needs smm feature state
fixed dapper builds and default bus type on vmware
2024-08-02 12:23:45 +10: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
PoAn Yang
148cec8766 fix: golangci-lint error
Signed-off-by: PoAn Yang <poan.yang@suse.com>
2024-01-12 10:55:44 +08:00
Gaurav Mehta
88b5df8ae6 Additional validation to skip import jobs without disks or invalid vm names
bumped up harvester/harvester to v1.1.0-rc2

changed vmware client to check VM state before attempting poweroff, add closure for ovf client to fix Operation timed out errors

fine tuned integration tests

changed logging message
2022-10-11 19:05:38 +11:00
Gaurav Mehta
0ac976b4cc reorg groups and some reconcile logic 2022-08-26 16:41:47 +10:00
Gaurav Mehta
112008bb81 initial commit for vm-import-controller 2022-08-10 11:08:50 +10:00