diff --git a/deploy_vm.sh b/deploy_vm.sh index 53cbf31..86de2bc 100755 --- a/deploy_vm.sh +++ b/deploy_vm.sh @@ -447,7 +447,7 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then echo "INFO : Add new PV to default VG... (vgextend /dev/vda4)" - ssh ${SSH_OPT} ${SSH_HOST} 'vgextend $(vgs | awk "/vg/ {print $1}") /dev/vda4' &> /dev/null + ssh ${SSH_OPT} ${SSH_HOST} 'vgextend $(vgs | grep vg | tr -s " " | cut -d" " -f2) /dev/vda4' &> /dev/null if [ $? -ne 0 ]; then echo 'ERROR : problem during add new PV in VG, please finish manually the deploy OR delete VM and IPAM information'