1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-26 10:03:37 +03:00

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

This commit is contained in:
Alejandro Huertas Herrero 2021-09-09 13:57:48 +02:00 committed by GitHub
parent 195324a68e
commit 0174dc3930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]