• Latest News

    Tuesday, 4 December 2018

    Creating a Linux Virtual Machine on Azure and running a Python project

    I am assuming that you already have an Azure account. If you don't have one, create one here - Create an MS Azure Account. If you are a student, go here to get free credits of $100- Azure for Students.

    *Note: The ssh and scp used in the tutorial can be run on both Windows and Linux as Windows now support some Linux commands as well.

    Now, once you have the Azure, follow the follow the following steps:

    1. Login to the Azure portal and in the left menu pane, search for Virtual Machines.
    2. Now, click on Create virtual machine.
    3. Create a new resource group and choose a good name for your virtual machine (eg. I name it - vsldemo).
    4. Select the region: East US2
    5. Choose your desired OS with version in the image (I chose Ubuntu Server 16.04).
    6. Choose your authentication type. I prefer password over SSH Public Key. Create your username and password.
    7. In the Inbound Ports, select HTTP, HTTPS and SSH.
    8. Click on next and select the type of disk you want (Standard HDD in my case).
    9. Click on Review + Create.
    10. Once you can see the green flag with Validation Passed, click on Create.
    Well, now your VM will be created in few minutes. It's time to login to the VM and upload the project.
    Once your deployment is complete, go the the resource note your Public IP Address

    • To login to your VM, open terminal and type - ssh your_username@public_ip_address.
    Copying your project to the VM -
    • Type the command - scp filepath username@ip_address:
    This command will copy the files in the root directory of the VM.
    I am considering that you copied your complete python project to the root directory. Just you your server (maybe on port 80). To access your project live, just type your the Public IP Address in the address bar.

    Here you go live with your python project live on Azure Virtual Machine.

    Author: Prayas Mittal
    • Blogger Comments
    • Facebook Comments


    Post a Comment

    Thanks for your comment. We will try to reply as soon as possible.

    VSL Creations

    Item Reviewed: Creating a Linux Virtual Machine on Azure and running a Python project Rating: 5 Reviewed By: Unknown
    Scroll to Top