GCP exported VM is not working in Azure

Pravin Patil 0 Reputation points
2026-07-07T06:32:11.2666667+00:00

I am able to export VM from GCP and imported into Azure as managed disk, able to create VM as well. However after creating VM unable to do SSH.

Thanks

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Oldest
  1. AI answer

    2026-07-07T06:33:18.5766667+00:00

    Follow these steps to troubleshoot SSH to the Azure VM created from the GCP-exported disk:

    1. Verify the VM is healthy and running
      • In the Azure portal, open the VM and check Overview → Status.
      • Check Resource health to ensure the VM is reported as healthy and not in a failed state.
    2. Quick SSH recovery actions (try in this order, testing SSH after each):
      1. In the Azure portal, go to the VM → HelpReset password.
        • For Mode, first select Reset configuration only and click Update to rebuild the SSH configuration.
      2. If still failing, in the same blade choose Reset SSH public key or Reset password, specify the username and new key/password, then Update.
    3. Check NSG rules for SSH
      SSH failures after import are often due to NSG misconfiguration:
      • Go to the VM → Networking and review the Network security group on the NIC and subnet.
      • Ensure there is an inbound Allow rule for:
        • Protocol: TCP
        • Port: 22 (or the custom SSH port if the image uses a different one)
        • Source: your IP or appropriate range
      • Confirm there is no higher‑priority Deny rule that blocks SSH. For example, a DenyAll rule with lower priority number than the SSH allow rule will block it.
      • If NSGs are applied at both subnet and NIC levels, verify that both allow SSH. Use Effective security rules on the NIC to see the combined result.
    4. Confirm the correct SSH port
      Imported images may use a nonstandard SSH port:
      • If possible, use Azure VM Serial Console or Run Command to inspect /etc/ssh/sshd_config and check the Port directive.
      • If it is not 22, update the NSG inbound rule to allow that port and connect using ssh -p <port> ....
    5. Check routing and edge devices
      • If connecting over the Internet, ensure no on‑prem firewall, proxy, or IDS is blocking outbound SSH. If possible, test SSH from another VM in Azure that has direct Internet access.
      • Use Network Watcher → IP flow verify to confirm that traffic from your client IP to the VM on port 22 is allowed by NSG.
      • Use Network Watcher → Next hop to ensure there is no route misconfiguration preventing traffic from reaching the VM.
    6. If still unable to SSH
      • Use the Azure VM Serial Console or Run Command to:
        • Confirm the SSH service is running.
        • Fix any OS‑level SSH configuration issues.
      • If the VM remains unreachable after NSG, routing, and SSH configuration are corrected, consider redeploying the VM (keeping the managed disk) and re‑applying the above checks.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.