<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0"><channel><title>djismgaming&apos;s tech home | Blog</title><description>Web home for tech things!</description><link>https://djismgaming.github.io/</link><language>en</language><fh:complete/><atom:link rel="self" href="https://djismgaming.github.io/blog/rss.xml"/><item><title>Installing Microsoft Edit in Debian or Ubuntu based distros</title><link>https://djismgaming.github.io/blog/installing-microsoft-edit-debian-ubuntu/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/installing-microsoft-edit-debian-ubuntu/</guid><pubDate>Mon, 25 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Microsoft Edit provides terminal editing with full mouse and copy-paste support.&lt;/p&gt;
&lt;p&gt;???+ note
The current version of Edit (1.2.0) is not available via the package manager &lt;code dir=&quot;auto&quot;&gt;apt&lt;/code&gt; yet. This could change at some point in the future, making for an easier deployment.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;install-pre-requisites&quot;&gt;Install pre-requisites&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Install &lt;code dir=&quot;auto&quot;&gt;zstd&lt;/code&gt;, needed to decompress the downloaded archive:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;sudo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;apt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;install&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;zstd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 id=&quot;install-the-latest-edit-version-from-github-for-x86_64&quot;&gt;Install the latest Edit version from GitHub for x86_64&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Download and install the latest release:
EDIT_VERSION=$(curl -s “&lt;a href=&quot;https://api.github.com/repos/microsoft/edit/releases/latest&quot;&gt;https://api.github.com/repos/microsoft/edit/releases/latest&lt;/a&gt;” | grep -Po ‘“tag_name”: “v\K[0-9.]+’)
wget -qO edit.tar.zst &lt;a href=&quot;https://github.com/microsoft/edit/releases/latest/download/edit-$EDIT_VERSION-x86_64-linux-gnu.tar.zst&quot;&gt;https://github.com/microsoft/edit/releases/latest/download/edit-$EDIT_VERSION-x86_64-linux-gnu.tar.zst&lt;/a&gt;
sudo tar xf edit.tar.zst -C /usr/local/bin edit
edit –version
rm -rf edit.tar.zst&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;The commands above can be turned into a script for repeat installs.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
</content:encoded><category>development</category><category>git</category><category>linux</category></item><item><title>Install glances and keep it running for showing gethomepage.dev system stats</title><link>https://djismgaming.github.io/blog/install-glances-gethomepage-stats/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/install-glances-gethomepage-stats/</guid><pubDate>Sun, 04 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h1 id=&quot;install-glances-and-keep-it-running-for-showing-gethomepagedev-system-stats&quot;&gt;Install glances and keep it running for showing gethomepage.dev system stats&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;This guide makes the &lt;code dir=&quot;auto&quot;&gt;glances&lt;/code&gt; application run in the background on every reboot and provide the necessary metrics for homepage.&lt;/p&gt;
&lt;p&gt;Install pip:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;sudo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;apt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;install&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;python3-pip&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Install glances with pip for this user:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;pip&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;install&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--user&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&apos;&lt;/span&gt;&lt;span&gt;glances[web]&lt;/span&gt;&lt;span&gt;&apos;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Re-source the &lt;code dir=&quot;auto&quot;&gt;.profile&lt;/code&gt; so the &lt;code dir=&quot;auto&quot;&gt;glances&lt;/code&gt; executable is available in the current environment:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;source&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;~/.profile&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Update the crontab to run glances at startup without web UI but able to share system metrics (no web UI to make it more efficient):&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# this goes in crontab&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;@reboot&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/home/ismael/.local/bin/glances&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-w&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--disable-webui&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;After a reboot, glances runs automatically on every boot. Works well in an LXC container.&lt;/p&gt;
&lt;p&gt;Create the &lt;code dir=&quot;auto&quot;&gt;services.yaml&lt;/code&gt; entry for gethomepage.dev to show server root usage stats:&lt;/p&gt;
&lt;p&gt;???+ note
Several strings in this YAML need customization. See &lt;a href=&quot;https://gethomepage.dev/widgets/services/glances/&quot;&gt;https://gethomepage.dev/widgets/services/glances/&lt;/a&gt; for the specifics on the Glances widget.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- &lt;/span&gt;&lt;span&gt;Docker&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;- &lt;/span&gt;&lt;span&gt;mini-docker&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;icon&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;docker.png&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;widgets&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;- &lt;/span&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;glances&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;              &lt;/span&gt;&lt;span&gt;url&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;http://&amp;#x3C;IP of server&gt;:61208&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;              &lt;/span&gt;&lt;span&gt;version&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;# main version of glances used&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;              &lt;/span&gt;&lt;span&gt;metric&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;fs:/&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;# showing root usage&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The result should look like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;mini-docker glances widget&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;444&quot; height=&quot;171&quot; src=&quot;https://djismgaming.github.io/_astro/mini-docker-glances-widget.DpQPSWhS_Z1RIvvE.webp&quot; srcset=&quot;&quot;&gt;&lt;/p&gt;
</content:encoded><category>metrics</category><category>status</category><category>glances</category><category>cron</category></item><item><title>iGPU GVT-g Split Passthrough</title><link>https://djismgaming.github.io/blog/igpu-gvt-g-split-passthrough/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/igpu-gvt-g-split-passthrough/</guid><description>Proxmox iGPU GVT-g split passthrough to VM configuration for hardware acceleration.</description><pubDate>Sun, 16 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h1 id=&quot;igpu-gvt-g-split-passthrough-intel-integrated-graphics&quot;&gt;iGPU GVT-g Split Passthrough (Intel Integrated Graphics)&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;Original guide: &lt;a href=&quot;https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-split-passthrough/&quot;&gt;https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-split-passthrough/&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Intel Integrated Graphics (iGPU) is a GPU that is integrated into the CPU. The GPU is a part of the CPU and is used to render graphics. Proxmox may be configured to use iGPU split passthrough to VM to allow the VM to use the iGPU for hardware acceleration for example using video encoding/decoding and Transcoding for series like [Plex][plex-url], [Emby][emby-url] and [Jellyfin][jellyfin-url].  This guide will show you how to configure Proxmox to use iGPU passthrough to VM.&lt;/p&gt;
&lt;p&gt;!!! Warning “”&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;**Your mileage may vary depending on your hardware. The following guide was tested with Intel Gen8 CPU.**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;!!! Failure “Supported CPUs”&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;`iGPU GVT-g Split Passthrough` is supported only on Intel&apos;s **5th generation to 10th generation** CPUs!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Known supported CPU families:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- **Broadwell**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- **Skylake**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- **Kaby Lake**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- **Coffee Lake**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;- **Comet Lake**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;There are two ways to use iGPU passthrough to VM. The first way is to use the &lt;code dir=&quot;auto&quot;&gt;Full iGPU Passthrough&lt;/code&gt; to VM. The second way is to use the &lt;code dir=&quot;auto&quot;&gt;iGPU GVT-g&lt;/code&gt; technology which allows as to split the iGPU into two parts. We will be covering the &lt;code dir=&quot;auto&quot;&gt;Split iGPU Passthrough&lt;/code&gt;. If you want to use the split &lt;code dir=&quot;auto&quot;&gt;Full iGPU Passthrough&lt;/code&gt; you can find the guide [here][igpu-full-passthrough-url].&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;proxmox-configuration-for-gvt-g-split-passthrough&quot;&gt;Proxmox Configuration for GVT-g Split Passthrough&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The following examples uses &lt;code dir=&quot;auto&quot;&gt;SSH&lt;/code&gt; connection to the Proxmox server. The editor is &lt;code dir=&quot;auto&quot;&gt;nano&lt;/code&gt; but feel free to use any other editor.
We will be editing the &lt;code dir=&quot;auto&quot;&gt;grub&lt;/code&gt; configuration file.&lt;/p&gt;
&lt;p&gt;Edit the &lt;code dir=&quot;auto&quot;&gt;grub&lt;/code&gt; configuration file.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;nano&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/etc/default/grub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Find the line that starts with &lt;code dir=&quot;auto&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/code&gt; by default they should look like this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;quiet&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;We want to allow &lt;code dir=&quot;auto&quot;&gt;passthrough&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;Blacklists&lt;/code&gt; known graphics drivers to prevent proxmox from utilizing the iGPU.&lt;/p&gt;
&lt;p&gt;Your &lt;code dir=&quot;auto&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/code&gt; should look like this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;quiet intel_iommu=on i915.enable_gvt=1 iommu=pt pcie_acs_override=downstream,multifunction video=efifb:off video=vesa:off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;!!! Note&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;This will blacklist most of the graphics drivers from proxmox. If you have a specific driver you need to use for Proxmox Host you need to remove it from `modprobe.blacklist`&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Save and exit the editor.&lt;/p&gt;
&lt;p&gt;Update the grub configuration to apply the changes the next time the system boots.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;update-grub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Next we need to add &lt;code dir=&quot;auto&quot;&gt;vfio&lt;/code&gt; modules to allow PCI passthrough.&lt;/p&gt;
&lt;p&gt;Edit the &lt;code dir=&quot;auto&quot;&gt;/etc/modules&lt;/code&gt; file.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;nano&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/etc/modules&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Add the following line to the end of the file:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Modules required for PCI passthrough&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;vfio&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;vfio_iommu_type1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;vfio_pci&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;vfio_virqfd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Modules required for Intel GVT-g Split&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;kvmgt&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Save and exit the editor.&lt;/p&gt;
&lt;p&gt;Update configuration changes made in your /etc filesystem&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;update-initramfs&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-u&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-k&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;all&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Reboot Proxmox to apply the changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Verify that IOMMU is enabled&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;dmesg&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;grep&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-e&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DMAR&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-e&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;IOMMU&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;There should be a line that looks like &lt;code dir=&quot;auto&quot;&gt;DMAR: IOMMU enabled&lt;/code&gt;. If there is no output, something is wrong.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[0.000000] Warning: PCIe ACS overrides enabled; &lt;/span&gt;&lt;span&gt;This&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;may&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;allow&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;non-IOMMU&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;protected&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;peer-to-peer&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DMA&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[0.067203] DMAR: IOMMU enabled&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[2.573920] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[2.580393] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[2.581776] perf/amd_iommu: Detected AMD IOMMU &lt;/span&gt;&lt;span&gt;#0 (2 banks, 4 counters/bank).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 id=&quot;windows-virtual-machine-igpu-passthrough-configuration&quot;&gt;Windows Virtual Machine iGPU Passthrough Configuration&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;For better results its recommend to use this [Windows 10/11 Virtual Machine configuration for proxmox][windows-vm-configuration-url].&lt;/p&gt;
&lt;p&gt;Find the PCI address of the iGPU.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-nnv&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;grep&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This should result in output similar to this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;00:02.0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;controller&lt;/span&gt;&lt;span&gt; [0300]: Intel Corporation CometLake-S GT2 [UHD Graphics 630] [8086:3e92] (&lt;/span&gt;&lt;span&gt;prog-if&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;00&lt;/span&gt;&lt;span&gt; [VGA &lt;/span&gt;&lt;span&gt;controller]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If you have multiple VGA, look for the one that has the &lt;code dir=&quot;auto&quot;&gt;Intel&lt;/code&gt; in the name.&lt;/p&gt;
&lt;p&gt;Here, the PCI address of the iGPU is &lt;code dir=&quot;auto&quot;&gt;00:02.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For best performance the VM should be configured the &lt;code dir=&quot;auto&quot;&gt;Machine&lt;/code&gt; type to ==q35==.&lt;br&gt;
This will allow the VM to utilize PCI-Express passthrough.&lt;/p&gt;
&lt;p&gt;Open the web gui and navigate to the &lt;code dir=&quot;auto&quot;&gt;Hardware&lt;/code&gt; tab of the VM you want to add a vGPU.&lt;br&gt;
Click &lt;code dir=&quot;auto&quot;&gt;Add&lt;/code&gt; above the device list and then choose &lt;code dir=&quot;auto&quot;&gt;PCI Device&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Open the &lt;code dir=&quot;auto&quot;&gt;Device&lt;/code&gt; dropdown and select the iGPU, which you can find using it’s PCI address. This list uses a different format for the PCI addresses id, &lt;code dir=&quot;auto&quot;&gt;00:02.0&lt;/code&gt; is listed as &lt;code dir=&quot;auto&quot;&gt;0000:00:02.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Click &lt;code dir=&quot;auto&quot;&gt;Mdev Type&lt;/code&gt;, You should be presented with a list of the available split passthrough devices choose the better performing one for the vm.&lt;/p&gt;
&lt;p&gt;Select &lt;code dir=&quot;auto&quot;&gt;ROM-Bar&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;PCI-Express&lt;/code&gt; and then click &lt;code dir=&quot;auto&quot;&gt;Add&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The Windows Virtual Machine Proxmox Setting should look like this:&lt;/p&gt;
&lt;p&gt;Power on the Windows Virtual Machine.&lt;/p&gt;
&lt;p&gt;Open the VM’s Console.
Install the latest version of [Intel’s Graphics Driver][intel-gpu-drivers-url]{target=_blank} or use the [Intel Driver &amp;#x26; Support Assistant][intel-driver-and-support-assistant-url]{target=_blank} installer.&lt;/p&gt;
&lt;p&gt;If all when well you should see the following output in &lt;code dir=&quot;auto&quot;&gt;Device Manager&lt;/code&gt; and [GPU-Z][gpu-z-url]{target=_blank}:&lt;/p&gt;
&lt;p&gt;That’s it! You should now be able to use the iGPU for hardware acceleration inside the VM and still have proxmox’s output on the screen.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;linux-virtual-machine-igpu-passthrough-configuration&quot;&gt;Linux Virtual Machine iGPU Passthrough Configuration&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;We will be using Ubuntu Server 20.04 LTS for this guide.&lt;/p&gt;
&lt;p&gt;From Proxmox Terminal find the PCI address of the iGPU.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-nnv&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;grep&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This should result in output similar to this:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;00:02.0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;controller&lt;/span&gt;&lt;span&gt; [0300]: Intel Corporation CometLake-S GT2 [UHD Graphics 630] [8086:3e92] (&lt;/span&gt;&lt;span&gt;prog-if&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;00&lt;/span&gt;&lt;span&gt; [VGA &lt;/span&gt;&lt;span&gt;controller]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If you have multiple VGA, look for the one that has the &lt;code dir=&quot;auto&quot;&gt;Intel&lt;/code&gt; in the name.&lt;/p&gt;
&lt;p&gt;![Proxmox lspci vga][proxmox-lspci-vga-img]&lt;/p&gt;
&lt;p&gt;Here, the PCI address of the iGPU is &lt;code dir=&quot;auto&quot;&gt;00:02.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;VM should be configured the &lt;code dir=&quot;auto&quot;&gt;Machine&lt;/code&gt; type to ==i440fx==.&lt;br&gt;
Open the web gui and navigate to the &lt;code dir=&quot;auto&quot;&gt;Hardware&lt;/code&gt; tab of the VM you want to add a vGPU to.&lt;br&gt;
Click &lt;code dir=&quot;auto&quot;&gt;Add&lt;/code&gt; above the device list and then choose &lt;code dir=&quot;auto&quot;&gt;PCI Device&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;![Ubuntu VM Add PCI Device][ubuntu-vm-add-pci-device-img]&lt;/p&gt;
&lt;p&gt;Open the &lt;code dir=&quot;auto&quot;&gt;Device&lt;/code&gt; dropdown and select the iGPU, which you can find using it’s PCI address. This list uses a different format for the PCI addresses id, &lt;code dir=&quot;auto&quot;&gt;00:02.0&lt;/code&gt; is listed as &lt;code dir=&quot;auto&quot;&gt;0000:00:02.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;![Add iGPU MDev to VM][general-add-igpu-mdev-to-vm-img]&lt;/p&gt;
&lt;p&gt;Click &lt;code dir=&quot;auto&quot;&gt;Mdev Type&lt;/code&gt;, You should be presented with a list of the available split passthrough devices choose the better performing one for the vm.&lt;/p&gt;
&lt;p&gt;Select &lt;code dir=&quot;auto&quot;&gt;ROM-Bar&lt;/code&gt;, and then click &lt;code dir=&quot;auto&quot;&gt;Add&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The Ubuntu Virtual Machine Proxmox Setting should look like this:&lt;/p&gt;
&lt;p&gt;Boot the VM. To test the iGPU passthrough was successful, you can use the following command:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sudo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-nnv&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;grep&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The output should incliude the Intel iGPU:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;00:10.0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VGA&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;controller&lt;/span&gt;&lt;span&gt; [0300]: Intel Corporation UHD Graphics 630 (&lt;/span&gt;&lt;span&gt;Desktop&lt;/span&gt;&lt;span&gt;) [8086:3e92] (&lt;/span&gt;&lt;span&gt;prog-if&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;00&lt;/span&gt;&lt;span&gt; [VGA &lt;/span&gt;&lt;span&gt;controller]&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Now we need to check if the GPU’s Driver initalization is working.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;cd&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/dev/dri&lt;/span&gt;&lt;span&gt; &amp;#x26;&amp;#x26; &lt;/span&gt;&lt;span&gt;ls&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-la&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The output should incliude the &lt;code dir=&quot;auto&quot;&gt;renderD128&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That’s it! You should now be able to use the iGPU for hardware acceleration inside the VM and still have proxmox’s output on the screen.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;debug&quot;&gt;Debug&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Dbug Messages - Shows Hardware initialization and errors&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;dmesg&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-w&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Display PCI devices information&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Display Driver in use for PCI devices&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-k&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Display IOMMU Groups the PCI devices are assigned to&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#!/bin/bash&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;shopt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-s&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nullglob&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;g&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span&gt; $(&lt;/span&gt;&lt;span&gt;find&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/sys/kernel/iommu_groups/&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-maxdepth&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-type&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;d&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sort&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-V&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;span&gt;do&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;echo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;IOMMU Group ${&lt;/span&gt;&lt;span&gt;g&lt;/span&gt;&lt;span&gt;##*/&lt;/span&gt;&lt;span&gt;}:&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;d&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;$g&lt;/span&gt;&lt;span&gt;/devices/*&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;do&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;echo&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-e&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;\t$(&lt;/span&gt;&lt;span&gt;lspci&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-nns&lt;/span&gt;&lt;span&gt; ${&lt;/span&gt;&lt;span&gt;d&lt;/span&gt;&lt;span&gt;##*/&lt;/span&gt;&lt;span&gt;})&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;done&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;done&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
</content:encoded><category>proxmox</category><category>igpu</category><category>passthrough</category></item><item><title>Auto-update the Windows hosts file with a hosted list</title><link>https://djismgaming.github.io/blog/windows-hosts-file-auto-update/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/windows-hosts-file-auto-update/</guid><pubDate>Mon, 06 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h2 id=&quot;why-do-this&quot;&gt;Why do this&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;There are many reasons to do this, or to use an application like the one shared here. For example, an application that phones home may need testing for its behavior when it loses connection with an URL, or a system needs to be kept from accessing unsecure sites/services online.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;where-to-get-hostctl-from&quot;&gt;Where to get hostctl from&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;hostctl’s GitHub page: &lt;a href=&quot;https://github.com/guumaster/hostctl&quot;&gt;https://github.com/guumaster/hostctl&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;how-to-use-hostctl&quot;&gt;How to use hostctl&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Here is a simple example to use this app to update the hosts file with a hosted list on a specific URL.&lt;/p&gt;
&lt;p&gt;!!! info inline end “Remember”
This application works in multiple OSs. I’m just showing how to use it on Windows as an example.&lt;/p&gt;
&lt;p&gt;Domains list Example URL: &lt;a href=&quot;https://listwebsite.local/list.txt&quot;&gt;https://listwebsite.local/list.txt&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Put the executable in a directory covered by your PATH variable.&lt;/li&gt;
&lt;li&gt;Execute something like the following&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;hostctl add &lt;/span&gt;&lt;span&gt;&amp;#x3C;&lt;/span&gt;&lt;span&gt;myprofilename&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-f&lt;/span&gt;&lt;span&gt; https:&lt;/span&gt;&lt;span&gt;//&lt;/span&gt;&lt;span&gt;listwebsite.local&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt;list.txt&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;The executable will create a profile called &lt;code dir=&quot;auto&quot;&gt;myprofilename&lt;/code&gt; inside the hosts file. That is to keep additions separate from the default/manually entered ones already in the hosts file.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This application can be used to perform backups and restores of the hosts file too. More about it can be found in the documentation at: &lt;a href=&quot;https://guumaster.github.io/hostctl/&quot;&gt;https://guumaster.github.io/hostctl/&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>windows</category></item><item><title>Fixing the GOG Galaxy 2.0 Ubisoft Connect plugin connection</title><link>https://djismgaming.github.io/blog/gog-galaxy-ubisoft-connect-plugin/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/gog-galaxy-ubisoft-connect-plugin/</guid><pubDate>Fri, 13 Dec 2024 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h2 id=&quot;the-issue&quot;&gt;The issue&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Upon connecting the GOG Galaxy client to Ubisoft Connect, it goes into a disconnected state again. This happens just seconds after signing in to the Ubisoft Connect account using the plugin’s login.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;how-to-fix-the-issue&quot;&gt;How to fix the issue&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;???+ note
This seems to be an open issue in the GitHub repo referenced below. A definitive solution has not been found as this method needs to be re-applied from time to time.&lt;/p&gt;
&lt;p&gt;A solution shared on a Reddit post applies here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://www.reddit.com/r/gog/comments/pjsdph/comment/htsh140/?utm_source=share&amp;#x26;utm_medium=web3x&amp;#x26;utm_name=web3xcss&amp;#x26;utm_term=1&amp;#x26;utm_content=share_button&quot;&gt;Not able to connect my ubisoft connect with GoG galaxy&lt;/a&gt;&lt;br&gt;
by&lt;a href=&quot;https://www.reddit.com/user/ved7108/&quot;&gt;u/ved7108&lt;/a&gt; in&lt;a href=&quot;https://www.reddit.com/r/gog/&quot;&gt;gog&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And this is also shared in this GitHub issue:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/FriendsOfGalaxy/galaxy-integration-uplay/issues/33#issuecomment-1444362239&quot;&gt;https://github.com/FriendsOfGalaxy/galaxy-integration-uplay/issues/33#issuecomment-1444362239&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The basics are here for reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click on the “Connect” button in the Ubisoft Connect integration settings on GOG Galaxy&lt;/li&gt;
&lt;li&gt;Upon getting the screen, copy the (1) &lt;code dir=&quot;auto&quot;&gt;appId&lt;/code&gt; and (2) &lt;code dir=&quot;auto&quot;&gt;genomeId&lt;/code&gt; values from the pop-up URL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt=&quot;Ubisoft login screen&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;943&quot; height=&quot;352&quot; src=&quot;https://djismgaming.github.io/_astro/ubisoft-connect-login.ZbhObvOG_Z1Ertw4.webp&quot; srcset=&quot;&quot;&gt;
/// caption
Image showing the necessary values to copy from the login URL
///&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modify the file &lt;code dir=&quot;auto&quot;&gt;%localappdata%\GOG.com\Galaxy\plugins\installed\uplay_afb5a69c-b2ee-4d58-b916-f4cd75d4999a\consts.py&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;If using VSCode, you can just execute in a powershell shell this command&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;code &lt;/span&gt;&lt;span&gt;%&lt;/span&gt;&lt;span&gt;localappdata&lt;/span&gt;&lt;span&gt;%&lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;span&gt;GOG.com&lt;/span&gt;&lt;span&gt;\Galaxy\plugins\installed\uplay_afb5a69c&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;b2ee&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;4d58&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;b916&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;f4cd75d4999a\consts.py&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Find the lines shown below and replace the values with the ones you got from the Ubisoft Connect login screen&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;CLUB_APPID = &quot;f35adcb5-1911-440c-b1c9-48fdc1701c68&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;CLUB_GENOME_ID = &quot;5b36b900-65d8-47f3-93c8-86bdaa48ab50&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Save the file and log in on the Ubisoft Connect login screen&lt;/li&gt;
&lt;li&gt;The client should now stay connected, as shown below&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;!!! info inline end “Remember”
Remember that this fix, so far, needs to be re-applied if Ubisoft changes the values on their side&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;GOG Galaxy Integration Settings&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;792&quot; height=&quot;576&quot; src=&quot;https://djismgaming.github.io/_astro/gog-galaxy-integrations-settings.HIDqJL5e_YrQTX.webp&quot; srcset=&quot;&quot;&gt;
/// caption
Image showing a working connection to Ubisoft Connect after a successful file modification
///&lt;/p&gt;
</content:encoded><category>gaming</category><category>development</category><category>python</category></item><item><title>Run a PowerShell ps1 script hidden from view and scheduled on Task Scheduler for Windows</title><link>https://djismgaming.github.io/blog/powershell-hidden-script-task-scheduler/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/powershell-hidden-script-task-scheduler/</guid><pubDate>Fri, 29 Nov 2024 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h2 id=&quot;the-script-launcher&quot;&gt;The script launcher&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;PowerShell scripts run in a visible window by default. To run one completely hidden, launch it through a &lt;code dir=&quot;auto&quot;&gt;.vbs&lt;/code&gt; script executed by &lt;code dir=&quot;auto&quot;&gt;wscript&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Set up the scheduled task like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Task Scheduler
&lt;ul&gt;
&lt;li&gt;Action: Start a program&lt;/li&gt;
&lt;li&gt;Program/script: &lt;code dir=&quot;auto&quot;&gt;wscript&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add arguments (optional): &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;path\to\the\.vbs\file&gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code dir=&quot;auto&quot;&gt;.vbs&lt;/code&gt; launcher script:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;command = &quot;powershell.exe -ExecutionPolicy Bypass C:\path\to\script.ps1&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;set shell = CreateObject(&quot;WScript.Shell&quot;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;shell.Run command,0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
</content:encoded><category>windows</category><category>powershell</category></item><item><title>ntfy notifications from unRAID using curl</title><link>https://djismgaming.github.io/blog/ntfy-notifications-from-unraid/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/ntfy-notifications-from-unraid/</guid><pubDate>Mon, 28 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Send notifications from an unRAID server to &lt;a href=&quot;https://ntfy.sh/&quot;&gt;ntfy&lt;/a&gt; using &lt;code dir=&quot;auto&quot;&gt;curl&lt;/code&gt;. The example below notifies the result of a Docker image prune:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#!/bin/bash&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;docker&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;image&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;prune&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-af&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;tail&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;topicurl&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;https://ntfy.example.com/topic&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;curl&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--insecure&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;-d&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;$OUTPUT&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;-H&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;Title: Dangling images cleaned on $(&lt;/span&gt;&lt;span&gt;hostname&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;$topicurl&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
</content:encoded><category>ntfy</category></item><item><title>Mount an SMB share and use iGPU on an unprivileged Debian 12 LXC container in Proxmox</title><link>https://djismgaming.github.io/blog/proxmox-unprivileged-lxc-smb-igpu/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/proxmox-unprivileged-lxc-smb-igpu/</guid><pubDate>Thu, 08 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h2 id=&quot;procedure&quot;&gt;Procedure&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Prerequisites:&lt;/p&gt;
&lt;p&gt;Create an unprivileged Debian 12 LXC container.&lt;/p&gt;
&lt;p&gt;Inside the LXC container, use the &lt;code dir=&quot;auto&quot;&gt;root&lt;/code&gt; user to create a non-root user. In this example the user is added to the &lt;code dir=&quot;auto&quot;&gt;sudo&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;docker&lt;/code&gt; groups after installing Docker inside the LXC container.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;useradd&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-s&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/bin/bash&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-m&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-G&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sudo,docker&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Change the user password as needed.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;su&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;passwd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This user’s default &lt;code dir=&quot;auto&quot;&gt;UID:GID&lt;/code&gt; will be &lt;code dir=&quot;auto&quot;&gt;1000:1000&lt;/code&gt;. If not, create it with:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;useradd&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-u&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-g&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-m&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-s&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/bin/bash&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-G&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sudo,docker&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Take note of this &lt;code dir=&quot;auto&quot;&gt;UID:GID&lt;/code&gt; as it will be used to map the share in Proxmox. The share itself can live on another system; here an unRAID VM on the same host is used.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;smb-share&quot;&gt;SMB share&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;h4 id=&quot;on-the-proxmox-host&quot;&gt;On the Proxmox host&lt;/h4&gt;&lt;/div&gt;
&lt;p&gt;Create a user that can be mapped from the host to the LXC container. Without this step, the share ends up read-only inside the LXC container.&lt;/p&gt;
&lt;p&gt;Proxmox maps the users and groups from the host to the LXC containers starting at &lt;code dir=&quot;auto&quot;&gt;UID:GID&lt;/code&gt;=&lt;code dir=&quot;auto&quot;&gt;100000:100000&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The created &lt;code dir=&quot;auto&quot;&gt;ismael&lt;/code&gt; user then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inside the LXC container UID: &lt;em&gt;1000&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Inside the host UID: &lt;em&gt;101000&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Create a group on the host with GID=101000 that will own the directory created for the SMB share&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;groupadd&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-g&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;101000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Create the same user that will be used inside the LXC container but with the right &lt;code dir=&quot;auto&quot;&gt;UID:GID&lt;/code&gt; combination&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;useradd&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-u&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;101000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-g&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;101000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-m&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-s&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/bin/bash&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Make a directory for the share&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/media&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Change the directory’s owner to the previously created user&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;chown&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ismael:ismael&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/media&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Modify the &lt;code dir=&quot;auto&quot;&gt;/etc/fstab&lt;/code&gt; file to mount the SMB share on the directory we created&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;nano&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/etc/fstab&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Copy this line inside the nano editor for &lt;code dir=&quot;auto&quot;&gt;/etc/fstab&lt;/code&gt; (note the &lt;code dir=&quot;auto&quot;&gt;guest&lt;/code&gt; part, as this SMB share has no password set)&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;//192.168.0.10/media&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/media&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cifs&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;guest,rw,uid=1000,gid=1000,file_mode=0777,dir_mode=&lt;/span&gt;&lt;span&gt;0777&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;For shares that require a password:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;//192.168.0.10/media&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/media&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cifs&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;username=&amp;#x3C;username&gt;,password=&amp;#x3C;password&gt;,rw,uid=1000,gid=1000,file_mode=0777,dir_mode=&lt;/span&gt;&lt;span&gt;0777&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Reload the changes to /etc/fstab before mounting&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;systemctl&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;daemon-reload&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;mount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-a&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Create a mountpoint in your LXC container pointing to the created share directory&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;pct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;set&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;104&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-mp0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/media,mp=/mnt/user/media&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Start the LXC container and the share is mounted in &lt;code dir=&quot;auto&quot;&gt;/mnt/user/media&lt;/code&gt;, writable by the mapped user.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;igpu&quot;&gt;iGPU&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Coming soon…&lt;/p&gt;
</content:encoded><category>linux</category><category>proxmox</category><category>smb</category><category>nas</category></item><item><title>Proxmox | automatically restore SMB/CIFS share connections</title><link>https://djismgaming.github.io/blog/proxmox-restore-smb-cifs-share-connections/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/proxmox-restore-smb-cifs-share-connections/</guid><pubDate>Wed, 10 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If at some point Proxmox loses connectivity with an SMB/CIFS share, it will not restore the connection by itself until a restart of the Proxmox node is performed.
With the script below, the Proxmox node restores the connection automatically.&lt;/p&gt;
&lt;p&gt;On the node’s shell, create a bash script that looks for mount points in &lt;code dir=&quot;auto&quot;&gt;/mnt/pve/&lt;/code&gt; and unmounts them if they become stale:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;nano&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;remount.sh&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Put this content into the file:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#!/bin/bash&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;list&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;ls&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/pve&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;$list&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;do&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;ls&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/pve/&lt;/span&gt;&lt;span&gt;$i&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;2&gt;&amp;#x26;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; [[ &lt;/span&gt;&lt;span&gt;$status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=~&lt;/span&gt;&lt;span&gt; .&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;Stale.&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; ]]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;                &lt;/span&gt;&lt;span&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;                &lt;/span&gt;&lt;span&gt;umount&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/mnt/pve/&lt;/span&gt;&lt;span&gt;$i&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;done&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Remember to make the script executable by the user creating it:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;chmod&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;766&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/root/remount.sh&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Add a cron job for this script to run automatically:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; /root/remount.sh &lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt;/dev/null &lt;/span&gt;&lt;span&gt;2&gt;&amp;#x26;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;With that, any SMB/CIFS connections are restored automatically. That is because the service &lt;code dir=&quot;auto&quot;&gt;pvestatd&lt;/code&gt; tries to remount every SMB share every 10 seconds.&lt;/p&gt;
&lt;p&gt;This approach could work for NFS shares too, but that possibility has not been tested.&lt;/p&gt;
</content:encoded><category>linux</category><category>proxmox</category><category>smb</category><category>nas</category></item><item><title>Set up your SSH key-based authentication from Windows in a single line</title><link>https://djismgaming.github.io/blog/windows-ssh-copy-id/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/windows-ssh-copy-id/</guid><pubDate>Wed, 18 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Linux-to-Linux SSH setups are straightforward, but the Windows OpenSSH client needs a different approach to copy a generated key for password-less logins.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;generate-your-private-and-public-keys-in-your-windows-powershell-shell&quot;&gt;Generate your private and public keys in your Windows PowerShell shell&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Execute the command below in Windows Terminal or any other terminal in Windows:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ssh-keygen&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This generates the keys in the local host’s Windows profile directory under the &lt;code dir=&quot;auto&quot;&gt;.ssh/&lt;/code&gt; sub-directory.&lt;/p&gt;
&lt;p&gt;You can access it in this location on Windows by using the key combination &lt;code dir=&quot;auto&quot;&gt;Win + R&lt;/code&gt; and then entering this text in the Run window:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;%userprofile%/.ssh/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That directory will include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;your generated private key &lt;code dir=&quot;auto&quot;&gt;id_rsa&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;your generated public key &lt;code dir=&quot;auto&quot;&gt;id_rsa.pub&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The public key is the one we’ll copy into any remote host we want to connect without using a password.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;copy-the-public-key-with-a-single-line&quot;&gt;Copy the public key with a single line&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The command below performs the equivalent of &lt;code dir=&quot;auto&quot;&gt;ssh-copy-id&lt;/code&gt; using the OpenSSH client on Windows. Edit &lt;code dir=&quot;auto&quot;&gt;user@host.address&lt;/code&gt; with the remote user and host IP/hostname.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.ssh&lt;/span&gt;&lt;span&gt;\i&lt;/span&gt;&lt;span&gt;d_rsa.pub&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ssh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;user@host.address&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;mkdir -p .ssh &amp;#x26;&amp;#x26; cat &gt;&gt; .ssh/authorized_keys&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This makes it possible to login directly to your remote host by simply using:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ssh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;user@host&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Password-less login is now available:&lt;/p&gt;
</content:encoded><category>linux</category><category>windows</category><category>ssh</category></item><item><title>SSH tunneling for access to web-based apps on servers</title><link>https://djismgaming.github.io/blog/ssh-tunneling-web-apps/</link><guid isPermaLink="true">https://djismgaming.github.io/blog/ssh-tunneling-web-apps/</guid><pubDate>Fri, 13 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;SSH local port forwarding exposes a web UI from a remote server on the local machine. This is useful for tools such as Portainer running on a cloud VM.&lt;/p&gt;
&lt;p&gt;Run this command on the local machine:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;ssh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-L&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;9000:127.0.0.1:9000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;my_user@my-remote-server&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This forwards the remote port 9000 to the local machine:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://localhost:9000&quot;&gt;http://localhost:9000&lt;/a&gt; or &lt;a href=&quot;http://127.0.0.1:9000&quot;&gt;http://127.0.0.1:9000&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At this local address, the Portainer web UI from the remote server is available.&lt;/p&gt;
</content:encoded><category>linux</category></item></channel></rss>