docs: def start(name=None, id=None, bootpath=None, disk=None, disks=None, local_iface=False,
            memory=None, nics=0, switch=None):
      '''
      Starts a VM defined by the specified parameters.
      When both a name and id are provided, the id is ignored.
  
      name:
          Name of the defined VM.
  
      id:
          VM id.
  
      bootpath:
          Path to a kernel or BIOS image to load.
  
      disk:
          Path to a single disk to use.
  
      disks:
          List of multiple disks to use.
  
      local_iface:
          Whether to add a local network interface. See "LOCAL INTERFACES"
          in the vmctl(8) manual page for more information.
  
      memory:
          Memory size of the VM specified in megabytes.
  
      switch:
          Add a network interface that is attached to the specified
          virtual switch on the host.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' vmctl.start 2   # start VM with id 2
          salt '*' vmctl.start name=web1 bootpath='/bsd.rd' nics=2 memory=512M disk='/disk.img'
      '''
      ret = {'changes': False, 'console': None}
      cmd = ['vmctl', 'start']
  
      if not (name or id):
          raise SaltInvocationError('Must provide either "name" or "id"')
      elif name:
          cmd.append(name)
      else:
          cmd.append(id)
          name = _id_to_name(id)
  
      if nics > 0:
          cmd.append('-i {0}'.format(nics))
  
      # Paths cannot be appended as otherwise the inserted whitespace is treated by
      # vmctl as being part of the path.
      if bootpath:
          cmd.extend(['-b', bootpath])
  
      if memory:
          cmd.append('-m {0}'.format(memory))
  
      if switch:
          cmd.append('-n {0}'.format(switch))
  
      if local_iface:
          cmd.append('-L')
  
      if disk and disks:
          raise SaltInvocationError('Must provide either "disks" or "disk"')
  
      if disk:
          cmd.extend(['-d', disk])
  
      if disks:
          cmd.extend(['-d', x] for x in disks)
  
      # Before attempting to define a new VM, make sure it doesn't already exist.
      # Otherwise return to indicate nothing was changed.
      if len(cmd) > 3:
          vmstate = status(name)
          if vmstate:
              ret['comment'] = 'VM already exists and cannot be redefined'
              return ret
  
      result = __salt__['cmd.run_all'](cmd,
                                       output_loglevel='trace',
                                       python_shell=False)
  
      if result['retcode'] == 0:
          ret['changes'] = True
          m = re.match(r'.*successfully, tty (\/dev.*)', result['stderr'])
          if m:
              ret['console'] = m.groups()[0]
          else:
              m = re.match(r'.*Operation already in progress$', result['stderr'])
              if m:
                  ret['changes'] = False
      else:
          raise CommandExecutionError(
              'Problem encountered running vmctl',
              info={'errors': [result['stderr']], 'changes': ret}
          )
  
      return ret