Troubleshoot issues with discovery client

This document shows you how to resolve issues with the discovery client.

Use logs to identify issues

The discovery client generates log files that you can use for debugging. Logs are stored locally on the machine where you installed the discovery client in the C:\ProgramData\Google\mcdc\logs folder.

Troubleshoot permissions and service accounts

If you experience issues with the authorization in connected mode, you might not have the permissions required to create a service account in your organization, or might lack the required roles to authorize the discovery client.

To resolve the issue, ask your organization administrator to create a service account for you, and to assign the roles/migrationcenter.discoveryClient role. Also, make sure that the Cloud Resource Manager API is enabled in the project.

If you have a newly created organization on Google Cloud, by default service account key creation is disabled. To enable service account key creation, make sure you have the Organization Policy Administrator role assigned, then follow these steps:

  1. In the Google Cloud console, go to IAM > Organization Policies.
  2. Click the policy named Disable service account key creation.
  3. Click Manage Policy.
  4. On the Edit policy page, in the Applies to section, select Customize.
  5. In the Rules section, expand Edit rule, then set Enforcement to Off.
  6. To finish, click Set Policy.

Troubleshoot installation issues

If you install or upgrade the discovery client, but you're not logged in as a local administrator, the MSI execution likely fails with the following error message:

Google Cloud Migration Center discovery client Setup Wizard ended prematurely
because of an error. Your system has not been modified. To install this program
at a later time, run Setup Wizard again. Click the Finish button to exit the
Setup Wizard.

To resolve the issue, right-click the MSI file and run it as an administrator.

In some cases, due to specific Windows versions or domain policies, the "Run as Administrator" option might be hidden. To resolve the issue, try the following workarounds:

  • Preferred method: Open PowerShell as an administrator, and run msiexec.exe /i mcdc.msi /L*V "C:\installer.log".

  • Alternative method: Edit the registry to show this option in the UI.

Troubleshoot SSH host key mismatch errors

The discovery client verifies target Linux SSH host keys using trust on first use. It records each target machine's SSH host key on first connection and rejects later connections if the key changes, logging an error similar to the following in C:\ProgramData\Google\mcdc\logs:

SSH host key verification failed for HOST:PORT (in "C:\Windows\System32\config\systemprofile\.ssh\known_hosts"; remove the stale entry with ssh-keygen -R if the host key legitimately changed): knownhosts: key mismatch

This error occurs when a target VM is rebuilt, reimaged, or reassigned to a different machine, or when an unauthorized machine intercepts the SSH connection. Before removing a stored key, confirm with your infrastructure administrator that the target VM's SSH host key legitimately changed.

Because the Windows GoogleMCDC service runs as the LocalSystem account, its known_hosts file is stored under C:\Windows\System32\config\systemprofile\.ssh\known_hosts rather than the signed-in user's %USERPROFILE%\.ssh\known_hosts.

To remove the stale host key entry after a legitimate VM rebuild, follow these steps:

  1. On the Windows machine hosting the discovery client, open PowerShell or Command Prompt using the Run as administrator option.
  2. Remove the stale host key entry from the LocalSystem known_hosts file:

    ssh-keygen -R HOST -f "C:\Windows\System32\config\systemprofile\.ssh\known_hosts"
    

    If you configured a non-default SSH port, pass "[HOST]:PORT" instead of HOST. If the error log shows a different known_hosts path, pass that path to -f instead.

    Replace the following:

    • HOST: the IP address or hostname of the target machine.
    • PORT: the custom SSH port configured for the target machine.
  3. In the discovery client application, click Test connection for the server, rerun the scan, or wait for the next scheduled collection, which records the new host key automatically.