B #5533: check VM state in SSH command (#1445)

This commit is contained in:
Alejandro Huertas Herrero authored and GitHub committed 2021-09-09 13:57:48 +02:00
1 parent 195324a68e
commit 0174dc3930
1 file changed
+5
+5
View File
@@ -1565,6 +1565,11 @@ CommandParser::CmdParser.new(ARGV) do
exit(-1)
end
if vm.lcm_state_str != 'RUNNING'
STDERR.puts 'VM is not RUNNING, cannot SSH to it'
exit(-1)
end
# Get user to login
args[1].nil? ? login = 'root' : login = args[1]