Share via

Cannot connect local machine Visual Studio code to the Azure Virtual machine

Babak V 0 Reputation points
2024-08-08T18:12:10.52+00:00

Hi everyone,

I cloned an Azure VM (let's call it "main") using Disk and snapshot to create a new VM (let's call it "developer") to use as a developer VM. I used the same key pair for both of them.

I can connect to the "main" VM through "Visual Studio Code" installed on my local machine by right-clicking on the VM name in VSC and selecting "Connect to Host via Remote SSH." However, I don't have this option when I right-click on the "developer" VM name in my VSC. I have attached a screenshot showing what appears when I right-click on the "developer" VM name in my VSC.

I also tried "Remote-SSH: Add New SSH Host..." in VSC but got pop-up error "Only Linux VMs are supported". I clone a Linux-based VM to build the "developer" VM, so I don't know why I got this error.

I really appreciate your advice.

Thanks,

Community Center | Not monitored
0 comments No comments

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.