Un-retiring a VM or instance


#1

Is it possible to un-retire a VM or instance once it’s been marked as such?


#2

Depends a little bit on your retirement code, but the short answer is yes.

Something like:

unless vm.nil?
    if vm.retired
      vm.retires_on = nil
      log(:info, "Unretiring vm:#{vm.name}")
      vm.start
    else
      exit MIQ_ABORT
    end
end

Should do it.


#3

I typically will just change the retirement date to something in the future. Machine then becomes un-retired.