abort vsh rework

Signed-off-by: Ava Hahn <a.hahn@f5.com>
This commit is contained in:
Ava Hahn 2025-01-21 15:03:43 -08:00
parent b47476bd69
commit 1ed551b70b
2 changed files with 15 additions and 36 deletions

15
virt.sh
View file

@ -157,3 +157,18 @@ function vm_cmd() {
-o StrictHostKeyChecking=no \
$USERN@$(get_vm_ip $1) "$2"
}
function vsh() {
# takes care of error cases
if ! turn_on_vm_and_wait $1; then
exit 1
fi
get_vm_ip $1
sshpass -p $PASSP \
ssh -o PreferredAuthentications=password \
-o StrictHostKeyChecking=no \
$USERN@$ret
turn_off_vm $1
}