Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OVA: support for configuring ovfenv #1216

Open
3 tasks
arturshadnik opened this issue Nov 27, 2024 · 3 comments
Open
3 tasks

OVA: support for configuring ovfenv #1216

arturshadnik opened this issue Nov 27, 2024 · 3 comments

Comments

@arturshadnik
Copy link
Contributor

Right now, forklift does not offer any mechanism for configuring an ovfenv during migrations using OVA provider. Some OVAs require an env to be configured in order to function properly. Adding support for this will involve several steps:

  • Extend OVA provider server and inventory server to return relevant parts of the OVF template parsed here. The section which includes relevant data is Envelope.VirtualSystem.ProductSection https://pkg.go.dev/github.com/vmware/[email protected]/ovf#ProductSection. This will allow the user to see which Properties are required and need to be configured before the migration. Draft PR here: feat: add ova ProductSection to ova provider server resp #1204

  • Extend Plan CR with a new optional field Plan.Spec.VM.OvaEnvConfigMap, a reference to a ConfigMap in the target namespace. The ConfigMap can be attached as a disk to the KubeVirt VM, per instructions here. The ConfigMap will contain ovfenv.xml. It can then be mounted inside the running VM to make the ovfenv accessible.

  • Include a vmtoolsd-shim binary to a) mount the disk to the VM and b) make the env available to the VM/application. For the shim, I will provide source code, but the way its implemented is open. One options is to release it as a separate binary that users can download as needed, for example using a custom virt-customize script. Another option could be to include it in the virt-v2v image and copy it into the guest OS during conversion. Open to suggestions.

With these 3 components, users will have what they need to be able to determine which env parameters need to be set, configure them, and make them available once the VM is running.

@mnecas
Copy link
Member

mnecas commented Nov 27, 2024

Extend Plan CR with a new optional field Plan.Spec.VM.OvaEnvConfigMap, a reference to a ConfigMap in the target namespace. The ConfigMap can be attached as a disk to the KubeVirt VM, per instructions here. The ConfigMap will contain ovfenv.xml. It can then be mounted inside the running VM to make the ovfenv accessible.

If there will be any changes to the CRD, I'll be required to create a design doc describing the changes.
Generally would like to have the design doc for any large changes. For example: #1213

@mnecas
Copy link
Member

mnecas commented Nov 27, 2024

Include a vmtoolsd-shim binary to a) mount the disk to the VM and b) make the env available to the VM/application. For the shim, I will provide source code, but the way its implemented is open. One options is to release it as a separate binary that users can download as needed, for example using a custom virt-customize script. Another option could be to include it in the virt-v2v image and copy it into the guest OS during conversion. Open to suggestions.

What would the purpose of the vmtoolsd-shim?

@arturshadnik
Copy link
Contributor Author

Please see the design doc here #1226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants