Day 3 โ Setting Up Virtual Machines Manually


Objective
Today is my third day of learning DevOps, and I focused on setting up virtual machines manually and accessing them remotely via SSH. I used VirtualBox to install both Ubuntu Server 22.04 and CentOS 7, which helped me understand more about Linux system setup and networking.
๐งฑ What I Did
1. Downloaded ISO Images
2. Created Virtual Machines in VirtualBox
Allocated 2 GB RAM and 1-2 CPUs
Created a virtual hard disk (20 GB)
Mounted the ISO
Installed the OS manually (partitioning, hostname, user setup)
3. Enabled Networking
Set network adapter to Bridged Adapter for each VM
Ensured the VM receives an IP address via DHCP
4. Installed OpenSSH Server
Ubuntu:
SSH is usually installed by default. If not:
sudo apt update
sudo apt install openssh-server
FOR CentOS:
bashCopyEditsudo yum install openssh-server
sudo systemctl enable sshd --now
5. Found IP Address of VM
ip a
Or used:
ip addr show
6. Connected via SSH from my host machine
ssh username@ip-address
๐ ๏ธ Problems I Faced & Fixed
๐ Couldn't SSH into CentOS: SSH service was not running. Fixed it with:
bashCopyEditsudo systemctl enable sshd --now
๐ No IP Address on CentOS: Used
nmtui
to activate the network interface.
๐ก Key Takeaways
Manual VM installation improves understanding of OS internals.
SSH is a critical tool for remote management.
Networking setup (bridged/NAT + port forwarding) is crucial when working with VMs.
๐ฎ What's Next
Tomorrow, I plan to explore shared folder setup, hostname configuration, or maybe even automate VM provisioning using Vagrant.
Subscribe to my newsletter
Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
