================================================================================
  NUTANIX MOVE LINUX SCRIPTS COMPARISON: v6.0.0 vs v6.1.2 (ESX ONLY)
  Generated: February 23, 2026
  Source 6.0.0: Move appliance 192.168.66.59
  Source 6.1.2: Move appliance 192.168.66.65
================================================================================


================================================================================
  1. FILES INVENTORY
================================================================================

  6.0.0 FILES                                    6.1.2 FILES
  ----------                                     ----------
  esx_setup_uvm.sh             (10.6KB)          esx_setup_uvm.sh             (30.1KB)
  (does not exist)                               validate_prep_state.sh        (1.3KB)  ** NEW **

  scripts\nutanix_move.sh      (26.8KB)          scripts\nutanix_move.sh      (26.8KB)
  scripts\retainIP.sh          (30.1KB)          scripts\retainIP.sh          (30.1KB)
  scripts\uninstallVMwareTools.sh (2.0KB)         scripts\uninstallVMwareTools.sh (2.0KB)
  scripts\install_ngt.sh       (3.7KB)           scripts\install_ngt.sh       (3.7KB)
  scripts\reconfig_fstab.sh    (3.9KB)           scripts\reconfig_fstab.sh    (3.9KB)
  scripts\configureTempDisk.sh (4.1KB)           scripts\configureTempDisk.sh (4.1KB)
  scripts\configedit           (24.4MB)          scripts\configedit           (25.0MB)

  uninstall_scripts\cleanup_installation.sh      uninstall_scripts\cleanup_installation.sh

  virtio_scripts\installAMD.sh                   virtio_scripts\installAMD.sh
  virtio_scripts\isAMDInstalled.sh               virtio_scripts\isAMDInstalled.sh
  virtio_scripts\installAMD_freebsd.sh           virtio_scripts\installAMD_freebsd.sh


================================================================================
  2. FILE-BY-FILE COMPARISON SUMMARY
================================================================================

  FILE                                     STATUS         DELTA
  ----                                     ------         -----
  esx_setup_uvm.sh                         MAJOR REWRITE  +513 lines (324 -> 837)
  validate_prep_state.sh                   NEW IN 6.1.2   1,299 bytes
  scripts\nutanix_move.sh                  VERSION ONLY   version string 6.0.0 -> 6.1.2
  scripts\retainIP.sh                      VERSION ONLY   version string 6.0.0 -> 6.1.2
  scripts\uninstallVMwareTools.sh          VERSION ONLY   version string 6.0.0 -> 6.1.2
  scripts\install_ngt.sh                   MINOR CHANGE   version string + 1 small fix
  scripts\reconfig_fstab.sh                IDENTICAL      no changes
  scripts\configureTempDisk.sh             VERSION ONLY   version string 6.0.0 -> 6.1.2
  scripts\configedit                       DIFFERENT      24.4MB -> 25.0MB (updated binary)
  uninstall_scripts\cleanup_installation.sh  MINOR CHANGE version string + RedHat fix
  virtio_scripts\installAMD.sh             IDENTICAL      no changes
  virtio_scripts\isAMDInstalled.sh         IDENTICAL      no changes
  virtio_scripts\installAMD_freebsd.sh     IDENTICAL      no changes


================================================================================
  3. DETAILED CHANGES
================================================================================

--------------------------------------------------------------------------------
  3.1  esx_setup_uvm.sh  (MAJOR REWRITE - 324 lines -> 837 lines)
--------------------------------------------------------------------------------

  This is BY FAR the biggest change between versions. The script was nearly
  tripled in size. Here is what changed:

  FUNCTIONS IN 6.0.0 (9 functions):
    write_log()
    do_prerequisite_dirs()
    _curl_check()
    download_artifacts()
    install_virtio_drivers()
    reconfig_fstab()
    schedule_move_service()
    error_check()
    main()

  FUNCTIONS IN 6.1.2 (22 functions):
    write_log()
    initialize_prep_state()          ** NEW **
    update_prep_state()              ** NEW **
    update_overall_state()           ** NEW **
    show_prep_state()                ** NEW **
    cleanup_prep_state_on_exit()     ** NEW **
    calculate_total_steps()          ** NEW **
    step_start()                     ** NEW **
    step_done()                      ** NEW **
    step_fail()                      ** NEW **
    substep_start()                  ** NEW **
    substep_done()                   ** NEW **
    substep_fail()                   ** NEW **
    do_prerequisite_dirs()
    run_cleanup_if_exists()          ** NEW **
    check_curl_or_wget()             ** NEW ** (replaces _curl_check)
    smart_download()                 ** NEW **
    download_artifacts()
    install_virtio_drivers()
    reconfig_fstab()
    schedule_move_service()
    error_check()
    main()

  A) NEW: Preparation State Tracking System
     - Writes to /opt/Nutanix/prep_state (text file)
     - Tracks each step: NotStarted -> InProgress -> Done/Failed/Interrupted
     - On script crash/exit, any "InProgress" steps become "Interrupted"
     - At the end, prints a colored summary of all steps
     - Allows you to see exactly where preparation stopped if it fails

  B) NEW: Step Progress UI (colored console output)
     - Shows [STEP-1/7] Starting... [OK-1/7] Completed in colors
     - Sub-steps shown as [SUB] Starting... [SUB-OK] Completed
     - Green = success, Red = failure, Yellow = in-progress, Cyan = sub-step
     - Much better visibility vs 6.0.0 which only had basic log messages

  C) NEW: Cleanup-Before-Prep Pattern
     - run_cleanup_if_exists() downloads and runs cleanup_installation.sh
       BEFORE starting preparation
     - Makes the script safely re-runnable (idempotent)
     - 6.0.0 had no automatic cleanup before re-runs

  D) NEW: curl/wget Auto-Detection (replaces _curl_check)
     - 6.0.0: _curl_check() only checked if curl exists, failed if not found
     - 6.1.2: check_curl_or_wget() tests curl first, falls back to wget
     - smart_download() function wraps the chosen tool for all downloads
     - This fixes issues on distros that ship with wget but not curl
       (e.g., some minimal SUSE/RHEL installations)

  E) IMPROVED: download_artifacts()
     - 6.0.0: Used raw curl commands directly
     - 6.1.2: Uses smart_download() which works with both curl and wget
     - Each download has sub-step tracking (SUB-OK / SUB-ERROR)
     - Downloads validate_prep_state.sh (new file) at the end

  F) IMPROVED: install_virtio_drivers()
     - 6.1.2 adds sub-step tracking for each phase:
       1. Check if already installed
       2. Install if needed
       3. Verify installation
     - Better error messages with prep_state updates

  G) IMPROVED: schedule_move_service()
     - 6.1.2 adds sub-step tracking for:
       1. Downloading nutanix_move.sh
       2. Configuring arguments
       3. Executing the setup
     - Same core logic as 6.0.0

  H) IMPROVED: main()
     - 6.0.0: 34 lines, simple sequential calls
     - 6.1.2: 70 lines, wrapped with step tracking, prep state init,
       final state summary display

  PARAMETERS: IDENTICAL between versions (same flags):
    --move-address, --retain-ip, --install-amd, --reconfig-lvm,
    --uninstall-vmware-tools, --reconfig-fstab, --install-ngt

  DIRECTORY STRUCTURE: IDENTICAL between versions:
    NXBASE_DIR = /opt/Nutanix
    All sub-paths derived the same way


--------------------------------------------------------------------------------
  3.2  validate_prep_state.sh  (NEW IN 6.1.2)
--------------------------------------------------------------------------------

  - New 1.3KB script
  - Reads /opt/Nutanix/prep_state and validates all steps completed
  - Can be run after preparation to confirm everything is OK
  - Does not exist in 6.0.0


--------------------------------------------------------------------------------
  3.3  scripts\install_ngt.sh  (MINOR CHANGE)
--------------------------------------------------------------------------------

  - Version string: 6.0.0 -> 6.1.2
  - One logic fix: Changed "elif" to "if" for checking
    /mnt/installer/linux/install_ngt.sh
  - 6.0.0: elif [ -f "/mnt/installer/linux/install_ngt.sh" ]; then
  - 6.1.2: if [ -f "/mnt/installer/linux/install_ngt.sh" ]; then
  - This fixes a case where the NGT install path could be skipped


--------------------------------------------------------------------------------
  3.4  uninstall_scripts\cleanup_installation.sh  (MINOR CHANGE)
--------------------------------------------------------------------------------

  - Version string: 6.0.0 -> 6.1.2
  - Added RedHat release file detection:
    - NEW variable: OS_RELEASE_FILE_REDHAT="/etc/redhat-release"
    - Changed condition from:
        if [ ${last_status} -eq 0 ]; then
      to:
        if [ ${last_status} -eq 0 ] || [ -f ${OS_RELEASE_FILE_REDHAT} ]; then
  - This fixes cleanup on RedHat-based systems where /etc/os-release
    might not give the expected result but /etc/redhat-release exists


--------------------------------------------------------------------------------
  3.5  scripts\configedit  (BINARY - UPDATED)
--------------------------------------------------------------------------------

  - 6.0.0: 24.43 MB (MD5: DB30A6FFFF23BCF10D1554AF3E516E6F)
  - 6.1.2: 24.96 MB (MD5: 4B578290556B38921194079E58AB1A2B)
  - Updated binary, likely compiled against newer libraries


--------------------------------------------------------------------------------
  3.6  VERSION STRING ONLY (no functional changes)
--------------------------------------------------------------------------------

  - scripts\nutanix_move.sh        6.0.0 -> 6.1.2
  - scripts\retainIP.sh            6.0.0 -> 6.1.2
  - scripts\uninstallVMwareTools.sh 6.0.0 -> 6.1.2
  - scripts\configureTempDisk.sh   6.0.0 -> 6.1.2


--------------------------------------------------------------------------------
  3.7  IDENTICAL (no changes at all)
--------------------------------------------------------------------------------

  - scripts\reconfig_fstab.sh
  - virtio_scripts\installAMD.sh
  - virtio_scripts\isAMDInstalled.sh
  - virtio_scripts\installAMD_freebsd.sh


================================================================================
  4. LINUX DISTRO COMPATIBILITY
================================================================================

  Both versions support the same Linux distributions. The script itself does
  not check for specific distros - it relies on:

  - /bin/sh being available (POSIX shell)
  - curl or wget being available (6.1.2 supports both, 6.0.0 needs curl)
  - VirtIO driver support in the kernel

  COMMONLY MIGRATED DISTROS (all supported):
    - RHEL / CentOS 6.x, 7.x, 8.x, 9.x
    - Ubuntu 16.04, 18.04, 20.04, 22.04, 24.04
    - SUSE Linux Enterprise Server 12, 15
    - Debian 9, 10, 11, 12
    - Oracle Linux 7.x, 8.x, 9.x
    - Rocky Linux 8.x, 9.x
    - AlmaLinux 8.x, 9.x
    - FreeBSD (uses installAMD_freebsd.sh variant)

  IMPORTANT: The distro-specific logic is handled by the SUB-SCRIPTS
  (installAMD.sh, retainIP.sh, nutanix_move.sh, cleanup_installation.sh),
  NOT by esx_setup_uvm.sh itself. Since the sub-scripts are virtually
  identical between 6.0.0 and 6.1.2, distro compatibility is the same.


================================================================================
  5. WHAT TO LOOK OUT FOR
================================================================================

  5.1  THE GOOD NEWS
  ------------------

  Unlike the Windows scripts where there were significant changes to
  sub-scripts (UninstallVMwareTools, cleanup, NutanixMove.bat, RetainIP),
  the Linux sub-scripts are essentially IDENTICAL between 6.0.0 and 6.1.2.

  The ONLY meaningful change is in esx_setup_uvm.sh itself, and it is
  purely about OBSERVABILITY and ROBUSTNESS - not about migration logic.

  The actual migration work (VirtIO install, IP retention, VMware Tools
  removal, fstab reconfig, NGT install, Move service scheduling) is
  done by the sub-scripts, which haven't changed.

  5.2  REASONS TO USE 6.1.2
  -------------------------

  A) wget support: If your Linux VMs don't have curl installed (common on
     minimal SUSE/RHEL installs), 6.0.0 will FAIL. 6.1.2 falls back to wget.

  B) Prep state tracking: If preparation fails midway, 6.1.2 writes
     /opt/Nutanix/prep_state showing exactly which step failed. 6.0.0 only
     has the log file which is harder to parse.

  C) Re-runnability: 6.1.2 runs cleanup before preparation, so if you run
     it again after a failure it starts clean. 6.0.0 can have leftover
     artifacts from previous runs.

  D) Better console output: Colored step-by-step progress vs plain log lines.

  E) RedHat cleanup fix: cleanup_installation.sh in 6.1.2 handles RedHat
     distros better by checking /etc/redhat-release.

  F) NGT install fix: install_ngt.sh has a small logic fix for the NGT
     installer path detection.

  5.3  REASONS TO KEEP 6.0.0
  --------------------------

  Honestly, there are very few reasons:
  - If your current process works and you don't want to change anything
  - If you've heavily customized the 6.0.0 esx_setup_uvm.sh and don't
    want to re-apply changes to the much larger 6.1.2 version

  5.4  ITEMS TO WATCH
  -------------------

  A) If you are modifying esx_setup_uvm.sh for local execution (running
     from VM's local disk instead of downloading from Move appliance):
     - 6.1.2 is a MUCH larger script to modify (837 vs 324 lines)
     - The download_artifacts() function needs to be changed to copy from
       local paths instead of curl/wget from the Move IP
     - The run_cleanup_if_exists() function also downloads from the Move IP
       before anything else - needs to be handled locally

  B) The configedit binary is different between versions. If you're using
     nutanix_move.sh with --configedit-path, make sure to use the matching
     version of the binary.

  C) The prep_state file (6.1.2 only) is written to /opt/Nutanix/prep_state.
     If you're parsing logs or checking status programmatically, this is a
     much cleaner way to do it than grepping log files.


================================================================================
  6. RECOMMENDATION
================================================================================

  USE 6.1.2. The sub-scripts that do the actual work are identical, so there
  is zero migration risk. You get better observability, wget fallback,
  re-runnability, and the RedHat/NGT fixes for free.

  The only extra effort is if you're customizing esx_setup_uvm.sh for local
  execution - you'll need to work with a larger script, but the structure is
  cleaner and better organized.


================================================================================
  END OF LINUX COMPARISON DOCUMENT
================================================================================
