Home Internet hub based on PVE

Home Internet hub based on PVE

·

2 min read

Prerequisite

Process

Hardware passthrough

1. Update grub
vim /etc/default/grub

# Modify this line, this is a Intel version.
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt video=efifb:off"

update-grub

2. Update modules.
# Execute only once, finnally there will leave 4 new lines.
echo "vfio" >> /etc/modules
echo "vfio_iommu_type1" >> /etc/modules
echo "vfio_pci" >> /etc/modules
echo "vfio_virqfd" >> /etc/modules

3. Update kernel.
update-initramfs -u

4. Reboot

Create a VM to install OPT

Nothing to say that you just install the image you like, then do the following stuff.

  • Detach the original harddisk, then using qm importdisk 100 your-image.img local-lvm to import the image to be the hard drive of the VM. Do not forget to change this harddisk as a SATA device.

  • Change the boot order, and set the OPT as the only one left.

  • Virtual BIOS should use SeaBIOS.

  • Add the PCI net adapter properly, DO check the serial number, and NEVER add the LAN port to OPT, otherwise, you will lose your connection with the PVE.

    • As a recommendation, you should use leave the first port for LAN, so you just need to skim the first for convenience.

Set the OPT system

There is nothing to say, or maybe you just recover from a previous backup.

Set the PVE host system

  • Install some basic software such as vim/nginx/certbot-with-its-cloudflare-plugin.

  • Initialize the nginx setting, handling all the HTTPS network traffic.

  • Backup all the files.