From 5122935caa87631138cf629caad7421221805476 Mon Sep 17 00:00:00 2001 From: tcude Date: Wed, 17 Jan 2024 20:20:23 -0600 Subject: [PATCH] added checks for jq and ovftool --- vmware_to_proxmox.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vmware_to_proxmox.sh b/vmware_to_proxmox.sh index 4896599..bb92324 100644 --- a/vmware_to_proxmox.sh +++ b/vmware_to_proxmox.sh @@ -5,6 +5,18 @@ get_input() { echo $input } +# Check if ovftool is installed +if ! ovftool --version &> /dev/null; then + echo "Error: ovftool is not installed or not found in PATH. Please install ovftool and try again." + exit 1 +fi + +# Check if jq is installed +if ! jq --version &> /dev/null; then + echo "Error: jq is not installed or not found in PATH. Please install jq and try again." + exit 1 +fi + # User inputs echo "Enter the details for VM migration" ESXI_SERVER=$(get_input "Enter the ESXi server hostname/IP")