PVE Installation Steps

  • Download PVE from the official website
  • Use Etcher to flash the image to a USB drive
  • Connect HDMI cable to monitor, connect keyboard and mouse to mini PC, insert USB drive, and boot
  • Press F7 to enter BIOS and select USB boot
  • Choose Graphical installation, configure IP address, username, password, and follow the prompts
  • After installation completes, connect the mini PC to the router, then access PVE at <pve_ip_address>:8006. Username is root, password is what you set earlier.

OpenWrt Installation Steps

Compiling OpenWrt

  • I won’t go into detail about compilation. I use GitHub for cloud compilation. Here’s my .config for reference:

    TargetSystem:
      - x86
    Subtarget:
      - x86_64
    TargetProfile:
      - Generic x86/64
    
    TargetImages:
      - squashfs
      	- Build GRUB images
      - Use Console Terminal (in addition to Serial)
      - GZip images
    
    LuCI:
      Themes:
        - luci-theme-agron
      Applications:
        - luci-app-accesscontrol
        - luci-app-adguardhome
        - luci-app-arpbind
        - luci-app-banip 
        - luci-app-ddns
        - luci-app-filetransfer
        - luci-app-firewall
        - luci-app-frpc
        - luci-app-ksmbd
        - luci-app-nlbwmon
        - luci-app-opkg
        - luci-app-passwall
        - luci-app-samba
        - luci-app-sqm
        - luci-app-statistics
        - luci-app-upnp
        - luci-app-vnstat
        - luci-app-vsftpd
        - luci-app-wol
        - luci-app-zerotier
      Protocols:
      	- luci-protocol-wireguard  
    
    Network:
      IP Addresses and Names:
      	- ddns-scripts-cloudflare
        - drill
      - tcpdump
    
    Utilities:
      - qrencode
    

Creating a Virtual Machine

Uploading the Image

  • Use scp to upload the compiled openwrt-x86-64-generic-squashfs-combined.img.gz to /var/lib/vz/template/iso/:

    scp .\openwrt-x86-64-generic-squashfs-combined.img.gz [email protected]:/var/lib/vz/template/iso
    

    Make sure to use the -combined.img.gz file.

  • Decompress the file:

    gzip -d openwrt-x86-64-generic-squashfs-combined.img.gz
    
  • Mount as a virtual machine disk:

    qm importdisk <vm_id> openwrt-x86-64-generic-squashfs-combined.img local-lvm
    

    Success is indicated by: successfully imported disk 'local-lvm:vm-100-disk-0'

  • In Options → Boot Order, select this disk and set it as the first boot order:

    Boot Order

  • After that, you can delete the .img file.

Debian Installation Steps

  • Download the Debian image from the official website. In the PVE management panel, go to pve → local (pve) → ISO Images to upload the image (corresponding location: /var/lib/vz/template/iso/). Don’t delete this image after installation.
  • I set Disk Size to 256GB, cores to 4 (since the N100 is quad-core), and memory to 12GB.
  • Don’t delete the .iso file after installation.

PVE Optimization

I used the popular script by a well-known tech person:

wget -q -O /root/pve_source.tar.gz 'https://bbs.x86pi.cn/file/topic/2024-01-06/file/24f723efc6ab4913b1f99c97a1d1a472b2.gz' && tar zxvf /root/pve_source.tar.gz && /root/./pve_source

Shutting Down PVE

One last emphasis: if your server needs to shut down, make sure to shut down each subsystem individually. Simply cutting the power could have irreversible consequences, since PVE is virtualized. If you’re worried about sudden power outages, consider buying a UPS.

This article references the video: