How to create Ubuntu Virtual Machine on Azure

de | august 20, 2023 | Technology

Create virtual machine

1. Search for virtual machines

2. Add – > Virtual machine

 

 

 

 

3. Subscription and Resource Group: If you find in the resource group the project for which you want to add a new server, select it as resource, otherwise create a new resource group with the name of the project for which you will create the server.

4. Virtual machine name: The name of your virtual machine should have the following format {projectName}_{environment}

5. Region: Select the region that is closest to the country for which the application is developed. Ex: For Romania we chose (Europe) Germany West Central

6. Image: use Ubuntu Server 18.04 LTS – Gen1

7. Size: Chose the server configuration that best fits your needs

8. Authentication type: Should be SSH public key

9. Username: This will be the username used in order to connect to the server via ssh. Ex:abac

10. SSH public key resource: Select Generate new key pair

11. Key pair name: The name that you give to the pem should have the following format

12. Public inbound ports: Select Allow selected ports

13. Select inbound ports: Check HTTP , HTTPS and SSH

14. Chose Review + create

 

15. Review the details of your VM and if everything is ok choose create

 

 

16. Download the key pair of the new server by choosing Download private key and create resource

17. Wait until Azure creates your VM and navigate to the newly created server by selecting Go to resource on the Notification tray

or

Select Menu → Virtual machines to see your virtual machines – > Select the vm with the name that you gave it.

18.On the overview menu you can find the public ip

Configure your newly created server

1. Open inbound ports:

a.On the Overview of abac-demo vm you should select Networking

b. Select Add inbound port rule

c. Fill rule information:

i. Priority: 100 for high priority

ii. Destination port ranges: The ports that your application will use. Ex: 1900,1901,1902 or 1900-1902

(warning) If you will have a mysql running on this vm to which you would like to connect from outside the server you should also add the mysql port, default port is 3306

iii. Name: Should have the following format Port_{portsOpenedByRule}

iv. Select Add

2.Assign static ip

a. Push on the network interface from the networking menu

b. Select IP configurations and select ipconfig1

c. From the presented view change Assignment to static and save.

Did you find useful information in the article?

Subscribe to our newsletter to be up-to-date with our news!

We don’t like spam either

abac blog about software development projects

Subscribe To Our Newsletter

Our newsletter covers a lot of ground with regards to new and shiny tech stacks and how to use them for great efficiency.

You have Successfully Subscribed!