Skip to content

Conversation

@hholoubk
Copy link
Contributor

Add optional destination VM backup/cleanup functionality to MigrationBase:

  • New parameter 'do_destination_vm_backup' (default: no) to enable feature
  • Accept optional remote_virsh session for destination host operations
  • Check if VM exists on destination before migration
  • Fail test if destination VM is running (blocker condition)
  • Backup and undefine pre-existing stopped VMs to avoid conflicts
  • Use comprehensive undefine options (--nvram, --managed-save, etc.)
  • Restore destination VM in cleanup_default()

Update migration_iommu_device test:

  • Add setup_remote_virsh_session() helper function
  • Create single remote virsh session shared across test operations
  • Refactor check_iommu_xml() to reuse remote session (no duplication)
  • Add cleanup_default() call in finally block
  • Properly close remote session in finally block

This allows migration tests to run on non-clean environments without depending on destination host state.

AI assisted code and commit. Human reviewed.

Add optional destination VM backup/cleanup functionality to MigrationBase:
- New parameter 'do_destination_vm_backup' (default: no) to enable feature
- Accept optional remote_virsh session for destination host operations
- Check if VM exists on destination before migration
- Fail test if destination VM is running (blocker condition)
- Backup and undefine pre-existing stopped VMs to avoid conflicts
- Use comprehensive undefine options (--nvram, --managed-save, etc.)
- Restore destination VM in cleanup_default()

Update migration_iommu_device test:
- Add setup_remote_virsh_session() helper function
- Create single remote virsh session shared across test operations
- Refactor check_iommu_xml() to reuse remote session (no duplication)
- Add cleanup_default() call in finally block
- Properly close remote session in finally block

This allows migration tests to run on non-clean environments without
depending on destination host state.

AI assisted code and commit. Human reviewed.

Signed-off-by: hholoubk <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Successfully merging this pull request may close these issues.

1 participant