How to RDP to VM without network card or agent

AZMigrator 0 Reputation points
2025-03-06T22:19:34.9733333+00:00

I have a newly migrated VM that appears to not connect to the network based on the boot diagnostics image. I have reapplied and redeployed the VM several times, I have reset the NIC, I have attempted to use a Bastion and cannot get connected via RDP. The VM Agent is in a failed state so I cannot run scripts and cannot connect to the serial console.

BootScreen-NoNIC

PortCheck1

VMAgentError

Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
842 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mars Shan-MSFT 235 Reputation points Microsoft External Staff
    2025-03-07T02:07:54.8566667+00:00

    Hello,

    Below are some potential steps and workarounds you can try .

    1. Verify Azure-side configuration

     • Check that the VM actually has a network interface bound to it. In the Azure Portal go to your VM’s Networking blade. Sometimes, during migrations the NIC may become detached or misconfigured.

     • Confirm that your Network Security Group (NSG) rules allow inbound RDP (TCP port 3389) and that any Azure Firewall or route tables aren’t inadvertently blocking connectivity.

    1. Confirm the OS is really “network-less”

     • Look at the boot diagnostics screenshot. If you see no IP address or the expected network driver isn’t initializing, that can indicate an issue at the OS level (for example, missing or corrupt network drivers or misconfigured network settings).

     • Verify that the OS boot log matches your expectations—sometimes a drift in driver versions or a bug during migration can prevent the OS from loading the NIC.

    1. Use redeployment to force a fresh allocation

     • Although you mentioned you’ve redeployed the VM, sometimes “Redeploy” (which moves the VM to new hardware) combined with a NIC reset may resolve issues that appear at the host level. Double-check that after redeployment the NIC is still correctly attached.

    1. Repair via disk attach to a “rescue” VM

    When the VM Agent is in a failed state and you cannot use the Serial Console or Run Command, you can detach the OS disk and attach it to a working Windows VM (a “rescue” or “repair” VM) as a data disk. Once attached, you can:

     • Mount the disk and inspect Windows’ Event Logs and registry settings related to networking.

     • Check Device Manager (offline using tools like RegEdt32 or a third‑party offline registry editor) for any missing or misconfigured NIC drivers.

     • Look for firewall misconfigurations that might have disabled RDP or the network adapter.

    After making corrections (for example, updating/copying a known good driver or fixing registry settings), detach the disk and reattach it as the OS disk of the original VM.

    1. Rebuild the VM if necessary

    If offline repair doesn’t work—or if you suspect that many operating system settings are in error—it might be easier to create a new VM using the same disks (by capturing an image) so that you can “reimage” a known good baseline. This is especially attractive once the root cause is identified and you want to avoid further downtime.

    1. Long‑term, consider re‑enabling the VM agent

    The Azure VM Agent not only provides the ability to run scripts via Run Command but also supports the Serial Console. Once you get the NIC working, plan to install or repair the VM Agent to avoid future troubleshooting difficulties.

    In summary, without a functioning NIC or VM Agent you’re unable to directly run RDP or remote commands. The most viable workaround in this situation is to perform offline troubleshooting by detaching the OS disk and attaching it to a healthy VM so you can diagnose and repair the OS-level networking issues. Once the OS recognizes the NIC and its drivers load correctly, you should be able to reattach the disk back, reinitialize the VM, and then re-enable RDP.


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

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