2. Create and Size a VM#
Operating System#
The operating system image is a primary VM design choice. This decision is not cosmetic: it directly affects package management, default security behavior, available tools, and command compatibility across the project. For introductory cloud work, a mainstream Linux distribution is typically preferred because of its documentation quality, large support community, and compatibility.
Microsoft Windows Server images are also available from the major cloud vendors. Only Azure offers Windows desktops. Windows Server and especially Microsoft SQL server are required for some business applications. Windows VMs cost extra to pay for the license to Microsoft. Unless you know you need Windows, Linux is the best choice for a VM.
In today’s demonstration make a note of the operating systems that are available. There are many considerations for choosing an operating system but by far the most important one is compatibility. The VM is just a tool for running software that does something. The software is more important than the VM so pick an operating system that works with whatever software you need.
In this class I recommend using Debian or Ubuntu Linux. Others will work too but not all of the instructions in the milestones will match exactly.
CPU and Memory Size#
A VM should be sized to match the work it’s required to do. CPU-bound tasks, like processing video, benefit from more vCPU, while memory-bound tasks, like caching, benefit from more RAM. Performance of a cloud application depends on many factors, therefore an oversized machine increases cost without necessarily improving performance, the way putting a race car engine in a Corolla would make the car more expensive but not much faster. A practical approach is to start with a small instance, measure how it responds to load, and make it a little bigger until up-sizing does’t help. Later in this class we’ll see how to do load testing on a VM.
Access Model#
Cloud VMs must be both accessible and secure. For Linux systems this usually means SSH, either from a browser shell or a local terminal client, while Windows systems typically use RDP. SSH and RDP allow administrator access to VMs. They are very high value targets for hackers. If possible, use a firewall to limit access to only trusted machines. In this class the VMs you create will need to be accessible to the whole internet, so configuring SSH properly is essential.
In class we’ll use SSH keys because they are much more secure than passwords. Never set a password for any account on a cloud VM.
Cost#
Cost awareness is a first-class technical skill. VM price is shaped by machine size, storage type and size, region, network usage, and instance uptime. There are many strategies for reducing cost.
Tip
No Price Like Free
The major vendors have a free tier for many products. A free tier is an amount
of usage that you can have for free every month. Examples of free-tier VM
products include Google Cloud Compute Engine (Always Free e2-micro in selected
US regions), AWS EC2 (t2.micro or t3.micro for up to 750 hours/month during
the first 12 months on eligible accounts), and Microsoft Azure Virtual Machines
(B1s for up to 750 hours/month during the first 12 months on eligible
accounts).
Free-tier terms, regions, and eligibility rules change over time, so current offer details should always be verified in each vendor’s pricing page.
As you’ll see in class, it’s possible to spend an enormous amount of money on a VM. When that much money is on the line it’s important to discount shop. Pricing models include on-demand and discounted options, each with different tradeoffs and use cases. Consistent stop/delete hygiene is critical because idle VMs are one of the most common and avoidable sources of cloud overspend.
Lifecycle#
A VM has a lifecycle that includes creation, configuration, active use, maintenance, resizing, backup, and retirement. Each stage has operational implications, especially the differences between rebooting, stopping, and deleting an instance. Data persistence must be evaluated across each state transition, including what remains and what is permanently removed.
Lifecycle awareness improves recovery practice and operational safety. Snapshots or backups should be taken before risky changes, and deletion should be treated as a deliberate end-of-life action rather than routine cleanup. This approach supports systems that are easier to troubleshoot, recover, and reproduce.
Turn In#
In the last milestone you created a VM and then deleted it. To implement this milestone you should create a VM, while documenting the procedure you used, the choices you made and the expected cost. Here are some constraints:
For now, use a VM that is in the free tier.
Use a Debian based operating system (Debian or Ubuntu)
Post your documentation on Canvas and comment on another student’s documentation. Remember, you will be collecting all of this documentation into a report near the end of the semester, so think about the comments you get so that you can make changes before the project report.