<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>EsmaeelE - Free Software enthusiast - DevOps</title>
    <subtitle>DevOps, Kubernetes, and Infrastructure Automation</subtitle>
    <link rel="self" type="application/atom+xml" href="https://esmaeele.github.io/tags/devops/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://esmaeele.github.io"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-20T00:00:00+00:00</updated>
    <id>https://esmaeele.github.io/tags/devops/atom.xml</id>
    <entry xml:lang="en">
        <title>Fixing Page Order When Cropping Two-Column Persian PDFs</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/cropbook/"/>
        <id>https://esmaeele.github.io/blog/cropbook/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/cropbook/">&lt;h1 id=&quot;fixing-page-order-when-cropping-two-column-persian-pdfs&quot;&gt;Fixing Page Order When Cropping Two-Column Persian PDFs&lt;&#x2F;h1&gt;
&lt;p&gt;Some e-book readers render two-column scanned PDFs poorly. Splitting each spread into individual
pages fixes readability — but for Persian (right-to-left) books, a naive split leaves the pages in
the wrong order.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Credit to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jadi.net&#x2F;2012&#x2F;02&#x2F;linux-convert-pdf-to-one-column&#x2F;&quot;&gt;Jadi&#x27;s original post&lt;&#x2F;a&gt; for the
&lt;code&gt;convert&lt;&#x2F;code&gt;-based approach — this uses &lt;code&gt;mutool&lt;&#x2F;code&gt; instead, which handles the splitting in one step.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-split-each-two-column-page-into-two-single-pages&quot;&gt;1. Split Each Two-Column Page Into Two Single Pages&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install mupdf-tools&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;mutool&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; poster -x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; haj_sayah.pdf output.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;What this does:&lt;&#x2F;strong&gt; Splits each two-column spread into two separate single-column pages.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;2-fix-the-resulting-page-order&quot;&gt;2. Fix the Resulting Page Order&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Why it breaks:&lt;&#x2F;strong&gt; Persian is written right-to-left, so pages in a Persian book are ordered in
reverse relative to a left-to-right book. &lt;code&gt;mutool poster&lt;&#x2F;code&gt; splits pages assuming left-to-right order,
which works fine for English books but scrambles the order for Persian ones.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The fix:&lt;&#x2F;strong&gt; Swap each even page with the odd page next to it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install pdftk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;pdftk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; output.pdf shuffle even odd output haj_sayyah_.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;3-restore-the-original-cover&quot;&gt;3. Restore the Original Cover&lt;&#x2F;h2&gt;
&lt;p&gt;The shuffle step also reorders the cover. Swap it back from the original file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;pdftk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; A=haj_sayyah_.pdf B=haj_sayah.pdf cat B1 A3-end output out1.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;result&quot;&gt;Result&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;out1.pdf&lt;&#x2F;code&gt; is the final, correctly-ordered, single-column file — readable page by page on any e-reader.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;&#x2F;th&gt;&lt;th&gt;Command&lt;&#x2F;th&gt;&lt;th&gt;Purpose&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;mutool poster -x 2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Split columns&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;pdftk shuffle even odd&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Fix RTL order&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;pdftk cat B1 A3-end&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Restore cover&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Networking Lab with MikroTik RouterOS</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/mikrotik/"/>
        <id>https://esmaeele.github.io/blog/mikrotik/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/mikrotik/">&lt;h1 id=&quot;networking-lab-with-mikrotik-routeros&quot;&gt;Networking Lab with MikroTik RouterOS&lt;&#x2F;h1&gt;
&lt;p&gt;MikroTik RouterOS is a good, low-cost way to get hands-on with networking concepts without buying
physical hardware. This post covers running it as a VM, exposing its WebUI and SSH through a
reverse proxy, and connecting to it from the host machine.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;&#x2F;h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Component&lt;&#x2F;th&gt;&lt;th&gt;Version&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Host OS&lt;&#x2F;td&gt;&lt;td&gt;Debian GNU&#x2F;Linux (stable)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Hypervisor&lt;&#x2F;td&gt;&lt;td&gt;VirtualBox&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;RouterOS&lt;&#x2F;td&gt;&lt;td&gt;MikroTik x86 ISO&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Download the ISO from the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;mikrotik.com&#x2F;&quot;&gt;MikroTik website&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-create-the-vm&quot;&gt;1. Create the VM&lt;&#x2F;h2&gt;
&lt;p&gt;In VirtualBox, create a new VM with type &lt;strong&gt;Other&#x2F;Unknown (64-bit)&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Enable &lt;strong&gt;VT-x&lt;&#x2F;strong&gt; in system settings&lt;&#x2F;li&gt;
&lt;li&gt;Attach &lt;code&gt;mikrotik-7.10.1.iso&lt;&#x2F;code&gt; to the CD drive&lt;&#x2F;li&gt;
&lt;li&gt;Boot and press &lt;code&gt;i&lt;&#x2F;code&gt; then &lt;code&gt;Enter&lt;&#x2F;code&gt; to install&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;2-first-boot&quot;&gt;2. First Boot&lt;&#x2F;h2&gt;
&lt;p&gt;Log in to the console:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;user: admin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;password: (empty)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Request an IP from the internal DHCP server:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;&#x2F;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; dhcp-client add interface=ether1 disabled=no&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;&#x2F;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; address print&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Expected output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[admin@MikroTik] &amp;gt; ip&#x2F;address&#x2F;print&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Flags: D - DYNAMIC&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Columns: ADDRESS, NETWORK, INTERFACE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#   ADDRESS           NETWORK      INTERFACE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;0 D 10.0.2.15&#x2F;24      10.0.2.0     ether1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;3-port-forwarding&quot;&gt;3. Port Forwarding&lt;&#x2F;h2&gt;
&lt;p&gt;VirtualBox&#x27;s NAT network can forward ports from the host to the guest.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Service&lt;&#x2F;th&gt;&lt;th&gt;Host IP&lt;&#x2F;th&gt;&lt;th&gt;Host Port&lt;&#x2F;th&gt;&lt;th&gt;Guest IP&lt;&#x2F;th&gt;&lt;th&gt;Guest Port&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;SSH&lt;&#x2F;td&gt;&lt;td&gt;127.0.0.1&lt;&#x2F;td&gt;&lt;td&gt;9090&lt;&#x2F;td&gt;&lt;td&gt;10.0.2.15&lt;&#x2F;td&gt;&lt;td&gt;22&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;WebUI&lt;&#x2F;td&gt;&lt;td&gt;127.0.0.1&lt;&#x2F;td&gt;&lt;td&gt;8080&lt;&#x2F;td&gt;&lt;td&gt;10.0.2.15&lt;&#x2F;td&gt;&lt;td&gt;80&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Traffic hitting &lt;code&gt;localhost:9090&lt;&#x2F;code&gt; and &lt;code&gt;localhost:8080&lt;&#x2F;code&gt; now redirects to the guest.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;4-access-methods&quot;&gt;4. Access Methods&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;option-a-nginx-reverse-proxy&quot;&gt;Option A: Nginx Reverse Proxy&lt;&#x2F;h3&gt;
&lt;p&gt;Create &lt;code&gt;&#x2F;etc&#x2F;nginx&#x2F;conf.d&#x2F;local_proxy.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;server {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    listen 80;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    server_name webfig.ir;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    location &#x2F; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        proxy_pass http:&#x2F;&#x2F;127.0.0.1:8080&#x2F;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; nginx -t&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; systemctl restart nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add to &lt;code&gt;&#x2F;etc&#x2F;hosts&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;127.0.0.1       webfig.ir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now &lt;code&gt;http:&#x2F;&#x2F;webfig.ir&lt;&#x2F;code&gt; reaches the MikroTik WebUI.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;option-b-simpleproxy-no-nginx&quot;&gt;Option B: SimpleProxy (No Nginx)&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install simpleproxy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; simpleproxy -L webfig.ir:80 -R 127.0.0.1:8080&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;option-c-ssh&quot;&gt;Option C: SSH&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;ssh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 9090&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; admin@127.0.0.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add to &lt;code&gt;~&#x2F;.ssh&#x2F;config&lt;&#x2F;code&gt; for convenience:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Host mikrotik&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    HostName 127.0.0.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    User admin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    Port 9090&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    KexAlgorithms diffie-hellman-group-exchange-sha256&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then just:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;ssh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; mikrotik&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;option-d-winbox-via-wine&quot;&gt;Option D: Winbox via Wine&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install wine&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;wine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; winbox64.exe&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;references&quot;&gt;References&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;a&#x2F;1001801&#x2F;678872&quot;&gt;AskUbuntu: Port forwarding&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;manpages.ubuntu.com&#x2F;manpages&#x2F;lunar&#x2F;en&#x2F;man1&#x2F;simpleproxy.1.html&quot;&gt;SimpleProxy manpage&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;mapping-hostnames-ports&quot;&gt;Baeldung: Mapping hostnames&#x2F;ports&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;superuser.com&#x2F;a&#x2F;1670774&#x2F;1787481&quot;&gt;SuperUser: MikroTik SSH&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Run Multiple Debian VMs with Vagrant and VirtualBox</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/vagrant/"/>
        <id>https://esmaeele.github.io/blog/vagrant/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/vagrant/">&lt;h1 id=&quot;run-multiple-debian-vms-with-vagrant-and-virtualbox&quot;&gt;Run Multiple Debian VMs with Vagrant and VirtualBox&lt;&#x2F;h1&gt;
&lt;p&gt;This guide sets up &lt;strong&gt;3 Debian virtual machines&lt;&#x2F;strong&gt; with working &lt;code&gt;vagrant ssh&lt;&#x2F;code&gt;, using &lt;strong&gt;VirtualBox&lt;&#x2F;strong&gt;
as the provider. The box choice and shell provisioner below are what makes SSH work reliably on
Debian — both trip people up if skipped.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-vagrantfile&quot;&gt;1. Vagrantfile&lt;&#x2F;h2&gt;
&lt;p&gt;Save this as &lt;code&gt;Vagrantfile&lt;&#x2F;code&gt; in your project directory. It defines the 3 VMs in a loop rather than
repeating the same block three times:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F9E2AF;font-style: italic;&quot;&gt;Vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;configure&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;&amp;quot;2&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9399B2;font-style: italic;&quot;&gt;  # Only this Debian box works reliably with Vagrant SSH + VirtualBox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #94E2D5;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;generic&#x2F;debian12&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;each&lt;&#x2F;span&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;define&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;debian&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;#{&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #94E2D5;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;debian&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;#{&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;network&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;private_network&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F38BA8;&quot;&gt; ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;192.168.56.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;#{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt;149&lt;&#x2F;span&gt;&lt;span style=&quot;color: #94E2D5;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;provider&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;virtualbox&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;vb&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vb&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;memory&lt;&#x2F;span&gt;&lt;span style=&quot;color: #94E2D5;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 1024&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vb&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;cpus&lt;&#x2F;span&gt;&lt;span style=&quot;color: #94E2D5;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt;      end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9399B2;font-style: italic;&quot;&gt;      # Required to be able to SSH into the guest machines&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;provision&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;quot;shell&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F38BA8;&quot;&gt; inline&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;lt;&amp;lt;-SHELL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;        chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 700&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &#x2F;home&#x2F;vagrant&#x2F;.ssh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;        chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 600&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &#x2F;home&#x2F;vagrant&#x2F;.ssh&#x2F;authorized_keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;        chown&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; -R vagrant:vagrant &#x2F;home&#x2F;vagrant&#x2F;.ssh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;      SHELL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #CBA6F7;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This produces &lt;code&gt;debian1&lt;&#x2F;code&gt;, &lt;code&gt;debian2&lt;&#x2F;code&gt;, &lt;code&gt;debian3&lt;&#x2F;code&gt; on &lt;code&gt;192.168.56.150&lt;&#x2F;code&gt;, &lt;code&gt;.151&lt;&#x2F;code&gt;, &lt;code&gt;.152&lt;&#x2F;code&gt; respectively —
same result as writing out three separate blocks, less to maintain.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;2-usage&quot;&gt;2. Usage&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Destroy any previous VMs and clear old state:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; destroy -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; -rf .vagrant&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Start all 3 VMs:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; up&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;SSH into each VM:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; ssh debian1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; ssh debian2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; ssh debian3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Stop all VMs:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; halt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Remove all VMs permanently:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;vagrant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; destroy -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;3-notes&quot;&gt;3. Notes&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;generic&#x2F;debian12&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt; — other boxes (like &lt;code&gt;debian&#x2F;bookworm64&lt;&#x2F;code&gt;) can leave &lt;code&gt;authorized_keys&lt;&#x2F;code&gt;
empty and break SSH.&lt;&#x2F;li&gt;
&lt;li&gt;The &lt;strong&gt;shell provisioner block&lt;&#x2F;strong&gt; is required on Debian to set correct SSH permissions; without it,
&lt;code&gt;vagrant ssh&lt;&#x2F;code&gt; fails.&lt;&#x2F;li&gt;
&lt;li&gt;Each VM uses a &lt;strong&gt;private network&lt;&#x2F;strong&gt; for predictable IPs.&lt;&#x2F;li&gt;
&lt;li&gt;Tested with &lt;strong&gt;VirtualBox 7.x&lt;&#x2F;strong&gt; and the Vagrant AppImage on Linux, macOS, and Windows.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Kubernetes Migration Lab: VMs to EKS</title>
        <published>2025-11-10T00:00:00+00:00</published>
        <updated>2025-11-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/k8/"/>
        <id>https://esmaeele.github.io/blog/k8/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/k8/">&lt;p&gt;&lt;strong&gt;This is a personal lab writeup, not a claimed production project.&lt;&#x2F;strong&gt; I set it up to practice the
workflow and tooling involved in a VM-to-Kubernetes migration, using a small sample service rather
than a real company&#x27;s infrastructure.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;goal&quot;&gt;Goal&lt;&#x2F;h2&gt;
&lt;p&gt;Get hands-on with the pieces that make up a typical Kubernetes migration, end to end:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Provision an EKS cluster with &lt;strong&gt;Terraform&lt;&#x2F;strong&gt; instead of clicking through the AWS console.&lt;&#x2F;li&gt;
&lt;li&gt;Package the service with &lt;strong&gt;Helm&lt;&#x2F;strong&gt; so config is versioned and repeatable.&lt;&#x2F;li&gt;
&lt;li&gt;Wire up &lt;strong&gt;ArgoCD&lt;&#x2F;strong&gt; for GitOps-style deployment instead of manual &lt;code&gt;kubectl apply&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Add &lt;strong&gt;Prometheus&lt;&#x2F;strong&gt; and &lt;strong&gt;Grafana&lt;&#x2F;strong&gt; for cluster and application metrics.&lt;&#x2F;li&gt;
&lt;li&gt;Run the pipeline through &lt;strong&gt;GitHub Actions&lt;&#x2F;strong&gt; so image builds and Helm releases are automated.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;what-i-practiced&quot;&gt;What I practiced&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Writing Terraform modules for VPC, subnets, and an EKS control plane, and tearing it down cleanly
afterward (&lt;code&gt;terraform destroy&lt;&#x2F;code&gt;) to avoid runaway AWS costs on a personal account.&lt;&#x2F;li&gt;
&lt;li&gt;Structuring a Helm chart with separate &lt;code&gt;values&lt;&#x2F;code&gt; files per environment, and using &lt;code&gt;helm diff&lt;&#x2F;code&gt; to
review changes before they hit the cluster.&lt;&#x2F;li&gt;
&lt;li&gt;Pointing ArgoCD at a Git repo and watching it reconcile drift instead of trusting manual deploys.&lt;&#x2F;li&gt;
&lt;li&gt;Setting resource requests&#x2F;limits and a basic HorizontalPodAutoscaler, then load-testing to see
when pods actually scaled.&lt;&#x2F;li&gt;
&lt;li&gt;Hooking up the kube-prometheus-stack and building a couple of Grafana dashboards for pod restarts
and request latency.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;what-i-d-still-want-to-test-on-a-real-workload&quot;&gt;What I&#x27;d still want to test on a real workload&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Zero-downtime cutover strategies (blue&#x2F;green vs. canary) under real traffic, not synthetic load.&lt;&#x2F;li&gt;
&lt;li&gt;Database migration alongside the app — stateful services are the part this lab skipped entirely.&lt;&#x2F;li&gt;
&lt;li&gt;Cost comparison against the VM baseline with real numbers, not estimates.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;notes-for-next-time&quot;&gt;Notes for next time&lt;&#x2F;h2&gt;
&lt;p&gt;Terraform state management got messy once I started iterating quickly — next time I&#x27;d set up remote
state with locking from the start instead of retrofitting it. ArgoCD&#x27;s health checks also needed
tuning for a custom readiness probe; the defaults reported &quot;healthy&quot; before the app was actually
ready to take traffic.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
