File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ launch_vm() {
622
622
vm_extra_args+=" inst.ks=file:/$( basename " ${kickstart_file} " ) "
623
623
vm_initrd_inject+=" --initrd-inject ${kickstart_file} "
624
624
# Download and inject all the kickstart include files
625
- wget -r -q -nd -A " *.cfg" -P " ${kickstart_idir} " " $( dirname " ${kickstart_url} " ) "
625
+ wget -r -q -nd -A " *.cfg" -P " ${kickstart_idir} " " $( dirname " ${kickstart_url} " ) / "
626
626
for cfg_file in " ${kickstart_idir} " /* .cfg ; do
627
627
vm_initrd_inject+=" --initrd-inject ${cfg_file} "
628
628
done
@@ -1076,10 +1076,15 @@ action_login() {
1076
1076
vmname=" $1 "
1077
1077
fi
1078
1078
1079
- ssh_port=$( get_vm_property " ${vmname} " " ssh_port" )
1079
+ ssh_port=$( get_vm_property " ${vmname} " " ssh_port" || true )
1080
1080
ip=$( get_vm_property " ${vmname} " " ip" )
1081
1081
1082
- ssh " redhat@${ip} " -p " ${ssh_port} "
1082
+ if [ -z " ${ssh_port} " ] ; then
1083
+ local -r full_vmname=" $( full_vm_name " ${vmname} " ) "
1084
+ sudo virsh console " ${full_vmname} "
1085
+ else
1086
+ ssh " redhat@${ip} " -p " ${ssh_port} "
1087
+ fi
1083
1088
}
1084
1089
1085
1090
action_run () {
You can’t perform that action at this time.
0 commit comments