From 72f7080bdcc08685011def66ba374e2c332e98d4 Mon Sep 17 00:00:00 2001 From: Sam Lucidi Date: Tue, 26 Nov 2024 14:07:58 -0500 Subject: [PATCH 1/3] Introduce enhancement for mapping OVA disks Signed-off-by: Sam Lucidi --- docs/enhancements/multidisk-ova.md | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 docs/enhancements/multidisk-ova.md diff --git a/docs/enhancements/multidisk-ova.md b/docs/enhancements/multidisk-ova.md new file mode 100644 index 000000000..571d68571 --- /dev/null +++ b/docs/enhancements/multidisk-ova.md @@ -0,0 +1,79 @@ +--- +title: multidisk-ova +authors: + - "@mansam" +reviewers: + - "@mnecas" +approvers: + - "@mnecas" +creation-date: 2024-11-26 +last-updated: 2024-11-26 +status: implementable +--- + +# Storage Mapping for multi-disk OVA Imports + +## Release Signoff Checklist + +- [ ] Enhancement is `implementable` +- [ ] Design details are appropriately documented from clear requirements +- [ ] Test plan is defined +- [ ] User-facing documentation is created + +## Summary + +In the current release of Forklift it is possible to import OVA appliances +that have been exported from a vSphere environment. However, all of +an appliance's disks are mapped to the same storage class, and it is +not possible for the end user to indicate that certain disks should be +mapped differently from others. In order to support more use cases, it +should be possible to select map a destination storage class for each +disk of an OVA appliance individually. Forklift does not normally allow +such fine-grained storage mapping because it becomes untenable with a +large number of VMs, but because an OVA plan is expected to involve only +a small number of VMs it should be acceptable. + +### Goals + +* Forklift will enable end users to individually map each disk of a +vSphere OVA appliance to a destination storage class of their choice. + +### Non-Goals + +* Forklift will not allow fine-grained storage mapping for any VM providers +other than OVA. + +## Proposal + +The OVA inventory adapter should be modified to surface each disk from each +OVA appliance as its own source storage class. The OVA VM builder would then +be modified to respect these mappings when building the DataVolumes rather +than assuming only a single mapping. + +### Security, Risks, and Mitigations + +No new security risks are introduced by permitting disks to be mapped individually. + +## Design Details + +### Test Plan + +Existing tests for the OVA provider should be updated to include individual disk mappings. No additional +tests should be necessary. + +### Upgrade / Downgrade Strategy + +Permitting OVA disks to be mapped individually does not require +any changes to the update or downgrade path of Forklift itself, although Plans +created with this feature would not be compatible with a downgraded version of +Forklift. + +### Open Questions + +Should we continue, to support a default mapping or require each disk to be specifically mapped? +Allowing a default would preserve the current ease of use for simple cases, but may make it easier +to make mistakes since plan validation would not be able to ensure that each of the disks had been mapped as desired. + +## Implementation History + +* 11/26/2024 - Enhancement submitted. \ No newline at end of file From e5f63aa493f2f8c25ee9f151e1e7f974c301659e Mon Sep 17 00:00:00 2001 From: Sam Lucidi Date: Mon, 2 Dec 2024 13:23:33 -0500 Subject: [PATCH 2/3] Fix formatting --- docs/enhancements/multidisk-ova.md | 39 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/docs/enhancements/multidisk-ova.md b/docs/enhancements/multidisk-ova.md index 571d68571..6c3796922 100644 --- a/docs/enhancements/multidisk-ova.md +++ b/docs/enhancements/multidisk-ova.md @@ -36,44 +36,47 @@ a small number of VMs it should be acceptable. ### Goals * Forklift will enable end users to individually map each disk of a -vSphere OVA appliance to a destination storage class of their choice. + vSphere OVA appliance to a destination storage class of their choice. ### Non-Goals -* Forklift will not allow fine-grained storage mapping for any VM providers -other than OVA. +* Forklift will not allow fine-grained storage mapping for any VM + providers other than OVA. ## Proposal -The OVA inventory adapter should be modified to surface each disk from each -OVA appliance as its own source storage class. The OVA VM builder would then -be modified to respect these mappings when building the DataVolumes rather -than assuming only a single mapping. +The OVA inventory adapter should be modified to surface each disk from +each OVA appliance as its own source storage class. The OVA VM builder +would then be modified to respect these mappings when building the +DataVolumes rather than assuming only a single mapping. ### Security, Risks, and Mitigations -No new security risks are introduced by permitting disks to be mapped individually. +No new security risks are introduced by permitting disks to be mapped +individually. ## Design Details ### Test Plan -Existing tests for the OVA provider should be updated to include individual disk mappings. No additional -tests should be necessary. +Existing tests for the OVA provider should be updated to include +individual disk mappings. No additional tests should be necessary. ### Upgrade / Downgrade Strategy -Permitting OVA disks to be mapped individually does not require -any changes to the update or downgrade path of Forklift itself, although Plans -created with this feature would not be compatible with a downgraded version of -Forklift. +Permitting OVA disks to be mapped individually does not require any +changes to the update or downgrade path of Forklift itself, although +Plans created with this feature would not be compatible with a downgraded +version of Forklift. ### Open Questions -Should we continue, to support a default mapping or require each disk to be specifically mapped? -Allowing a default would preserve the current ease of use for simple cases, but may make it easier -to make mistakes since plan validation would not be able to ensure that each of the disks had been mapped as desired. +Should we continue, to support a default mapping or require each disk to +be specifically mapped? Allowing a default would preserve the current +ease of use for simple cases, but may make it easier to make mistakes +since plan validation would not be able to ensure that each of the disks +had been mapped as desired. ## Implementation History -* 11/26/2024 - Enhancement submitted. \ No newline at end of file +* 11/26/2024 - Enhancement submitted. From 459bef9b074fc971a41b3928c052ebd44d9d971c Mon Sep 17 00:00:00 2001 From: Sam Lucidi Date: Tue, 3 Dec 2024 14:27:41 -0500 Subject: [PATCH 3/3] Add example mapping Signed-off-by: Sam Lucidi --- docs/enhancements/multidisk-ova.md | 33 +++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/enhancements/multidisk-ova.md b/docs/enhancements/multidisk-ova.md index 6c3796922..adf127def 100644 --- a/docs/enhancements/multidisk-ova.md +++ b/docs/enhancements/multidisk-ova.md @@ -33,6 +33,36 @@ such fine-grained storage mapping because it becomes untenable with a large number of VMs, but because an OVA plan is expected to involve only a small number of VMs it should be acceptable. +### Example StorageMap + +```yaml +spec: + map: + - destination: + storageClass: fast + source: + id: vm1-disk1 + - destination: + storageClass: slow + source: + id: vm1-disk2 + - destination: + storageClass: fast + source: + id: vm2-disk1 + - destination: + storageClass: default + source: + id: default + provider: + destination: + name: host + namespace: default + source: + name: ova + namespace: default +``` + ### Goals * Forklift will enable end users to individually map each disk of a @@ -67,7 +97,8 @@ individual disk mappings. No additional tests should be necessary. Permitting OVA disks to be mapped individually does not require any changes to the update or downgrade path of Forklift itself, although Plans created with this feature would not be compatible with a downgraded -version of Forklift. +version of Forklift as the previous version would not recognize the individual +disk mappings. ### Open Questions