<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>A blog you may find useful</title>
    <link>https://hull.au/</link>
    <description>Recent content on A blog you may find useful</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <managingEditor>webmaster@hull.au (Admin)</managingEditor>
    <webMaster>webmaster@hull.au (Admin)</webMaster>
    <lastBuildDate>Tue, 23 Apr 2024 20:52:20 +0800</lastBuildDate>
    <atom:link href="https://hull.au/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Installing VirtIO (or any driver) from Windows Recovery</title>
      <link>https://hull.au/blog/install-virtio-drivers-from-windows-recovery/</link>
      <pubDate>Tue, 23 Apr 2024 20:52:20 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/install-virtio-drivers-from-windows-recovery/</guid>
      <description>&lt;p&gt;Today I was migrating an older Windows VM running under VMware to Proxmox and&#xA;encountered a frustrating sudden roadblock: no PVSCSI drivers! My newer builds&#xA;all use VMware PVSCSI, but this VM was an older build still using LSI SAS.&lt;/p&gt;&#xA;&lt;p&gt;Now staring at the &lt;code&gt;INACCESSIBLE_BOOT_DEVICE&lt;/code&gt; BSOD, your options are abort or&#xA;press ahead. In this article, we charge forward and overcome our lack of&#xA;preparedness!&#xA;&lt;img alt=&#34;Screenshot of INACCESSIBLE_BOOT_DEVICE BSOD&#34; src=&#34;https://hull.au/images/virtio-drivers/bsod.png&#34;&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;enter-windows-recovery&#34;&gt;Enter Windows Recovery&lt;/h1&gt;&#xA;&lt;p&gt;Reset the VM a few times while at the Windows loading screen and it&amp;rsquo;ll dump you&#xA;into the recovery environment. From here you can perform an advanced repair and&#xA;summon a command prompt. It typically takes 2 failed boots to trigger recovery.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Today I was migrating an older Windows VM running under VMware to Proxmox and
encountered a frustrating sudden roadblock: no PVSCSI drivers! My newer builds
all use VMware PVSCSI, but this VM was an older build still using LSI SAS.</p>
<p>Now staring at the <code>INACCESSIBLE_BOOT_DEVICE</code> BSOD, your options are abort or
press ahead. In this article, we charge forward and overcome our lack of
preparedness!
<img alt="Screenshot of INACCESSIBLE_BOOT_DEVICE BSOD" src="/images/virtio-drivers/bsod.png"></p>
<h1 id="enter-windows-recovery">Enter Windows Recovery</h1>
<p>Reset the VM a few times while at the Windows loading screen and it&rsquo;ll dump you
into the recovery environment. From here you can perform an advanced repair and
summon a command prompt. It typically takes 2 failed boots to trigger recovery.</p>
<h1 id="mount-an-iso-containing-drivers">Mount an ISO Containing Drivers</h1>
<p>In this example, I&rsquo;ve neglected to install the VirtIO SCSI driver so I&rsquo;ll mount
the VirtIO ISO for Windows. You can grab it from <a href="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso">here</a>
<img alt="Screenshot of CD-ROM config with VirtIO ISO mounted" src="/images/virtio-drivers/iso-selection.png"></p>
<p>Switch to your disc in the Command Prompt using its drive letter (usually <code>D:</code>)
<img alt="Screenshot showing the directory listing of the VirtIO driver disc" src="/images/virtio-drivers/virtio-contents.png"></p>
<h1 id="load-the-scsi-driver">Load the SCSI Driver</h1>
<p>Find the driver you wish to load. (<code>vioscsi.inf</code> in my case)
<img alt="Screenshot showing the folder containing the VirtIO SCSI driver" src="/images/virtio-drivers/driver-folder.png"></p>
<p>Load the driver by running <code>drvload vioscsi.inf</code>
<img alt="Screenshot demonstrating drvload" src="/images/virtio-drivers/drvload.png"></p>
<h1 id="list-disks">List Disks</h1>
<p>Use <code>diskpart</code> to list your disks to confirm they&rsquo;re now visible
<img alt="Screenshot of diskpart showing the results of a successful list disk operation" src="/images/virtio-drivers/diskpart-disks.png"></p>
<p>Use <code>list volume</code> to see what drive letter your Windows drive got assigned
<img alt="Screenshot of diskpart showing the results of a successful list volume operation" src="/images/virtio-drivers/diskpart-volumes.png"></p>
<p>My Windows partition was now visible on drive letter <code>E:</code>
<img alt="Screenshot showing the contents of my Windows partition" src="/images/virtio-drivers/e-drive.png"></p>
<h1 id="add-the-driver-to-windows">Add the Driver to Windows</h1>
<p>Use <code>dism</code> to insert the driver into your Windows install</p>





<pre tabindex="0"><code>dism /Image:E:\ /Add-Driver:D:\vioscsi\2k19\amd64\vioscsi.inf</code></pre><p><img alt="Screenshot of dism adding the vioscsi driver to Windows" src="/images/virtio-drivers/dism.png"></p>
<h1 id="success">Success!</h1>
<p>Reboot into Windows and enjoy your new SCSI driver.
<img alt="Screenshot of device manager showing the VirtIO SCSI controller" src="/images/virtio-drivers/device-manager.png"></p>
]]></content:encoded>
    </item>
    <item>
      <title>Fix Firefox URL Bar Tabbing</title>
      <link>https://hull.au/blog/firefox-urlbar-fix-tabbing/</link>
      <pubDate>Sat, 06 Apr 2024 17:32:48 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/firefox-urlbar-fix-tabbing/</guid>
      <description>&lt;p&gt;Approximately 1 year ago Mozilla added a button to certain suggestions in the&#xA;URL bar. This breaks the ability to tab through results as the focus is placed&#xA;on the button instead of the item, requiring you to sometimes double tab.&lt;/p&gt;&#xA;&lt;p&gt;Google Chrome and its variants also do this but there&amp;rsquo;s no workaround for them&#xA;as they&amp;rsquo;re browsers that can charitably described as garbage.&lt;/p&gt;&#xA;&lt;p&gt;You can fix this with Firefox by setting the following preference to false:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Approximately 1 year ago Mozilla added a button to certain suggestions in the
URL bar. This breaks the ability to tab through results as the focus is placed
on the button instead of the item, requiring you to sometimes double tab.</p>
<p>Google Chrome and its variants also do this but there&rsquo;s no workaround for them
as they&rsquo;re browsers that can charitably described as garbage.</p>
<p>You can fix this with Firefox by setting the following preference to false:</p>





<pre tabindex="0"><code>browser.urlbar.resultMenu.keyboardAccessible</code></pre><p>No restart required, takes effect immediately.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Custom MTU on Amazon Linux 2023</title>
      <link>https://hull.au/blog/amazon-linux-2-custom-mtu/</link>
      <pubDate>Wed, 03 Apr 2024 17:07:26 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/amazon-linux-2-custom-mtu/</guid>
      <description>&lt;p&gt;A quick search for &amp;ldquo;How to set MTU for Amazon Linux&amp;rdquo; would lead you straight&#xA;&lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/network_mtu.html#set_mtu&#34;&gt;here&lt;/a&gt;&#xA;and you might think to yourself &amp;ldquo;This is easy! No problemo!&amp;rdquo; but upon following&#xA;the instructions, you&amp;rsquo;ll be shocked to learn your MTU is still 9001 and asking&#xA;yourself why do machines not listen to the instructions we give them?&lt;/p&gt;&#xA;&lt;p&gt;It turns out despite the best efforts of the machines, a brain worm everyone&#xA;loves immensely called &amp;lsquo;systemd&amp;rsquo; has made this an exciting learning experience.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>A quick search for &ldquo;How to set MTU for Amazon Linux&rdquo; would lead you straight
<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/network_mtu.html#set_mtu">here</a>
and you might think to yourself &ldquo;This is easy! No problemo!&rdquo; but upon following
the instructions, you&rsquo;ll be shocked to learn your MTU is still 9001 and asking
yourself why do machines not listen to the instructions we give them?</p>
<p>It turns out despite the best efforts of the machines, a brain worm everyone
loves immensely called &lsquo;systemd&rsquo; has made this an exciting learning experience.</p>
<p>For this guide, our target MTU is 1440 bytes and the NIC is ens5.</p>
<h1 id="what-amazon-tells-you-to-do">What Amazon tells you to do</h1>
<p>The short summary is:</p>
<ol>
<li>Edit <code>/etc/sysconfig/network-scripts/ifcfg-eth0</code> and append <code>MTU=1440</code></li>
<li>Add <code>request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-search, domain-name-servers, host-name, nis-domain, nis-servers, ntp-servers;</code> to <code>/etc/dhcp/dhclient.conf</code></li>
<li>Reboot and bask in your success</li>
</ol>
<p>Wait a minute!</p>





<pre tabindex="0"><code>~ ip link
2: ens5 &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 9001 blahblah</code></pre><p>How did this happen?</p>
<h1 id="inspect-the-logs">Inspect the logs</h1>
<p>Thankfully there are logs and I hope you&rsquo;re a savvy <code>journalctl</code> user as you&rsquo;ll
need it for troubleshooting issues like this. Start by querying the logs for
<code>systemd-networkd</code> (excellent name, Poettering)</p>
<p><code>journalctl -u systemd-networkd</code></p>
<p>EC2 instances use DHCP for grabbing their IP configuration, so the log will be
spammed with countless DHCP events, but the line which caught my eye was this:</p>





<pre tabindex="0"><code>systemd-networkd[pid]: ens5: Configured with /usr/lib/systemd/network/80-ec2.network</code></pre><p>My love of systemd grows stronger with every passing day.</p>
<h1 id="what-is-this-file">What is this file?</h1>
<p>The ArchWiki team has an excellent article on <code>systemd-networkd</code> that explains
how these configuration files work, what order they&rsquo;re loaded in and where they
should be located. <a href="https://wiki.archlinux.org/title/Systemd-networkd#Configuration_files">View it here</a></p>
<p>Open this file up in <code>nano</code> (accept no substitutes) and you&rsquo;ll see</p>





<pre tabindex="0"><code>[Link]
MTUBytes=9001</code></pre><p>Unbelievable! My first instinct here was to avoid editing the system file as
the ArchWiki explains that files in <code>/etc/systemd/network/</code> take precedence.
So therefore we should drop our modified .network files in /etc/ and be on our
our way, right?</p>
<h1 id="overriding-systemd-networkd">Overriding systemd-networkd</h1>
<p>Well this is what I tried and after a reboot I saw this:</p>





<pre tabindex="0"><code>systemd-networkd[pid]: ens5: Configured with /etc/systemd/network/80-ec2.network</code></pre><p>Awesome!</p>





<pre tabindex="0"><code>~ ip link
2: ens5 &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 9001 blahblah</code></pre><p>Noo! Back to the logs</p>





<pre tabindex="0"><code>systemd-networkd[pid]: ens5: Reconfiguring with /run/systemd/network/70-ens5.network</code></pre><p>When I dump out the volatile config, I see it&rsquo;s configured for jumbo frames</p>





<pre tabindex="0"><code>[Link]
MTUBytes=9001</code></pre><p>Back to the drawing board.</p>
<h1 id="the-desperate-search-begins">The desperate search begins</h1>
<p>Now we&rsquo;ve established there&rsquo;s a ghost in the machine, let&rsquo;s hunt for it.</p>
<p><code>journalctl | grep ens5</code></p>
<p>Something caught my eye</p>
<p><code>ec2net[pid]: Starting configuration for ens5</code></p>
<p>What the heck is <code>ec2net</code>? A quick search of the filesystem revealed it&rsquo;s a
helpful little script located at <code>/usr/share/amazon-ec2-net-utils/lib.sh</code> and
searching for that revealed it&rsquo;s open source. <a href="https://github.com/amazonlinux/amazon-ec2-net-utils">GitHub</a></p>
<p>The information on GitHub is enlightening:</p>





<pre tabindex="0"><code>The version 1.x branch of the amazon-ec2-net-utils package was used in Amazon Linux 2 and earlier releases. It has a long history and is tightly coupled to ISC dhclient and initscripts network configuration. Both of these components are deprecated and will not make up the primary network configuration framework in future releases of Amazon Linux or other distributions. The 2.x branch (released from the main branch in git) represents a complete rewrite targeting a more modern network management framework. The rest of this document describes the 2.x branch.</code></pre><p>So the reason we&rsquo;re in this situation is the documentation is relevant to just
Amazon Linux 2 and 2023 does things differently.</p>
<p>This script is the bridge between IMDS and <code>systemd-networkd</code>. It creates the
volatile configuration we saw above and sources its defaults from
<code>/usr/lib/systemd/network/80-ec2.network</code>.</p>
<h1 id="in-conclusion">In conclusion</h1>
<p>Edit <code>/usr/lib/systemd/network/80-ec2.network</code>, change the MTU value from 9001
to your desired value and make sure to document your changes as it&rsquo;ll probably
come to haunt you next time <code>amazon-ec2-net-utils</code> updates.</p>
<p>You may undo any edits you made to <code>/etc/dhcp/dhclient.conf</code> and
<code>/etc/sysconfig/network-scripts/ifcfg-eth0</code> as these have no effect.</p>
<p>p.s. This article was updated to correct references to AL2 as I didn&rsquo;t realise
that AL2023 is an entirely different version from AL2.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Seagate FireCuda 530 SSD Read Performance Woes</title>
      <link>https://hull.au/blog/seagate-530-ssd-read-performance/</link>
      <pubDate>Sat, 02 Mar 2024 15:57:48 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/seagate-530-ssd-read-performance/</guid>
      <description>&lt;p&gt;I have a Seagate FireCuda 530 2 TB NVMe SSD (ZP2000GM30023) and experienced a&#xA;strange issue with read performance. Files which had not been accessed recently&#xA;were very slow to access. Even sequential reads were glacially slow, akin to a&#xA;USB flash drive with access times spiking like crazy.&lt;/p&gt;&#xA;&lt;p&gt;This appears to be a firmware bug with the Segate devices, but Seagate does a&#xA;poor job of advertising where to get firmware. If you&amp;rsquo;re affected, update to&#xA;firwmare version SU6SM005 by doing the following:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I have a Seagate FireCuda 530 2 TB NVMe SSD (ZP2000GM30023) and experienced a
strange issue with read performance. Files which had not been accessed recently
were very slow to access. Even sequential reads were glacially slow, akin to a
USB flash drive with access times spiking like crazy.</p>
<p>This appears to be a firmware bug with the Segate devices, but Seagate does a
poor job of advertising where to get firmware. If you&rsquo;re affected, update to
firwmare version SU6SM005 by doing the following:</p>
<ol>
<li>Download SeaTools from <a href="https://www.seagate.com/support/downloads/seatools/">here</a></li>
<li>Click on the &ldquo;Advanced&rdquo; tab once launched, it&rsquo;ll give you the serial number</li>
<li>Return to the SeaTools download page, there&rsquo;s a Firmware Downloads widget on
the side. Insert your serial number into that</li>
<li>Download the firmware update ZIP and extract it</li>
<li>Select the affected drive in SeaTools and then click &ldquo;Firmware Update&rdquo;</li>
<li>Browse to the new .bin file and hit Ok</li>
<li>The firmware update should complete within a few seconds</li>
</ol>
<p>Subsequent to this I formatted the drive and reinstalled Windows onto another
drive since I wasn&rsquo;t sure whether this would fix the issue. After formatting, I
80% filled the drive with large files and left them there for months.</p>
<p>After letting them age on the drive, I copied them to another SSD and the read
performance was extremely fast. Therefore it seems the firmware update has
resolved the issue and I would suggest this to anyone having issues.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Proxmox Networking for VMware People</title>
      <link>https://hull.au/blog/proxmox-networking-for-vspherites/</link>
      <pubDate>Mon, 08 Jan 2024 22:13:32 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/proxmox-networking-for-vspherites/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been making the move from VMware vSphere to Proxmox as part of a 2024 New Year resolution, and this has led to a lot of silly questions as Proxmox&amp;rsquo;s networking can best be described as &amp;ldquo;similar, but different&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;This post will cover how to replicate common vSphere networking setups in Proxmox. Please note, I&amp;rsquo;ll only cover Linux networking, not OVS or the newish SDN feature in Proxmox.&lt;/p&gt;&#xA;&lt;h1 id=&#34;why-do-i-have-to-apply-configuration&#34;&gt;Why do I have to &amp;ldquo;Apply Configuration&amp;rdquo;?&lt;/h1&gt;&#xA;&lt;p&gt;Proxmox is fundamentally based on Debian Linux whose networking is built upon the &lt;code&gt;ifupdown&lt;/code&gt; package. Proxmox builds on this by using &lt;code&gt;ifupdown2&lt;/code&gt;, an improved version that makes life easier for developers, but the fundamentals for end users are the same.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve been making the move from VMware vSphere to Proxmox as part of a 2024 New Year resolution, and this has led to a lot of silly questions as Proxmox&rsquo;s networking can best be described as &ldquo;similar, but different&rdquo;.</p>
<p>This post will cover how to replicate common vSphere networking setups in Proxmox. Please note, I&rsquo;ll only cover Linux networking, not OVS or the newish SDN feature in Proxmox.</p>
<h1 id="why-do-i-have-to-apply-configuration">Why do I have to &ldquo;Apply Configuration&rdquo;?</h1>
<p>Proxmox is fundamentally based on Debian Linux whose networking is built upon the <code>ifupdown</code> package. Proxmox builds on this by using <code>ifupdown2</code>, an improved version that makes life easier for developers, but the fundamentals for end users are the same.</p>
<p>When a configuration change is made, you&rsquo;re editing <code>/etc/network/interfaces</code> to include the new configuration. Proxmox won&rsquo;t apply the changes straight away as you may be making multiple changes which are dependant on each other and reloading the configuration does have the potential to briefly disrupt the network.</p>
<h1 id="creating-vswitches-in-proxmox">Creating vSwitches in Proxmox</h1>
<p>Proxmox&rsquo;s Linux networking can act like a standard vSwitch within vSphere, but the terminology is a little different. Of the options presented, the one you&rsquo;re interested in is &ldquo;Linux Bridge&rdquo;.</p>
<p><img alt="Screenshot of Proxmox networking options" src="/images/pve-networking-options.png"></p>
<p>Once you click this, you&rsquo;ll be presented with this.</p>
<p><img alt="Screenshot of Proxmox Linux Bridge wizard" src="/images/pve-networking-new-bridge.png"></p>
<p>This is one aspect of Proxmox you&rsquo;ll have to get used to: Endless forms with not a lot of hints, though the Help button generally works well.</p>
<p>Here are the options relevant for vSwitches</p>
<h2 id="vlan-aware">VLAN Aware</h2>
<p>This allows the bridge to pass around dot1q tagged traffic. If you leave this unchecked, it is still possible to use VLANs on a guest&rsquo;s NIC, but Proxmox will create VLAN NICs bridged to your Linux bridge in the background to achieve this.</p>
<p>If you are using VLANs, I strongly recommend you enable VLAN awareness.</p>
<h2 id="bridge-ports">Bridge Ports</h2>
<p>This is the equivalent of assigned physical adapters in VMware and is essentially what interfaces the bridge is actually connected to. Unlike VMware, this doesn&rsquo;t need to be a real physical adapter. I&rsquo;ll cover bridging to bonded interfaces in the link failover section.</p>
<h2 id="ip-addresses">IP Addresses?</h2>
<p>One thing that may seem confusing is the form asks for IP networking configuration. This is because Linux bridges combine two separate VMware concepts, that of a VMkernel adapter and its associated network.</p>
<p>Configuring an IP address is optional, guests can still use the bridge without it.</p>
<h2 id="networking-within-the-hypervisor-only">Networking Within the Hypervisor Only</h2>
<p>With vSphere, it&rsquo;s possible to create a vSwitch with no physical ports that just passes traffic between connected guests. This is useful if you use a software router such as OPNsense to handle layer 3 routing, NAT, etc. for your guests as you won&rsquo;t want to connect them to an outside network.</p>
<p>This is extremely simple with Proxmox. It&rsquo;s literally as simple as leaving the &ldquo;Bridge ports&rdquo; field empty.</p>
<h1 id="link-failover-configuration">Link Failover Configuration</h1>
<p>VMware vSphere standard switches have a direct relationship with the physical network adapters they&rsquo;re assigned to (if any). In VMware, active-active, active-passive, etc. link failover is achieved by just setting the interface order for the vSwitch.</p>
<p><img alt="Screenshot of the Manage Physical Network Adapters modal in vSphere Client" src="/images/vswitch-physical-nics.png"></p>
<p>Proxmox approaches this a little differently, failover is achieved by creating a new interface called a Linux Bond. Below is an example configuration that mimics the active-passive configuration above.</p>
<p><img alt="Screenshot of a Proxmox Linux Bond NIC" src="/images/pve-networking-bond.png"></p>
<p>In this instance, <code>eno3</code> and <code>enp65s0f1</code> are actual physical network interfaces. As <code>enp65s0f1</code> is the primary, it&rsquo;ll always use that whenever a link is available and only use <code>eno3</code> as a last resort.</p>
<p>As with bridges, IP address configuration is optional. You cannot plug a guest&rsquo;s NIC directly into a bond, so an IP address configuration is likely only useful for creating a management interface that has link redundancy.</p>
<p>A Linux bridge may make use of a bonded interface by simply bridging to it. Specifying the Linux bond&rsquo;s interface name as the bridged port is all you need to do.</p>
<h1 id="port-groups">Port Groups</h1>
<p>In the VMware world, a port group is used for connecting guests to a vSwitch. It is intended to be analogous to a switchport on a real world network switch.</p>
<p>Proxmox approaches this a little differently, there are no port groups and the VLAN configuration is held by the guest&rsquo;s NIC. This is akin to if you could attach a VMware guest directly to a vSwitch and just specify the VLAN directly on the guest interface.</p>
<p><img alt="Screenshot of the NIC configuration on a Proxmox guest" src="/images/pve-nic-settings.png"></p>
<h2 id="vlan-tag">VLAN Tag</h2>
<p>The VLAN Tag field is self-explanatory, guest traffic passing through the bridge will be tagged with the value you specify here. However the &ldquo;no VLAN&rdquo; placeholder when nothing is inserted is somewhat misleading, as in the case of a VLAN Aware bridge, it acts like a port group tagged 4095. It&rsquo;ll pass all tagged and untagged traffic.</p>
<p>If you just want untagged traffic, you may &ldquo;tag&rdquo; the port as VLAN 1, which acts like the &ldquo;None&rdquo; option in VMware, and disables VLANing for the NIC.</p>
<h1 id="vmkernel-nics-on-specific-vlans">VMkernel NICs on Specific VLANs</h1>
<p>In vSphere, it&rsquo;s possible to configure the management interface to sit on a specific VLAN by configuring a VLAN ID for the VMkernel NIC&rsquo;s port group. Proxmox approaches this a little differently, since any interface is a candidate for carrying management traffic, we instead just create a Linux VLAN interface and configure an IP on it.</p>
<p><img alt="Screenshot of a Linux VLAN interface&rsquo;s configuration in Proxmox" src="/images/pve-networking-linux-vlan.png"></p>
<p>In this example, I&rsquo;ve used a common naming convention of Device.VLAN, which Proxmox picks up on and auto fills to the correct device and tag. Any guest or physical network plugged into <code>vmbr1</code> can reach Proxmox on VLAN 601 with this configuration, and no IP configuration is required on the bridge.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Tip for Git Merge Operations in Azure DevOps Pipelines: Disable Shallow Fetch</title>
      <link>https://hull.au/blog/git-merging-within-devops-pipelines/</link>
      <pubDate>Tue, 28 Nov 2023 15:54:49 +0800</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/git-merging-within-devops-pipelines/</guid>
      <description>&lt;p&gt;Azure DevOps pipelines have a self-checkout feature when running a step in a pipeline which automatically runs &lt;code&gt;git checkout&lt;/code&gt; on the repository you&amp;rsquo;re running against. This generally works fine, however you may experience errors when trying to perform operations such as &lt;code&gt;git merge&lt;/code&gt; which aren&amp;rsquo;t reproducible locally.&lt;/p&gt;&#xA;&lt;p&gt;The errors I experienced were when running &lt;code&gt;--ff-only&lt;/code&gt; merges&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;fatal: refusing to merge unrelated histories&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you supply &lt;code&gt;--allow-unrelated-histories&lt;/code&gt;, then &lt;code&gt;git&lt;/code&gt; errors out with&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Azure DevOps pipelines have a self-checkout feature when running a step in a pipeline which automatically runs <code>git checkout</code> on the repository you&rsquo;re running against. This generally works fine, however you may experience errors when trying to perform operations such as <code>git merge</code> which aren&rsquo;t reproducible locally.</p>
<p>The errors I experienced were when running <code>--ff-only</code> merges</p>
<p><code>fatal: refusing to merge unrelated histories</code></p>
<p>If you supply <code>--allow-unrelated-histories</code>, then <code>git</code> errors out with</p>
<p><code>fatal: Not possible to fast-forward, aborting.</code></p>
<p>To resolve this, I set <code>fetchDepth</code> to <code>0</code> in the <code>checkout</code> step which ensured all commits were fetched and <code>git</code> could perform the merge operation.</p>
<p>The relevant documentation on shallow fetching is available at <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines#shallow-fetch">https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines#shallow-fetch</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>How Can I Determine the Default Windows Script Host? (2023 edition)</title>
      <link>https://hull.au/blog/determine-default-script-host-2023/</link>
      <pubDate>Thu, 06 Apr 2023 07:10:01 +0000</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/determine-default-script-host-2023/</guid>
      <description>&lt;p&gt;If you search for this topic today, you&amp;rsquo;ll find &lt;a href=&#34;https://devblogs.microsoft.com/scripting/how-can-i-determine-the-default-script-host-on-a-computer-before-i-run-a-script/&#34;&gt;a post&lt;/a&gt; from 2006 on the &amp;ldquo;Scripting Guy&amp;rdquo; blog that contains some information on how to query the registry key to figure out the default scripting host. Great!&lt;/p&gt;&#xA;&lt;h1 id=&#34;except-its-wrong&#34;&gt;Except it&amp;rsquo;s wrong&lt;/h1&gt;&#xA;&lt;p&gt;To be fair to Scripting Guy, he was correct when he wrote that article, but the change in this behaviour is one of the lesser known exciting features of Windows Vista.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>If you search for this topic today, you&rsquo;ll find <a href="https://devblogs.microsoft.com/scripting/how-can-i-determine-the-default-script-host-on-a-computer-before-i-run-a-script/">a post</a> from 2006 on the &ldquo;Scripting Guy&rdquo; blog that contains some information on how to query the registry key to figure out the default scripting host. Great!</p>
<h1 id="except-its-wrong">Except it&rsquo;s wrong</h1>
<p>To be fair to Scripting Guy, he was correct when he wrote that article, but the change in this behaviour is one of the lesser known exciting features of Windows Vista.</p>
<h1 id="so-how-does-it-work-now">So, how does it work now?</h1>
<p>Through the magic of <code>procmon</code>, we can figure out what changes are taking place when we change the script host</p>
<p><img alt="Screenshot of procmon" src="/images/procmon.png"></p>
<p>Et voilà!</p>
<p>Here&rsquo;s a PowerShell snippet for querying this value</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">(</span><span class="nb">Get-ItemProperty</span> <span class="n">registry</span><span class="p">::</span><span class="n">HKEY_CLASSES_ROOT</span><span class="p">\</span><span class="n">VBSFile</span><span class="p">\</span><span class="n">Shell</span><span class="p">).</span><span class="s1">&#39;(Default)&#39;</span></span></span></code></pre></div><p><code>Open</code> means WScript, <code>Open2</code> means CScript.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Configure NetBox OIDC SSO with Authentik</title>
      <link>https://hull.au/blog/netbox-authentik-oidc-sso/</link>
      <pubDate>Fri, 24 Feb 2023 14:23:10 +0000</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/netbox-authentik-oidc-sso/</guid>
      <description>&lt;p&gt;In the not-too-distant past, if you wanted SSO with NetBox, you had to configure reverse proxy authentication (e.g. using &lt;code&gt;auth_request&lt;/code&gt; in nginx or &lt;a href=&#34;https://oauth2-proxy.github.io/oauth2-proxy/&#34;&gt;oauth2-proxy&lt;/a&gt;) and pass in the user details using Remote-User headers. This solution works but, depending on your situation, could add quite a lot of complexity and potential pitfalls.&lt;/p&gt;&#xA;&lt;p&gt;NetBox 3.1 introduced support for SSO providers via python-social-auth which is fantastic, but integrating this into Authentik was an absolute pain so here&amp;rsquo;s how I got it working to save you the trouble.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>In the not-too-distant past, if you wanted SSO with NetBox, you had to configure reverse proxy authentication (e.g. using <code>auth_request</code> in nginx or <a href="https://oauth2-proxy.github.io/oauth2-proxy/">oauth2-proxy</a>) and pass in the user details using Remote-User headers. This solution works but, depending on your situation, could add quite a lot of complexity and potential pitfalls.</p>
<p>NetBox 3.1 introduced support for SSO providers via python-social-auth which is fantastic, but integrating this into Authentik was an absolute pain so here&rsquo;s how I got it working to save you the trouble.</p>
<h2 id="create-your-oidc-provider">Create your OIDC Provider</h2>
<ol>
<li>Click on Applications -&gt; Providers in the Authentik admin UI
<img alt="Authentik Providers menu" src="/images/provider-step1.png"></li>
<li>Click create and select OAuth2/OpenID Provider
<img alt="Authentik provider wizard" src="/images/provider-step2.png"></li>
<li>Give it a meaningful name, I would usually name something like this &ldquo;NetBox OIDC&rdquo;</li>
<li>Select an authorization flow, if you&rsquo;re relatively new and are using the out-of-the-box flows, the implicit consent flow is likely what you want</li>
<li>Leave Client type set to Confidential</li>
<li>Note down the client ID and secret
<img alt="Authentik provider wizard step 2" src="/images/provider-step3.png"></li>
<li>(Optional) I would recommend raising the access code and token validity in the Advanced settings as the defaults are rather aggressive
<img alt="Authentik provider wizard advanced" src="/images/provider-step4.png"></li>
</ol>
<h2 id="create-the-application-in-authentik">Create the application in Authentik</h2>
<ol>
<li>Click on Applications -&gt; Applications in the Authentik admin UI</li>
<li>Click on Create and name your application</li>
<li>Note down the slug you use or at least make it something simple (like &ldquo;netbox&rdquo;)</li>
<li>Associate it with the provider you created just before</li>
<li>(Optional) You can grab an SVG of the NetBox logo <a href="/images/netbox_logo.svg">here</a>
<img alt="Authentik create application" src="/images/application-step1.png"></li>
</ol>
<h2 id="configure-netbox">Configure NetBox</h2>
<p>For the sake of adding some background, the python-social-auth library is dependant on a component called <a href="https://github.com/python-social-auth/social-core">social-core</a> which is where the actual social backends live. There is no proper implementation of the Authentik backend but it does offer a generic OIDC backend (<a href="https://github.com/python-social-auth/social-core/blob/master/social_core/backends/open_id_connect.py">source</a>) that we can take advantage of.</p>
<p>Caveat emptor: The SSO link will appear as &ldquo;oidc&rdquo; on the NetBox login page because the generic OIDC backend has this baked in as its name. Aside from changing the source code or extending the class to create a proper Authentik implementation, I cannot see a way to change this.</p>
<p><img alt="NetBox login page with &lsquo;oidc&rsquo; link" src="/images/oidc.png"></p>
<ol>
<li>Open your NetBox <code>configuration.py</code> file in your editor of choice</li>
<li>Add the following lines</li>
</ol>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">REMOTE_AUTH_BACKEND</span> <span class="o">=</span> <span class="s1">&#39;social_core.backends.open_id_connect.OpenIdConnectAuth&#39;</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="n">SOCIAL_AUTH_OIDC_OIDC_ENDPOINT</span> <span class="o">=</span> <span class="s2">&#34;https://authentik.example.com/application/o/&lt;slug&gt;&#34;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="n">SOCIAL_AUTH_OIDC_KEY</span> <span class="o">=</span> <span class="s1">&#39;&lt;client ID&gt;&#39;</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="n">SOCIAL_AUTH_OIDC_SECRET</span> <span class="o">=</span> <span class="s1">&#39;&lt;secret&gt;&#39;</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="n">SOCIAL_AUTH_PROTECTED_USER_FIELDS</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;groups&#39;</span><span class="p">]</span> <span class="c1"># Workaround for an issue where social-auth would die with an error when signing in due to a bug. You will have to assign users to groups because of this.</span>
</span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="n">SOCIAL_AUTH_REDIRECT_IS_HTTPS</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># Forces HTTPS for redirect URIs. Handy if you&#39;re behind a proxy and the schema is wrong.</span></span></span></code></pre></div><ol start="3">
<li>Add <code>python-jose</code> to your <code>local_requirements.txt</code> file</li>
<li>Run <code>upgrade.sh</code> to ensure <code>python-jose</code> is installed</li>
<li>Restart NetBox</li>
</ol>
<h2 id="associating-existing-netbox-users-with-social-users">Associating existing NetBox users with social users</h2>
<p>When a social user logs in, an association is created in the database that ties their UID to the Django user. You can update these associations at <a href="https://netbox.example.com/admin/social_django/usersocialauth/">https://netbox.example.com/admin/social_django/usersocialauth/</a> for the purposes of connecting existing NetBox users with their OIDC sign in.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Samsung PM983 Compatibility Woes on VMware ESXi 7</title>
      <link>https://hull.au/blog/samsung-pm983-esxi-7-compatibility/</link>
      <pubDate>Fri, 24 Feb 2023 13:57:32 +0000</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/samsung-pm983-esxi-7-compatibility/</guid>
      <description>&lt;p&gt;I picked up a Samsung PM983 from eBay for a price that was a little too good. What could go wrong? Turns out these things aren&amp;rsquo;t the easiest to get running with modern versions of ESXi and this likely influenced the price in my favour.&lt;/p&gt;&#xA;&lt;p&gt;These SSDs have a variety of different firmwares, you cannot obtain new firmware from Samsung and as a result, you may have issues running the latest builds of ESXi 7.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I picked up a Samsung PM983 from eBay for a price that was a little too good. What could go wrong? Turns out these things aren&rsquo;t the easiest to get running with modern versions of ESXi and this likely influenced the price in my favour.</p>
<p>These SSDs have a variety of different firmwares, you cannot obtain new firmware from Samsung and as a result, you may have issues running the latest builds of ESXi 7.</p>
<h2 id="how-can-i-workaround-this">How can I workaround this?</h2>
<ol>
<li>Consult the <a href="https://www.vmware.com/go/hcl">VMware HCL</a> to figure out what version of ESXi your drive will work on</li>
<li>Grab the NVMe VIB from <a href="https://esxi-patches.v-front.de/">here</a> for your supported version</li>
<li>Install the VIB over the top of the existing NVMe VIB
<img alt="VIB page" src="/images/esxi-packages.png"></li>
<li>Reboot for the changes to take effect</li>
</ol>
<h2 id="but-im-booting-from-the-nvme-drive"><em>But I&rsquo;m booting from the NVMe drive!</em></h2>
<p>It&rsquo;s possible to make a custom ESXi installer with your own VIBs loaded or alternatively you could install onto a USB (unsupported in 8), load a working VIB then migrate your install to the NVMe device using <code>dd</code>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Windows 10 LTSC 2021 / 21H2 OOBE Requiring Internet Connection on 2nd Hand Laptop</title>
      <link>https://hull.au/blog/ltsc-21h2-connect-to-internet/</link>
      <pubDate>Fri, 24 Feb 2023 12:52:15 +0000</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/blog/ltsc-21h2-connect-to-internet/</guid>
      <description>&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;&#xA;&lt;p&gt;Recently I successfully bid on a laptop that was recycled by one of the large mining companies, normally these come wiped clean and this one was no exception.&#xA;I went to install Windows 10 LTSC 2021 and as I progressed through the OOBE, something strange happened.&lt;/p&gt;&#xA;&lt;h2 id=&#34;there-is-no-option-to-setup-offline&#34;&gt;There is no option to setup offline&lt;/h2&gt;&#xA;&lt;p&gt;Normally you can yank the network cord and setup the machine completely offline with a local account. This one absolutely refused to let me do this in a manner I had never seen before.&#xA;Its setup was reminiscent of the absolute hell that is the Windows 11 OOBE.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="background">Background</h2>
<p>Recently I successfully bid on a laptop that was recycled by one of the large mining companies, normally these come wiped clean and this one was no exception.
I went to install Windows 10 LTSC 2021 and as I progressed through the OOBE, something strange happened.</p>
<h2 id="there-is-no-option-to-setup-offline">There is no option to setup offline</h2>
<p>Normally you can yank the network cord and setup the machine completely offline with a local account. This one absolutely refused to let me do this in a manner I had never seen before.
Its setup was reminiscent of the absolute hell that is the Windows 11 OOBE.</p>
<h2 id="why">Why?</h2>
<p>It turns out this machine was previously enrolled in Intune and had some flag set (probably in the ACPI tables) that changed the OOBE&rsquo;s behaviour to require an Internet connection to proceed.</p>
<p>After connecting the Internet, it ran through Autopilot whereupon it became apparent that Rio Tinto had not removed the machine from their directory and suddenly I was staring at their logon page.</p>
<p><img alt="Photo of the laptop after Autopilot" src="/images/rio-tinto.jpg"></p>
<h2 id="howd-you-get-around-it">How&rsquo;d you get around it?</h2>
<p>The trick here is to try and get past the OOBE without connecting to the Internet, otherwise Autopilot will run and you&rsquo;ll be forced to reinstall.</p>
<p>The easiest way to achieve this is to setup an unattend.xml file that skips the OOBE altogether.
In this case, I let Rufus create an unattend.xml file (it&rsquo;ll prompt you when creating the USB stick, I told it to create a local account) and added some extra properties to the <code>&lt;OOBE&gt;</code> section.</p>
<p>You&rsquo;ll find the unattend.xml file in \sources\$OEM$\$$\Panther</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="ln">1</span><span class="cl"><span class="nt">&lt;HideEULAPage&gt;</span>true<span class="nt">&lt;/HideEULAPage&gt;</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="nt">&lt;HideOEMRegistrationScreen&gt;</span>true<span class="nt">&lt;/HideOEMRegistrationScreen&gt;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nt">&lt;HideWirelessSetupInOOBE&gt;</span>true<span class="nt">&lt;/HideWirelessSetupInOOBE&gt;</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="nt">&lt;HideOnlineAccountScreens&gt;</span>true<span class="nt">&lt;/HideOnlineAccountScreens&gt;</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="nt">&lt;SkipMachineOOBE&gt;</span>true<span class="nt">&lt;/SkipMachineOOBE&gt;</span></span></span></code></pre></div>]]></content:encoded>
    </item>
    <item>
      <title></title>
      <link>https://hull.au/contact/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>webmaster@hull.au (Admin)</author>
      <guid>https://hull.au/contact/</guid>
      <description>&lt;p&gt;You may contact me by e-mailing webmaster at this domain.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>You may contact me by e-mailing webmaster at this domain.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
