code: def restart(name, runas=None):
      '''
      Restart a VM by gracefully shutting it down and then restarting
      it
  
      :param str name:
          Name/ID of VM to restart
  
      :param str runas:
          The user that the prlctl command will be run as
  
      Example:
  
      .. code-block:: bash
  
          salt '*' parallels.restart macvm runas=macdev
      '''
      return prlctl('restart', salt.utils.data.decode(name), runas=runasf restart(name, runas=None):
      '''
      Restart a VM by gracefully shutting it down and then restarting
      it
  
      :param str name:
          Name/ID of VM to restart
  
      :param str runas:
          The user that the prlctl command will be run as
  
      Example:
  
      .. code-block:: bash
  
          salt '*' parallels.restart macvm runas=macdev
      '''
      return prlctl('restart', salt.utils.data.decode(name), runas=runas)
docs: Restart a VM by gracefully shutting it down and then restarting
      it
  
      :param str name:
          Name/ID of VM to restart
  
      :param str runas:
          The user that the prlctl command will be run as
  
      Example:
  
      .. code-block:: bash
  
          salt '*' parallels.restart macvm runas=macdev