How to Upgrade virt-v2v to Version 2.7.1 in SynetoOS 6

Written By Sebastian Sime (Administrator)

Updated at April 13th, 2026

→ Applies to: SynetoOS 6.x

virt-v2v converts virtual machines across hypervisor boundaries — transforming both disk images and platform-specific configurations (e.g., from VMware to KVM) so they boot and run without manual intervention. The script below automates a safe, pre-checked upgrade of virt-v2v and its dependencies: it fetches the appropriate Rocky Linux 9 RPMs, validates the operation via dry-run, and installs only if the system is idle from active conversions.

 

Step 1. Connect to SynetoOS appliance via SSH as admin

ssh admin@<your_ip_address_or_hostname>

 

Step 2. Get root privileges

sudo su -

 

Step 3. Edit /tmp/upgrade-virt-v2v.sh file

vi /tmp/upgrade-virt-v2v.sh

IMPORTANT
Make sure to copy and paste the exact lines below

#!/bin/bash
set -euo pipefail
WORK_DIR="/tmp/virt-v2v-upgrade"
BASE_URL="https://dl.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/Packages"
TARGET_VIRT_V2V="2.7.1-19.el9_7"
TARGET_LIBGUESTFS="1.54.0-11.el9"
TARGET_GUESTFS_TOOLS="1.52.2-6.el9"
RPMS=(
    "$BASE_URL/v/virt-v2v-${TARGET_VIRT_V2V}.x86_64.rpm"
    "$BASE_URL/v/virt-v2v-bash-completion-${TARGET_VIRT_V2V}.noarch.rpm"
    "$BASE_URL/l/libguestfs-${TARGET_LIBGUESTFS}.x86_64.rpm"
    "$BASE_URL/l/libguestfs-appliance-${TARGET_LIBGUESTFS}.x86_64.rpm"
    "$BASE_URL/l/libguestfs-xfs-${TARGET_LIBGUESTFS}.x86_64.rpm"
    "$BASE_URL/g/guestfs-tools-${TARGET_GUESTFS_TOOLS}.x86_64.rpm"
    "$BASE_URL/p/perl-Sys-Guestfs-${TARGET_LIBGUESTFS}.x86_64.rpm"
)
log() { echo "==> $*"; }
err() { echo "ERROR: $*" >&2; exit 1; }
# --- Pre-flight checks ---
[[ "$(id -u)" -eq 0 ]] || err "Must run as root"
if pgrep -x virt-v2v > /dev/null; then
    err "virt-v2v is currently running — abort upgrade"
fi
current=$(rpm -q --qf '%{VERSION}-%{RELEASE}' virt-v2v 2>/dev/null) || err "virt-v2v is not installed"
log "Current virt-v2v: $current"
if [[ "$current" == "$TARGET_VIRT_V2V" ]]; then
    log "Already at target version $TARGET_VIRT_V2V — nothing to do"
    exit 0
fi
# --- Download RPMs ---
log "Downloading RPMs to $WORK_DIR"
mkdir -p "$WORK_DIR"
for url in "${RPMS[@]}"; do
    filename="${url##*/}"
    if [[ -f "$WORK_DIR/$filename" ]]; then
        log "Already downloaded: $filename"
    else
        log "Downloading: $filename"
        curl -fSL -o "$WORK_DIR/$filename" "$url" || err "Failed to download $filename"
    fi
done
# --- Dry-run ---
log "Running dry-run"
dnf upgrade --assumeno "$WORK_DIR"/*.rpm 2>&1 || true
echo
read -r -p "==> Proceed with upgrade? [y/N] " answer
[[ "$answer" =~ ^[Yy]$ ]] || { log "Aborted by user"; exit 1; }
# --- Upgrade ---
log "Applying upgrade"
dnf install -y "$WORK_DIR"/*.rpm || err "Upgrade failed"
# --- Verify ---
log "Verifying installation"
echo "---"
rpm -q virt-v2v libguestfs libguestfs-appliance libguestfs-xfs guestfs-tools perl-Sys-Guestfs
echo "---"
virt-v2v --version
new=$(rpm -q --qf '%{VERSION}-%{RELEASE}' virt-v2v)
if [[ "$new" == "$TARGET_VIRT_V2V" ]]; then
    log "Upgrade successful: virt-v2v $new"
else
    err "Version mismatch after upgrade: expected $TARGET_VIRT_V2V, got $new"
fi
# --- Cleanup ---
log "Cleaning up $WORK_DIR"
rm -rf "$WORK_DIR"
log "Done"

Save and EXIT

:wq

 

Step 4. Give permissions to /tmp/upgrade-virt-v2v.sh file

chmod +x /tmp/upgrade-virt-v2v.sh

 

Step 5. Run the script

/tmp/upgrade-virt-v2v.sh

Before proceeding, verify that no VM conversion jobs are currently running.

 

Step 6. Check version

virt-v2v --version

EXAMPLE OUTPUT

virt-v2v 2.7.1rhel=9,release=19.el9_7

 

Step 7.  Verify all packages upgraded successfully

rpm -q virt-v2v libguestfs libguestfs-appliance libguestfs-xfs guestfs-tools perl-Sys-Guestfs

EXAMPLE OUTPUT

guestfs-tools perl-Sys-Guestfs
virt-v2v-2.7.1-19.el9_7.x86_64
libguestfs-1.54.0-11.el9.x86_64
libguestfs-appliance-1.54.0-11.el9.x86_64
libguestfs-xfs-1.54.0-11.el9.x86_64
guestfs-tools-1.52.2-6.el9.x86_64
perl-Sys-Guestfs-1.54.0-11.el9.x86_64