code: function(vmname, callback) {
      function getOSTypeCallback(error, stdout, stderr) {
        if (error) {
          throw error;
        }
  
        // The ostype is matched against the ID attribute of 'vboxmanage list ostypes'
        if (stdout.indexOf('ostype="Windows') !== -1) {
          guestproperty.os_type = known_OS_types.WINDOWS;
        } else if (stdout.indexOf('ostype="MacOS') !== -1) {
          guestproperty.os_type = known_OS_types.MAC;
        } else {
          guestproperty.os_type = known_OS_types.LINUX;
        }
        logging.debug('Detected guest OS as: ' + guestproperty.os_type);
        callback(guestproperty.os_type);
      }
  
      if (guestproperty.os_type) {
        return callback(guestproperty.os_type);
      }
  
      try {
        exec(vBoxManageBinary + 'showvminfo -machinereadable "' + vmname + '"', getOSTypeCallback);
      } catch (e) {
        logging.info('Could not showvminfo for %s', vmname);
      }
    }
docs: cached