-
Feature
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
-
Not Selected
-
False
-
False
-
-
-
0
-
0
-
100% To Do, 0% In Progress, 0% Done
Feature Overview (mandatory - Complete while in New status)
The VMware Migration Kit requires a mechanism to customize virtual machine guest operating systems during and after migration to OpenStack. Script Hooks provide users the ability to inject custom scripts at two critical points in the migration workflow: during the V2V conversion process (runscript) and at the first boot of the migrated VM in OpenStack (bootscript). This feature enables network reconfiguration, driver updates, application adjustments, and any guest-level changes necessary to ensure VMs operate correctly in their new OpenStack environment—reducing migration failures and post-migration manual intervention.
Goals (mandatory - Complete while in New status)
- Cloud Migration Engineers: Can automate guest OS customizations during migration without manual intervention
- System Administrators: Can ensure consistent network configuration and driver setup across all migrated VMs
- Operations Teams: Reduce post-migration troubleshooting by addressing OS-level changes proactively
Requirements (mandatory -_ Complete while in Refinement status):
| Requirement | Notes | isMVP? |
|---|---|---|
| runscript parameter in migrate module executes script during V2V conversion | Uses virt-v2v-in-place --run <script> flag; only runs for Linux guests | Yes |
| bootscript parameter configures script to run at first boot in OpenStack | Uses virt-v2v-in-place --firstboot <script> flag | Yes |
| Auto-generation of default network_config.sh runscript from template | Template handles NetworkManager, sysconfig, and netplan backends | Yes |
Done - Acceptance Criteria (mandatory - Complete while in Refinement status):
AC1: When runscript is provided, the script executes during V2V conversion for Linux guests and the migration completes successfully
AC2: When bootscript is provided, the script is configured to run on first boot of the migrated VM in OpenStack
AC3: If runscript or bootscript path does not exist, the migration fails with a clear error message
AC4: Default network_config.sh is auto-generated from template using MAC addresses extracted from VMware metadata
AC5: Generated udev rules correctly map VMware MAC addresses to interface names, supporting:
- NetworkManager system connections
- sysconfig ifcfg-* files
- Netplan YAML configurations
AC6: Scripts are not executed for Windows guests (runscript only applies to Linux)
AC7: Documentation covers script hook usage with examples for common use cases
Use Cases - i.e. User Experience & Workflow: (Initial completion while in Refinement status):
Use Case 1: Network Interface Preservation
Actor: Migration EngineerScenario: Migrating a Linux VM with multiple network interfacesFlow:
- Export VM metadata from VMware (includes MAC addresses)
- Migration workflow auto-generates network_config.sh from template
- During V2V conversion, runscript creates udev rules mapping MACs to interface names
- VM boots in OpenStack with preserved network configuration
Use Case 2: Custom First-Boot Configuration
Actor: System AdministratorScenario: Installing cloud-init compatible agents on first bootFlow:
- Admin provides custom bootscript path via import_workloads_boot_script_path variable
- Bootscript is injected into VM during V2V conversion
- On first boot in OpenStack, bootscript executes (e.g., configures monitoring agents, registers with management systems)
Use Case 3: Advanced V2V Options
Actor: Advanced UserScenario: Migrating encrypted LUKS volumesFlow:
- User provides extraopts: "--key LUKS" parameter
- Combined with scripts, V2V handles encrypted disk conversion
- Scripts handle any post-decryption configuration
Out of Scope _{}(Initial completion while in Refinement status):{_}
- Windows guest runscript execution (Windows VMs are powered off before snapshot; bootscript may still apply)
Documentation Considerations _{}(Initial completion while in Refinement status):{_}
- How to use runscript, bootscript, and extraopts
- Template customization guide for network_config.sh.j2
- Troubleshooting guide for script-related migration failures
- Examples for common customization scenarios:
- Network interface remapping
- Cloud-init configuration
- Driver installation
- Application reconfiguration
Questions to Answer _{}(Initial completion while in Refinement status):{_}
- Should we provide a library of pre-built bootscript templates for common scenarios (cloud-init setup, monitoring agent installation)?
- Is there a need for Windows-specific first-boot customization using sysprep or similar mechanisms?
- Should script execution results be captured and returned in module output for debugging?
- Do we need rollback capabilities if script execution fails?
- Should scripts be validated (syntax check) before migration starts?
Background and Strategic Fit (Initial completion while in Refinement status):
Script Hooks are a core component of the VMware-to-OpenStack migration workflow within the os_migrate.vmware_migration_kit Ansible collection. They leverage virt-v2v-in-place capabilities to modify guest filesystems during the conversion process. This aligns with the collection's goal of providing automated, repeatable migrations with minimal manual intervention.
Customer Considerations _{}(Initial completion while in Refinement status):{_}
- Script Security: Scripts execute with elevated privileges inside the guest; customers should review scripts for security implications
- Testing Requirements: Scripts should be tested on representative VMs before large-scale migrations
- Network Complexity: Environments with VLANs, bonds, or complex network configurations may require custom script modifications
- OS Support Matrix: Template supports RHEL, CentOS, Ubuntu (NetworkManager, sysconfig, netplan); other distributions may require custom templates
- Failure Handling: Script failures will cause migration to fail; customers should have rollback procedures
Team Sign Off (Completion while in Planning status)
- All required Epics (known at the time) are linked to the this Feature
- All required Stories, Tasks (known at the time) for the most immediate Epics have been created and estimated
- Add - Reviewers name, Team Name
- Acceptance == Feature as “Ready” - well understood and scope is clear - Acceptance Criteria (scope) is elaborated, well defined, and understood
- Note: Only set FixVersion/s: on a Feature if the delivery team agrees they have the capacity and have committed that capability for that milestone
| Reviewed By | Team Name | Accepted | Notes |
- …