Skip to content

Conversation

bruj0
Copy link

@bruj0 bruj0 commented May 8, 2025

This PR converts the existing Bash script deploy-virtual-machines.sh to a Python implementation with added functionality to control VM recreation.

Changes

  • Converted the entire Bash script to an equivalent Python implementation
  • Added a command-line parameter --no-recreate to disable recreating existing VMs
  • Maintained all original functionality including:
    • System compatibility checks
    • Memory-based VM specification adjustments
    • VM deployment and provisioning
    • Host entry configuration
    • Script transfers to VMs

Usage

The script can be run with:

# To recreate VMs (default behavior):
python3 deploy-virtual-machines.py

# To keep existing VMs (new functionality):
python3 deploy-virtual-machines.py --no-recreate

Benefits

  • Better structured code with functions and proper error handling
  • More robust parameter handling through argparse
  • Easier maintenance and future extension
  • Keeps existing VMs when desired, saving time during development

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