Skip to content

Instantly share code, notes, and snippets.

@karmab
Created February 25, 2015 16:02
Show Gist options
  • Save karmab/8dac5c545a325b9e106d to your computer and use it in GitHub Desktop.
Save karmab/8dac5c545a325b9e106d to your computer and use it in GitHub Desktop.
def start_vm(uuid)
vm = find_vm_by_uuid(uuid)
attributes = vm.attributes
puts "#{attributes.inspect}"
if attributes[:user_data].present?
vm.start_with_cloudinit(:blocking => true, :user_data => attributes[:user_data])
else
vm.start(:blocking => true)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment