Homelab on a budget

What if I told you this 10-year-old laptop can run a full IT lab—web servers, VMs, a VPN, and even a Git server.

I’m creating a series where its focused on building practical, budget-friendly home labs by using old laptops. We’ll install Linux and KVM on Linux. No expensive enterprise servers and a great WAF, or Wife Acceptance Factor.

Lets start with virtualization. We can install virtualbox, but why not something faster. Virtualbox will operate as a type 2 hypervisor while KVM will act as a type1. Its integrated in the linux kernel so the performance is much faster.

I am using Fedora Linux for this example since that is what I am currently running.

You want to install the virtualization package:

sudo dnf install @virtualization

Start services:

sudo systemctl start libvirtd

Enable on boot:

sudo systemctl enable libvirtd

Check on Networking:

macky@tatooine:~$ virsh net-list --all
 Name   State   Autostart   Persistent
----------------------------------------

Notice how there are no networks listed. Lets use the default from /usr/share/libvirt/networks/default.xml

<network>
  <name>default</name>
  <bridge name='virbr0'/>
  <forward/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

Now we need to reference that file from /usr/share/libvirt/networks/default.xml:

virsh net-define /usr/share/libvirt/networks/default.xml

Network default marked as auto started

virsh net-autostart default

Then use the default network:

virsh net-start default
virsh net-list --all

 Name      State      Autostart   Persistent

----------------------------------------------

 default   inactive   yes         yes
$ brctl show

bridge name bridge id STP enabled interfaces

virbr0 8000.525400864c1d yes 

Virtual machine manager:


Ref: https://docs.fedoraproject.org/en-US/quick-docs/virtualization-getting-started/