<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OpenBSD on Notes by kirill.zak</title><link>https://kirill-zak.ru/en-us/posts/openbsd/</link><description>Recent content in OpenBSD on Notes by kirill.zak</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 28 Nov 2022 18:38:49 +0300</lastBuildDate><atom:link href="https://kirill-zak.ru/en-us/posts/openbsd/index.xml" rel="self" type="application/rss+xml"/><item><title>Using OpenBSD as a host for VMs. Part 4. Storage setup</title><link>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-storage/</link><pubDate>Mon, 28 Nov 2022 18:38:49 +0300</pubDate><guid>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-storage/</guid><description>&lt;h1 id="create-storage-for-vms"&gt;Create storage for VMs&lt;/h1&gt;
&lt;p&gt;In this post I&amp;rsquo;ll create storage for VMs.&lt;/p&gt;
&lt;h2 id="prepare"&gt;Prepare&lt;/h2&gt;
&lt;p&gt;For VM storage I will use four 500 GB HDDs. These drives will be used as a software RAID 5. The RAID will be encrypted and mounted at &lt;code&gt;/mnt/vm/data&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To show the list of available disks, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sysctl hw.disknames
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output should look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-storage/images/storage_01.jpeg" alt="List of available disks"&gt;&lt;/p&gt;
&lt;p&gt;In this case, &lt;code&gt;sd2&lt;/code&gt;, &lt;code&gt;sd3&lt;/code&gt;, &lt;code&gt;sd4&lt;/code&gt;, and &lt;code&gt;sd5&lt;/code&gt; are SATA HDDs to be used as VM storage.&lt;/p&gt;</description></item><item><title>Using OpenBSD as a host for VMs. Part 3. Setup after installation</title><link>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-after-install/</link><pubDate>Thu, 24 Nov 2022 15:35:44 +0300</pubDate><guid>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-after-install/</guid><description>&lt;h1 id="basic-steps-after-installation"&gt;Basic steps after installation&lt;/h1&gt;
&lt;h2 id="apply-patches"&gt;Apply patches&lt;/h2&gt;
&lt;p&gt;The first thing to do after installation is to apply all patches.&lt;/p&gt;
&lt;p&gt;Run the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;syspatch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then reboot the machine after the patches are applied successfully.&lt;/p&gt;
&lt;h2 id="create-a-user-to-manage-vms"&gt;Create a user to manage VMs&lt;/h2&gt;
&lt;p&gt;In this step I&amp;rsquo;ll create a user to manage VMs.&lt;/p&gt;
&lt;p&gt;Create the &lt;code&gt;vmm&lt;/code&gt; user with the &lt;code&gt;adduser&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/setup-after-install/images/add_user_vmm.jpeg" alt="Add user vmm"&gt;&lt;/p&gt;
&lt;h2 id="add-permissions"&gt;Add permissions&lt;/h2&gt;
&lt;p&gt;Create the &lt;a href="https://man.openbsd.org/doas.conf.5"&gt;doas.conf(5)&lt;/a&gt; configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp /etc/examples/doas.conf /etc/doas.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the following line to the end of the file:&lt;/p&gt;</description></item><item><title>Using OpenBSD as a host for VMs. Part 2. Install OpenBSD as the host OS</title><link>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/install-openbsd/</link><pubDate>Thu, 24 Nov 2022 14:17:11 +0300</pubDate><guid>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/install-openbsd/</guid><description>&lt;h1 id="install-openbsd-72-as-the-host-os"&gt;Install OpenBSD 7.2 as the host OS&lt;/h1&gt;
&lt;p&gt;In this article, I install OpenBSD 7.2 on a host machine.&lt;/p&gt;
&lt;p&gt;Storage mapping (SSD + HDD + flash stick are SATA devices):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sd0&lt;/code&gt;, &lt;code&gt;sd1&lt;/code&gt; -&amp;gt; SSD;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sd2&lt;/code&gt;, &lt;code&gt;sd3&lt;/code&gt;, &lt;code&gt;sd4&lt;/code&gt;, &lt;code&gt;sd5&lt;/code&gt; -&amp;gt; data HDDs;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sd6&lt;/code&gt; -&amp;gt; USB stick.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="prepare-for-openbsd-installation"&gt;Prepare for OpenBSD installation&lt;/h2&gt;
&lt;p&gt;Two SSDs will be used in &lt;code&gt;RAID1 softraid&lt;/code&gt; with encryption for the host system.&lt;/p&gt;
&lt;p&gt;According to the official &lt;a href="https://www.openbsd.org/faq/faq14.html#softraidDI"&gt;guide&lt;/a&gt;, we will conduct the preparatory stage in the shell.&lt;/p&gt;</description></item><item><title>Using OpenBSD as a host for VMs. Part 1. Intro</title><link>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/intro/</link><pubDate>Thu, 24 Nov 2022 10:38:15 +0300</pubDate><guid>https://kirill-zak.ru/en-us/posts/openbsd/openbsd-host-for-vm/intro/</guid><description>&lt;h1 id="intro"&gt;Intro&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://kirill-zak.ru/en-us/posts/openbsd/"&gt;Series index&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="hardware"&gt;Hardware&lt;/h2&gt;
&lt;p&gt;This example was run on a home lab server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2 × Intel Xeon CPUs&lt;/li&gt;
&lt;li&gt;2 × 120 GB SSDs in a RAID1 mirror for the base system&lt;/li&gt;
&lt;li&gt;4 × 500 GB HDDs for VM data&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="plan"&gt;Plan&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../install-openbsd/"&gt;Part 2. Install OpenBSD as the host OS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../setup-after-install/"&gt;Part 3. Setup after installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../setup-storage/"&gt;Part 4. Storage setup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="storage-for-the-base-system"&gt;Storage for the base system&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ll use a 120 GB SSD with encryption for the base system. The second 120 GB SSD will be used as a RAID1 mirror for the base system.&lt;/p&gt;</description></item></channel></rss>