def vb_start_vm(name=None, timeout=10000, **kwargs):
 start_time = time.time()
 timeout_in_seconds = (timeout / 1000)
 max_time = (start_time + timeout_in_seconds)
 vbox = vb_get_box()
 machine = vbox.findMachine(name)
 session = _virtualboxManager.getSessionObject(vbox)
 log.info('Starting machine %s in state %s', name, vb_machinestate_to_str(machine.state))
 try:
  args = (machine, session)
  progress = wait_for(_start_machine, timeout=timeout_in_seconds, func_args=args)
  if (not progress):
   progress = machine.launchVMProcess(session, '', '')
  time_left = (max_time - time.time())
  progress.waitForCompletion((time_left * 1000))
 finally:
  _virtualboxManager.closeMachineSession(session)
 time_left = (max_time - time.time())
 vb_wait_for_session_state(session, timeout=time_left)
 log.info('Started machine %s', name)
 return vb_xpcom_to_attribute_dict(machine, 'IMachine')

def vb_start_vm ( name = None , timeout = 10000 , ** kwargs ) : start_time = time . time ( ) timeout_in_seconds = ( timeout / 1000 ) max_time = ( start_time + timeout_in_seconds ) vbox = vb_get_box ( ) machine = vbox . findMachine ( name ) session = _virtualboxManager . getSessionObject ( vbox ) log . info ( 'Starting machine %s in state %s' , name , vb_machinestate_to_str ( machine . state ) ) try : args = ( machine , session ) progress = wait_for ( _start_machine , timeout = timeout_in_seconds , func_args = args ) if ( not progress ) : progress = machine . launchVMProcess ( session , '' , '' ) time_left = ( max_time - time . time ( ) ) progress . waitForCompletion ( ( time_left * 1000 ) ) finally : _virtualboxManager . closeMachineSession ( session ) time_left = ( max_time - time . time ( ) ) vb_wait_for_session_state ( session , timeout = time_left ) log . info ( 'Started machine %s' , name ) return vb_xpcom_to_attribute_dict ( machine , 'IMachine' )
tells virtualbox to start up a vm .