As an IT professional, I’ve spent countless hours configuring and re-configuring new virtual machines inside Azure. Whether it’s for a quick demo, a new software test, or a temporary development environment, the process is tedious and the costs can really add up.
Did you know that a standard 127 GB OS disk can cost you about $10 a month, and a premium one can be double that? If you’re running ten or more VMs, those expenses can quickly become a significant part of your budget.
I found myself constantly frustrated by small details, like Windows hiding known file extensions by default. I wanted a solution that would allow me to spin up a new virtual machine configured exactly as I like, and I wanted to be able to do it quickly and easily.
I’ve developed a process to do just that, and in this post, I’ll walk you through the steps to save you time and money.
Take a look at the related video below.

Creating Your Base VM and Snapshot
The first step is to create a “base” virtual machine. I named mine dev-vscode. I created this VM using a standard OS disk, which is the more cost-effective option at about $10 a month. Once the VM was up and running, I went in and configured it exactly as I wanted.
- Software Installation: I installed my essential software, such as Visual Studio Code and Notepad++. I made sure to only install core tools that I’d want on almost any VM, not specialized extensions like Logic Apps that I might not always need.
- Windows Configuration: I adjusted Windows settings, like disabling “hide file extensions,” so I can see all file types, and applied other personal tweaks I always use.
After the configuration was complete, I stopped the virtual machine and navigated to the Disks section in the Azure portal. I clicked on the OS disk and created a Full snapshot. This snapshot, which I named dev-vscode-DATE with the current date, serves as my master image. It’s a full snapshot of my perfectly configured environment, stored as a Standard HD Snapshot.
VM Disk Snapshot
Provisioning a New Disk from Your Snapshot
With the snapshot created, I now have a master template from which I can create new disks as needed for new VMs. When I need to provision a new virtual machine for a short-lived demo, for example, I’ll create a new disk from this snapshot34.
- Create a New Disk: I go to the snapshot resource and select “Create disk”.
- Name the Disk: I give it a descriptive name, like VSCode-AI-demo.
- Upgrade to Premium: For better performance during my testing, I bumped the disk up from standard to premium. This is a temporary upgrade for the duration of the demo, and I will delete this disk shortly.
After reviewing and creating the disk, Azure takes a moment to provision it. This new premium disk now holds a copy of my master configuration, ready for use.

Create Disk from Snapshot
Swapping OS Disks for Quick Deployment
This is where the magic happens. Instead of creating a brand new virtual machine from scratch, which would give me a new public IP and new connection details, I leverage my existing VM. By swapping the OS disk, I can deploy my new environment while keeping all my RDP connections and login details the same.
- Navigate to Disks inside the VM: I go back to my base VM and select the “Disks” option.
- Swap OS Disks: I click “Swap OS disks” and select the new premium disk I just created, VSCode-AI-demo.
- Confirm the Swap: I confirm the swap, and just like that, the new disk is attached.
My VM now runs with the new disk, providing better performance with the premium SSD, and it’s configured perfectly for my demo. When I’m done, I can simply go back to the “Swap OS disk” option and switch back to my original standard disk. This returns my VM to its baseline state, and I can delete the temporary premium disk to save on costs.

Swap OS Disks
Conclusion
This process allows me to maintain a clean, consistent base image of my virtual machine and quickly deploy temporary, high-performance environments for testing and demos.
By using Azure Snapshots and swapping OS disks, I’ve eliminated the tedious re-configuration process and significantly reduced my cloud costs.
If you have a different process that works for you, please share it in the comments below!
Recent Comments