There was an error in requesting a session for a virtual machine via bastion.

2024-03-04T06:16:04.51+00:00

After configuring the bastion,. If I try to connect my VM , it says "There was an error in requesting a session for a virtual machine via bastion."

Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
242 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luis Arias 4,871 Reputation points
    2024-03-04T16:11:31.58+00:00

    Hello Mulagiripattu,

    You can make your troubleshoowith the below list:

    1. Check VM State: Ensure that your virtual machine (VM) is in the Running state. You can verify this in the Azure portal.
    2. VM Type: Is your VM a Windows VM or a Linux VM? Knowing this will help us narrow down the troubleshooting steps.
    3. Public IP Assignment: Assign a public IP to your VM if it doesn’t already have one. Also, make sure the Network Security Group (NSG) associated with the VM allows traffic from the Bastion subnet.
    4. Private IP Connectivity: Can you access the VM from another VM in the same subnet using its private IP? This will help us determine if the issue is specific to Bastion.
    5. Bastion Subnet IP Ranges: Ensure that you are allowing IP ranges from the Bastion subnet in the destination VM’s NSG. This step is crucial for Bastion to function correctly.
    6. Port Configuration: depends on VM OS you need to verify if there are the rights port configuration.
    7. Bastion Provisioning State: Verify that the Bastion resource is in a succeeded state. If it’s not, there might be provisioning issues.
    8. Network Connectivity: Sometimes, a network connectivity issue between your web browser and Azure Bastion can cause problems. Check if your client’s Internet firewall is blocking WebSockets traffic or similar.
    9. Azure Network Watcher: You can diagnose network connectivity issues to your VM using Azure Network Watcher. Navigate to the Connection Troubleshoot tab (in the Monitoring section) of your Azure Bastion resource in the Azure portal.

    If the issue persists, you can try using the Connection Troubleshoot feature in Azure Bastion to diagnose connectivity issues. To do this, navigate to the Connection Troubleshoot tab (in the Monitoring section) of your Azure Bastion resource in the Azure portal. Network Watcher Connection Troubleshoot provides the capability to check a direct TCP connection from a virtual machine (VM) to a VM, fully qualified domain name (FQDN), URI, or IPv4 address. To start, choose a source to start the connection from, and the destination you wish to connect to and select "Check". For more information, see Troubleshoot Azure Bastion.


    References:

    Let me know if this information help you to address your question.

    Luis

    0 comments No comments