XNetwork

Finding my way into noting down any issues (and fixes) I’ve come across and anything else that comes to mind.

Proxmox on Hyper-V Server 2019

Ideally Proxmox should be installed on bare metal, however for testing purposes I needed to install this as a VM on Hyper-V Server 2019.

On a default install of Proxmox, two issues will be hit which we need to overcome.

Nested Virtualization Fix

To ensure Proxmox VMs and CTs harness hardware virtualization, resolving potential performance bottlenecks, follow these steps:

  1. Open PowerShell on the Hyper-V Server
  2. Execute the command:
Set-VMProcessor -VMName 'vmname' -ExposeVirtualizationExtensions $True

This exposes virtualization extensions, eliminating the reliance on software virtualization and enhancing overall performance.

Networking Fix

By default, Proxmox VMs face challenges in obtaining an IP address due to MAC address spoofing restrictions. To resolve this:

  1. In Hyper-V Manager, access the Proxmox VM settings
  2. Under Advanced Features for the Network Adapter, ensure “Enable MAC address spoofing” is checked.

Enabling MAC address spoofing allows Proxmox to modify the source MAC address in outgoing packets, ensuring proper networking functionality for VMs and CTs.

WSL2 Ubuntu DNS Issues

The other day, I attempted to create a new Laravel application using Sail but encountered timeouts during the process:

curl https://laravel.build/example-app | bash

After some investigation, I identified the issue was with the Sail Docker container trying to download packages and timing out. Subsequent testing with other containers yielded the same results.

Internet searches pointed to Windows DHCP as the culprit. Through trial and error, I started by instructing WSL not to auto-generate the /etc/resolv.conf file as the IP it was generating wasn’t resolving DNS queries. To fix this, I performed the following:

Add the following line to /etc/wsl.conf:

generateResolvConf = false

Temporarily set the IP in /etc/resolv.conf to 8.8.8.8 to allow the DNS to work so you can install dnsmasq:

sudo apt install dnsmasq -y

If it complains about being unable to start because systemd-resolved is currently listening on port 53, check with:

sudo lsof -i :53

Disable the default resolver service with:

sudo systemctl disable systemd-resolved.service

Stop it with

sudo systemctl stop systemd-resolved.service

Change /etc/resolv.conf from 8.8.8.8 to 127.0.0.1. Then, modify /etc/dnsmasq.conf by adding the following lines at the end:

server=/{your-local-domain}/{your-local-dns}
server=8.8.8.8
no-dhcp-interface=

Finally, restart dnsmasq with:

sudo systemctl restart dnsmasq

This should resolve the DNS issues, allowing you to proceed with your development.

UAP VLANs

I’ve had a Unifi UAP (AC-Lite) for a good few years but never managed to get VLANs working on it. That and the annoyance of it not working on my PoE switch had me buying a TP-Link EAP-225 to replace it. Of course the newer TP-Link provides faster wifi but it was also very simple to setup VLANs onto the SSIDs.

As it tends to happen, replacing the Unifi AP meant also stumbling across how to setup VLANs onto it’s SSIDs. Maybe my reading of documentation or web searching skills are whack but I couldn’t find these simple steps.

  1. On the switch, set the port as untagged for VLAN1.
  2. Tag all other VLANs onto the port.
  3. Done.

The TP-Link on the other hand is tagged on all required VLANs on the switch and then the AP settings deem the VLAN of the LAN interface and the SSIDs.