This guide details the complete process for creating two Linux server virtual machines (VMs) (Ubuntu Server and Rocky Linux) and configuring them to be managed remotely from Windows using PowerShell and SSH.
- Prerequisites
- Part 1: Ubuntu Server (
server-ubuntu) - Part 2: Rocky Linux Server (
server-rocky) - Part 3: Remote Connection with PowerShell (SSH)
- Software:
- Oracle VM VirtualBox installed on your PC (Windows 11).
- A Windows terminal (like PowerShell or Windows Terminal).
- Installation Files (ISOs):
- Ubuntu Server LTS: (e.g.,
ubuntu-24.04-live-server-amd64.iso). - Rocky Linux Minimal: (e.g.,
Rocky-10.0-x86_64-minimal.iso).
- Ubuntu Server LTS: (e.g.,
- Open VirtualBox and click the "New" icon.
- Virtual machine name and operating system:
- Name:
server-ubuntu(or the original namePostgreSQL Server Ubuntu). - ISO Image: Select the Ubuntu Server
.isofile you downloaded. - Important: DO NOT check the
Proceed with Unattended Installationbox.
- Name:
- Specify virtual hardware:
- Base Memory:
4096 MB(4 GB). - Processors:
2CPUs. - Important: Check the
Use EFIbox.
- Base Memory:
- Specify virtual hard disk:
- Select
Create a new Virtual Hard Disk. - Disk Size:
25.00 GB(or your preferred size). - Important: DO NOT check the
Pre-allocate Full Sizebox (to use dynamic allocation).
- Select
- Click "Finish" to create the VM.
- Select the
server-ubuntuVM and click "Start". - In the first menu, select
Try or Install Ubuntu Serverand pressEnter. - Language: Select
English(recommended for servers). - Keyboard: Configure your keyboard layout (e.g.,
Spanish). - Type of Installation: Leave the default option
(X) Ubuntu Server. - Network: Confirm that the network (
enp0s3) has obtained an IP via DHCP (e.g.,10.0.2.15). SelectDone. - Proxy: Leave it blank. Select
Done. - Mirror: Accept the default address. Select
Done. - Storage:
- Leave
(X) Use an entire diskchecked. - Important: UNCHECK the
Set up this disk as an LVM groupbox. - Select
Done. - On the summary screen, select
Doneand confirm the destructive action by choosingContinue.
- Leave
- Profile setup:
- Fill in
Your name,Your server's name,Pick a username(e.g.,isabosdev), and a secure password.
- Fill in
- SSH Setup:
- Important: Check the
[X] Install OpenSSH serverbox.
- Important: Check the
- Featured Server Snaps: Do not select any. Select
Done. - Installation: The system will install. This will take a few minutes.
- Reboot: When you see
Installation complete!, select[ Reboot Now ]. - The machine will ask you to
Please remove the installation medium, then press ENTER. VirtualBox usually ejects the ISO automatically. Simply pressEnter.
- At the
server-ubuntu login:prompt, log in with the user and password you created. - Update the system (optional for the lab, but good practice).
sudo apt update sudo apt upgrade
The process is identical to Ubuntu's, only the name and ISO change.
- In VirtualBox, click "New".
- Virtual machine name and operating system:
- Name:
server-rocky(orRocky RHEL Server). - ISO Image: Select the Rocky Linux Minimal
.isofile you downloaded. - VirtualBox will detect it as
Red Hat (64-bit)or similar. - Important: DO NOT check unattended installation.
- Name:
- Specify virtual hardware:
- Base Memory:
4096 MB(4 GB). - Processors:
2CPUs. - Important: Check the
Use EFIbox.
- Base Memory:
- Specify virtual hard disk:
- Disk Size:
25.00 GB. - Important: DO NOT check
Pre-allocate Full Size.
- Disk Size:
- Click "Finish".
- Select the
server-rockyVM and click "Start". - In the first menu, select
Install Rocky Linux 10and pressEnter. - Language: Select your preferred installer language (e.g.,
English->English (United States)). ClickContinue. - Installation Summary: We must complete all items with warnings.
- Network & Host Name:
- Click the switch for
enp0s3to turn it "ON". - In the bottom left corner, in
Host Name:, typeserver-rocky. - Click
Applyand thenDone.
- Click the switch for
- Installation Destination:
- Click on the 25 GB disk icon so a
✓appears. - Leave the configuration on
Automatic. - Click
Done.
- Click on the 25 GB disk icon so a
- Software Selection:
- Ensure
Minimal Installis selected. - Click
Done.
- Ensure
- Root Account:
- Check
Enable root account. - Set a strong password for
root. - Click
Done.
- Check
- User Creation:
- Fill in your username (e.g.,
isabosdev) and password. - Important: Check the
Make this user an administratorbox. - Click
Done.
- Fill in your username (e.g.,
- Network & Host Name:
- Begin Installation: Once no warnings remain, the button will become active. Click it.
- Reboot: When the installation finishes, click
Reboot System. - Eject ISO: If you see the installer again on reboot, manually eject the ISO from the
Devices>Optical Drives>Remove disk from virtual drivemenu and restart the VM (Machine>Reset).
This process is identical for both VMs and is what allows you to control them from Windows.
- Ensure the VM (e.g.,
server-ubuntu) is "Powered Off". - In VirtualBox, select the VM and click "Settings".
- Go to the "Network" section.
- On "Adapter 1", change "Attached to:" from
NATtoBridged Adapter. - Under "Name", ensure your main network adapter (your PC's Wi-Fi or Ethernet) is selected.
- Click "OK".
-
Start the VM.
-
Log in to the VM's console (the VirtualBox window).
-
Find the new IP address. The command is the same on both systems:
ip a
Look for the IP in the
enp0s3section, underinet. It will have a format like192.168.1.X. -
Minimize the VirtualBox window (leave it running).
-
Open PowerShell on your Windows.
-
Type the
sshcommand with your user and the VM's IP:ssh isabosdev@192.168.1.X -
The first time, it will ask if you trust the connection. Type
yesand pressEnter. -
Type your user password for that VM.
Done! You now control your server from PowerShell and can copy/paste commands.