0

I am trying to setup a custom Linux VM in MS Azure. I found a guide, pointing out that there are Azure-ready Ubuntu Images to be found here:

http://cloud-images.ubuntu.com/

What I did so far:

  • Downloaded the Trusty Tahr .vhd.zip file from their website.
  • Unpacked it and uploaded it to a BLOB Storage using Azure Managament Studio
  • Created a new Virtual Disk using the stored .vhd file
  • Created a VM that used the new Disk.

It seems to boot just fine, but when I try to SSH onto its public ip adress it gives me: "Server Unexptectedly closed connection".

If I create a Linux VM from the existing MS-Azure Templates everything works fine, so it doesn't seem to be a network problem on my end.

Anyone done this before? Are there steps that must be done PRIOR to uploading the image to azure?

I've never done this before so a verified step-by-step guide would be highly appriciated.

Thanks in advance!

Regards, Flo

UPDATE:

I updated my resource group with a security group, in which i defined an ssh-in rule. I then linked my VM's Nic to that Group. Heres the inbound rule:

ssh-in rule I am still getting a timeout when I try to connect via putty over ssh.

Ollowain
  • 1
  • 1
  • 3

2 Answers2

0

yes, there are some steps you should take - Linux-specific and Ubuntu-specific . Unexpected closed connection can be somehow services-related. You can take some steps from the Linux access troubleshooting guide.

You can take look at what is going on with the Linux boot using Boot Diagnostics and Console. That is the way i would recommend to do first, then try to upload manually.

Then, check if SSH is enabled - go to your VM => Settings => Network interfaces => click on the Network Security Group name => Inbound security rules. Create your 22 SSH rule.

Alex Belotserkovskiy
  • 4,012
  • 1
  • 13
  • 10
  • I activated the boot diagnostics and it I could see that system was indeed booted. The Question that I have is if i need to configure SSH specifically in the azure Portal OR in the VM. – Ollowain Apr 26 '16 at 12:55
  • Awesome that the VM is OK. You should check if you have SSH endpoint configured in the Endpoints menu with the port 22. – Alex Belotserkovskiy Apr 26 '16 at 12:57
  • I dont think there are endpoints in the new resource manager layout... I have a resource group containing the VM, a NIC, a public IP and a vitual network – Ollowain Apr 26 '16 at 13:23
  • Yep. Go to your VM => Settings => Network interfaces => click on the Network Security Group name => Inbound security rules. Create your 22 SSH rule. – Alex Belotserkovskiy Apr 27 '16 at 11:12
0

For anyone coming to this ticket in 2018 please not: you also need to connect the security group to the containing subnet in the security group. It's not enough to do it to the NIC.

Also, do NOT go through this complicated process. There are plenty of Ubuntu images you can use and quickly deploy in the marketplace right from the portal.

Aron T
  • 108
  • 6