STOR=/rhev/data-center/mnt/glusterSD/n1.ovirt1.int:_vmstore01 PASS_VM=pass_vm.txt PASS_HOST=$(cat pass_host.txt) function CUSTOM_IMG(){ STOR=$1; ID=$2; PASS_HOST=$3; PASS_VM=$4; IMG=$(find $STOR -type f | grep $ID | grep -vE 'meta|lease') expect <<EOF set timeout 3 spawn virt-customize -a $IMG --root-password file:$PASS_VM --copy-in /oh-my-zsh:/ expect "Please enter your authentication name:" send "root\r" expect "Please enter your password:" send "$PASS_HOST\r" expect eof EOF echo $ID } function SYSPREP_IMG(){ STOR=$1; ID=$2; PASS_HOST=$3; IMG=$(find $STOR -type f | grep $ID | grep -vE 'meta|lease') expect <<EOF set timeout 3 virt-sysprep -a $IMG --operations defaults,-package-manager-cache,-ssh-userdir expect "Please enter your authentication name:" send "root\r" expect "Please enter your password:" send "$PASS_HOST\r" expect eof EOF echo $ID }
개요
내용 도구
앱