Method: VagrantLXD::Driver#suspend

Defined in:
lib/vagrant-lxd/driver.rb

#suspendObject



333
334
335
336
337
338
339
340
# File 'lib/vagrant-lxd/driver.rb', line 333

def suspend
  if in_state? :running
    lxd.freeze_container(machine_id, timeout: timeout)
  end
rescue Hyperkit::BadRequest
  @machine.ui.warn "Container failed to suspend within #{timeout} seconds"
  fail OperationTimeout, time_limit: timeout, operation: 'info', machine_id: machine_id
end