running ubuntu cloud image in MS Azure - linux

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.

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.

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.

Related

Azure VM Migration Appliance for Hyper-V

Creating the topic cause I didn't find any info on this issue, followed strictly the Microsoft documentation below but it didn't work.
I need to migrate a couple of Hyper-V VMs to Azure for a Lab that I want to run some study and tests.
I tried to run the procedure described on the doc:
https://learn.microsoft.com/en-us/azure/migrate/tutorial-migrate-hyper-v
I proceed with all the steps with no problems, until the migration itself.
On the first time I ran the Azure Site Recovery Configurator, the process went ok with no errors.
It discovered the machines, but I did not start the replication. At that moment I needed to turn off the computer (Windows Server 2016, Hyper-V Host), so I would go back later to start the migration of the VMs.
On another day, when I start the replication of the VMs it got stuck on 1% and not proceeding.
After several hours stuck, I noticed that the VM Host on Infrastructure Servers page was in a "Not Connected" connection status.
According to the initial page of the application (webpage running on port 44368): Discovery agent, Assessment agent and management app are running.
I ran the PowerShell script that would prepare the host to make the migration (Enable Powershell, open WinRM ports, etc).
It's a home lab so I have no firewall and stuff, just a simple router.
On services, every Microsoft service is running except for RecoveryServicesManagementAgent, which stops immediately after I started it.
I tried to register again with Azure Site Recovery Configurator on the Hyper-V Host and I got the following error:
Registration was successful but setup failed to start Microsoft Azure Site Recovery Service on this machine. Please try starting the service manually.
I didn't find any info on this service and error, and it's not on services.MSC console as well.
I noticed that the server goes to a "Connected" state on Infrastructure Servers page for a while, but it stops again and returns to "Not Connected".
Also, I tried to stop the replication task on the single VM I tried to replicate and it's now stuck on "Disabling Protection" as well, probably because it cant reach the server as there is something wrong with the configuration of services running.
Another problem that I noticed is that my monthly credits are slowly decreasing (Free Trial) after I started this whole process.
Did anyone with a better understanding of this procedure can help me migrate the Hyper-V VMs o Azure or at least point to some direction?
The query needs a further deeper dive technically.
I recommend you to create a technical support ticket. The ticket enables you to work closely with the support engineers and get a quick resolution to your issue.
Here is the link https://learn.microsoft.com/en-in/azure/azure-supportability/how-to-create-azure-support-request to create support case.
please open a Support Ticket so the team can engage directly with you to resolve the issue.

Create virtual machines with Windows Azure php sdk

I am trying to figuring out how to create virtual machines with windows azure php sdk https://github.com/Azure/azure-sdk-for-php , I can't seem to understand on how to do this as there is any mention about virtual machines in the sdk.
Any help will be very apreciated.
Thanks
The Azure-SDK-for-PHP offers Service Management (see https://github.com/Azure/azure-sdk-for-php/blob/master/README.md) to spin up app services or VM’s. I’m not sure if it already includes support for managing Docker containers, but since it’s all REST API in the background, it should not take too much time to write a few lines to have it do the same thing. But for VM’s you can definitely manage them through the SDK.
If you need code samples, ping me. I’d love to share my knowledge.
I think azure-php-sdk is for using azure storage etc. it's not for creating VM.
Normally to create VM throught management portal and Windows azure powershell.

Azure deployment fails because service not found

I am currently trying to deploy a cloud service to Windows Azure but I get the following error message:
"Could not retrieve the list of cloud services.[...]"
Details can be seen on the picture.
It seems to me that VS couldn't find an existing service role in the subscription but my service is available and running, I just can not deploy a new version there.
A few days ago it worked correctly. Any Idea would be appreciated.
Thank you!
After hours of Certificate generation, messing with azure toolkit, etc. I figured out that the problem was that somehow my computer tried to resolve the azure DNS to localhost because Fiddler got crazy and the proxy that Fiddler uses, haven't stopped even after restarting my computer.
I faced same problem, when trying to deploy to azure while fiddler is running. Simply closing fiddler solve the problem.
Go to the previous screen, there will be an option of connecting to Azure using your credentials. Select your subscription and you will be able to download a file to your local machine. That file contains your subscription info as well as the keys. Once you open that file through this wizard, you will be able to publish to your services. You must create cloud services first before you do that.

Windows Azure Virtual Machine deleted after spending limit reached - How can I get it back?

As you can tell from the title, I set up a virtual machine on Azure and installed a website and database that my company is hosting for a client. The spending limit was not lifted, and after it was reached my VM was deleted.
Since that time I have lifted the spending limit, but I have no idea how to get the VM back, or if that is possible at all. What are the steps I need to take in order to get back to where it was? Is the database that was on this server gone for good? I spent hours getting this server up to date with updates and Web Platform Installer software. This would be rather cruel if everything is now lost.
Are you sure the VM was actually deleted, or was the deployment deleted? Check in the portal under the Virtual Machines tab. Look under the Disks section and see if you have a disk there that represents the server that was running.
If so, you should be able to create a new Virtual Machine instance by using the New button at the bottom of the portal. Click on the New button and select Compute > Virtual Machine > From Gallery. Then click on the My Disks under the popup screen. This will let you select the disk that represents the OS disk from your server.
You may also want to check to see if the Cloud Service container that was running the server was also deleted. When you create a Virtual Machine a Cloud service is created to act like a container for that machine instance. You can also add additional machines to that same container. Take a look under Cloud Services in the portal and see if one is there named like what you had setup for the virtual machine. If so, then you'll either have to delete this one so you can reuse the name, or you can user the PowerShell cmdlets to start the virtual machine and put it into the already existing cloud services container.
I had the same experience. Our Azure Virtual machine was gone, and I got really scared when it was also missing from the management portal. I solved it like this.
Remove the spending limit on the credit card from the Azure account portal.
Delete the cloudservice that had the same name as the VM. The cloud service was only an empty container now that the VM was gone.
It is easy to restore the missing VM by creating a new Virtual Machine. Choose to create a new VM from Gallery, and under the Gallery you can find your missing machines harddisk under "My disks".
Wait while the machine is restored, and then start it.
Now you have to manually recreate all network endpoints. That was a pain as I had quite a few different streaming servers installed.
I wish that Azure only stopped an virtual machine instead of silently removing it when the customer fails to pay. Especially because it is quite hard to understand which services are free, which services are free trials and which services that you must pay for.

Azure Virtual Machine error: Unable to Capture Image: "Endpoint Not found

I am getting the error as below in my Azure Virtual Machine when I save my vhd:-
Failed to capture image vmvhdtrialacc of virtual machine vmvhdalpha
Endpoint Not found: There was no endpoint listening at https://management.core.windows.net:8443/*GUID*/services/hostedservices/vmvhdalpha/deployments/vmvhdalpha/roleInstances/vmvhdalpha/Operations that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Any idea what could be wrong here?
Unfortunately your problem is a recently known issue with Windows Azure Virtual Machines, described as "still investigating status", in the following Windows Azure Virtual Machine Forums:
http://social.msdn.microsoft.com/Forums/en-US/WAVirtualMachinesforWindows/thread/29fc7e72-6c95-4704-bf79-b9aba562c6ad
My suggestion will be to submit your issues in the same forum and track the status of your problem in the above link.
Strangely enough I had a running VM, then added an SSL cert to a separate Cloud Service via the portal, and that seemed to doom my VM. It went into a stopped state, and when trying to start it received the error above. Only solution as mentioned in prior post's links, delete the VM (or delete the VM and clone new one from VHD).

Resources