Setting Up a VM in the Cloud

My Experience Setting Up a Virtual Machine in Azure

After setting up local virtual machines (VMs) in VirtualBox, I felt ready to take things to the next level by setting up VMs in the cloud. While local VMs are a great way to experiment and learn, I knew that working in the cloud would provide me with the opportunity to practice in environments more similar to the ones I’ll encounter in real-world DevOps workflows.

Why I Decided to Set Up VMs in the Cloud

Moving to the cloud felt like a natural next step for me. I had already gained some basic experience with Azure through studying for the AZ-900 certification, so it made sense to continue with a platform I was already somewhat familiar with. Setting up VMs in Azure would give me hands-on experience with cloud resources and allow me to practice deploying and managing infrastructure in a more professional environment. Since I was already learning the fundamentals of Azure, this seemed like the ideal opportunity to put that knowledge to use and take it to the next level.

How I Set Up VMs in Azure

The process of setting up VMs in Azure was different from what I experienced with VirtualBox, but it was straightforward and user-friendly. Here’s how I did it:

  1. Access the Azure Portal: Once my account was set up (for those without an Azure account, Microsoft gives a free subscription for new users and also has a plan for students), I logged into the Azure Portal. The portal provides a web interface for managing all of your Azure resources, and I found it quite intuitive to navigate.

  2. Create a New Virtual Machine: In the Azure Portal, I searched for the "Virtual Machines" section and clicked Create. Azure has predefined templates and images for different operating systems. I choseUbuntu Server 24.04 LTS as my operating system.

  3. Configure the VM: Azure walks you through a series of steps to configure the VM:

    • Size: You can choose the amount of CPU, RAM, and disk space for your VM. For learning purposes, I selected a smaller, cost-effective option.

    • Authentication: I opted for SSH key-based authentication instead of a password for better security (make sure to save the private key in your ~/.ssh folder, set the right permissions with chmod 600 ~/.shh/<private-key> and add it to your SHH Agent with ssh-add ~/.shh/<private-key>).

    • Networking: Azure handles networking configurations automatically, but I made sure to enable public IP so that I could access the VM from anywhere.

  4. Deploy the VM: Once all configurations were done, I clicked Review + Create, and Azure began provisioning the VM. The entire process took only a few minutes, and soon I had an Ubuntu server running in the cloud.

  5. Access the VM: After the VM was created, I connected to it using SSH from my terminal. Azure provides a public IP for this, so I could easily SSH into the machine with the command:

    ssh username@<public-ip-address>

The Experience and What I Learned

Setting up a VM in Azure was definitely a valuable experience. The user interface in the Azure Portal made things simpler, but I had to get used to navigating cloud services and understanding all the options when creating a Virtual Machine.

One of the things I found particularly useful after I created the Virtual Machine was the ability to scale the VM on demand. If I needed more resources for a specific task, I could easily resize the VM without having to worry about physical hardware limitations. This is a huge advantage when working in cloud environments.

This opened my eyes to the many possibilities cloud platforms offer for DevOps automation, scaling, and high availability. While local VMs are a great starting point and in no way dispensable, cloud-based VMs are where I’ll be doing much of my work in the future.

Recommendation

If you’re just starting out with cloud environments, I recommend setting up your own VM on a platform like Azure or AWS. It’s a great way to get a feel for managing cloud resources and to practice the skills you’ll need for real-world scenarios.