mirror of
https://github.com/RGBCube/vmware-to-proxmox-migration-script
synced 2025-07-26 07:57:46 +00:00
added default esxi and proxmox usernames
This commit is contained in:
parent
041f3d5a60
commit
050a228e55
1 changed files with 7 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Function to get user input
|
# Function to get user input with a default value
|
||||||
get_input() {
|
get_input() {
|
||||||
read -p "$1: " input
|
read -p "$1 [$2]: " input
|
||||||
echo $input
|
echo ${input:-$2}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if ovftool is installed
|
# Check if ovftool is installed
|
||||||
|
@ -19,12 +19,12 @@ fi
|
||||||
|
|
||||||
# User inputs
|
# User inputs
|
||||||
echo "Enter the details for VM migration"
|
echo "Enter the details for VM migration"
|
||||||
ESXI_SERVER=$(get_input "Enter the ESXi server hostname/IP")
|
ESXI_SERVER=$(get_input "Enter the ESXi server hostname/IP" "default_esxi_server")
|
||||||
ESXI_USERNAME=$(get_input "Enter the ESXi server username")
|
ESXI_USERNAME=$(get_input "Enter the ESXi server username" "root")
|
||||||
read -sp "Enter the ESXi server password: " ESXI_PASSWORD
|
read -sp "Enter the ESXi server password: " ESXI_PASSWORD
|
||||||
echo
|
echo
|
||||||
PROXMOX_SERVER=$(get_input "Enter the Proxmox server hostname/IP")
|
PROXMOX_SERVER=$(get_input "Enter the Proxmox server hostname/IP" "default_proxmox_server")
|
||||||
PROXMOX_USERNAME=$(get_input "Enter the Proxmox server username")
|
PROXMOX_USERNAME=$(get_input "Enter the Proxmox server username" "root")
|
||||||
VM_NAME=$(get_input "Enter the name of the VM to migrate")
|
VM_NAME=$(get_input "Enter the name of the VM to migrate")
|
||||||
|
|
||||||
# Export VM from VMware
|
# Export VM from VMware
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue