diff --git a/src/cli/onevm b/src/cli/onevm index 1422cdecd3..0ffff221d9 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -398,19 +398,19 @@ cmd=CommandParser::CmdParser.new(ARGV) do end end - restart_desc = <<-EOT.unindent + boot_desc = <<-EOT.unindent Boots the given VM. States: UNKNOWN, BOOT, POWEROFF EOT - command :restart, restart_desc, [:range,:vmid_list], + command :boot, boot_desc, [:range,:vmid_list], :options => [OneVMHelper::SCHEDULE] do if (!options[:schedule].nil?) helper.schedule_actions(args[0], options, @comm_name) else - helper.perform_actions(args[0],options,"restarting") do |vm| - vm.restart + helper.perform_actions(args[0],options,"booting") do |vm| + vm.boot end end end diff --git a/src/oca/ruby/opennebula/virtual_machine.rb b/src/oca/ruby/opennebula/virtual_machine.rb index b83a23316a..f1e6f6043d 100644 --- a/src/oca/ruby/opennebula/virtual_machine.rb +++ b/src/oca/ruby/opennebula/virtual_machine.rb @@ -293,10 +293,12 @@ module OpenNebula end # Forces a re-deployment of a VM in UNKNOWN or BOOT state - def restart - action('restart') + def boot + action('boot') end + alias_method :restart, :boot + # Resubmits a VM to PENDING state def resubmit action('resubmit')