<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ vm - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ vm - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 26 Jul 2026 14:13:09 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/vm/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Turn Ubuntu 24.04 into a KVM Hypervisor – Quick Setup with Web Management ]]>
                </title>
                <description>
                    <![CDATA[ Virtualization lets you run multiple operating systems on one machine. It’s perfect for testing apps, hosting servers, or learning DevOps. A hypervisor is the software that lets you run multiple virtual machines on a single physical machine, and the ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/turn-ubuntu-2404-into-a-kvm-hypervisor/</link>
                <guid isPermaLink="false">680fa285102a9fb019d4fa34</guid>
                
                    <category>
                        <![CDATA[ KVM ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hypervisor ]]>
                    </category>
                
                    <category>
                        <![CDATA[ virtualization ]]>
                    </category>
                
                    <category>
                        <![CDATA[ virtual machine ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vm ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Shamsuddoha Ranju ]]>
                </dc:creator>
                <pubDate>Mon, 28 Apr 2025 15:45:09 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745591647377/613d9a44-cc2b-45b7-b1d1-5fc3154b9623.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Virtualization lets you run multiple operating systems on one machine. It’s perfect for testing apps, hosting servers, or learning DevOps.</p>
<p>A hypervisor is the software that lets you run multiple virtual machines on a single physical machine, and the Kernel-based Virtual Machine (KVM) is one of the best. Built into Linux, KVM is fast (near-native performance), open-source (free!), and flexible (supports Windows, Linux, and more). It’s trusted by both cloud providers and homelabbers for its stability and low overhead.</p>
<p>If you want to turn your Ubuntu 24.04 or Kubuntu 24.04 (Kubuntu is a Ubuntu variant with KDE Plasma desktop) system into a powerful hypervisor without <strong>Proxmox</strong>’s complexity, this guide is for you. With KVM, you’ll spin up virtual machines (VMs) in minutes, and with Cockpit’s web-based manager, you’ll control them from your browser.</p>
<p>In this tutorial, you’ll transform an Ubuntu 24.04 or Kubuntu 24.04 Desktop or Server – fresh or existing – into a KVM hypervisor. You’ll set up the backend (KVM, QEMU, libvirt), add Cockpit for web-based VM management, and create a guest VM to test it all. Whether you’re a coder, homelabber, or IT enthusiast, this guide is beginner-friendly.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-before-you-start-what-you-should-know">Before You Start: What You Should Know</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-youll-need">What You’ll Need</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-why-kvm-on-ubuntukubuntu-2404">Why KVM on Ubuntu/Kubuntu 24.04?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-1-check-virtualization-support">Step 1: Check Virtualization Support</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-2-install-kvm-and-backend-tools">Step 2: Install KVM and Backend Tools</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-3-set-up-a-network-bridge">Step 3: Set Up a Network Bridge</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-4-install-cockpit-for-web-management">Step 4: Install Cockpit for Web Management</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-5-create-a-guest-vm">Step 5: Create a Guest VM</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-6-run-and-test-your-guest-vm">Step 6: Run and Test Your Guest VM</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-keep-exploring-your-hypervisor">Keep Exploring Your Hypervisor</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-wrapping-up">Wrapping Up</a></p>
</li>
</ul>
<h2 id="heading-before-you-start-what-you-should-know">Before You Start: What You Should Know</h2>
<p>This guide is designed for virtualization newcomers, but you’ll need a few basic skills:</p>
<ul>
<li><p>Running terminal commands like <code>sudo apt install</code> or <code>nano</code> and so on.</p>
</li>
<li><p>Basic Linux navigation (for example, editing files in <code>/etc</code>).</p>
</li>
<li><p>Basic networking knowledge, such as understanding network interfaces (for example, <code>enp4s0</code> or <code>wlp3s0</code>), IP addresses, and concepts like bridging or NAT. You’ll use tools like <code>ip link</code> or <code>nmcli</code> to set up a network bridge in Step 3.</p>
</li>
<li><p>Optional: Experience with VMs helps but isn’t required – I’ll explain everything.</p>
</li>
</ul>
<p>No worries if terms like “libvirt” sound new. I’ll break them down as we go.</p>
<h2 id="heading-what-youll-need">What You’ll Need</h2>
<ul>
<li><p><strong>A computer</strong>: Running Ubuntu 24.04 or Kubuntu 24.04 Desktop or Server (fresh or existing). Minimum: 4GB RAM, 20GB storage, CPU with virtualization support (Intel VT-x or AMD-V). More RAM/storage for multiple VMs.</p>
</li>
<li><p><strong>Internet access</strong>: To download packages and VM ISOs.</p>
</li>
<li><p><strong>A web browser</strong>: Firefox (default on Ubuntu) or Chrome to access Cockpit.</p>
</li>
<li><p><strong>An ISO image</strong>: An ISO image for your guest VM (for example, Ubuntu 24.04 Desktop ISO from ubuntu.com or Windows ISO if you have it already).</p>
</li>
<li><p><strong>30–45 minutes</strong>: Depending on your setup speed.</p>
</li>
</ul>
<h2 id="heading-why-kvm-on-ubuntukubuntu-2404">Why KVM on Ubuntu/Kubuntu 24.04?</h2>
<p>KVM turns your Linux kernel into a hypervisor, letting you run VMs with near-native speed. Paired with QEMU (for hardware emulation) and libvirt (for management), it’s a lightweight alternative to <strong>Proxmox</strong> or <strong>VMware</strong>. Its strengths include:</p>
<ul>
<li><p><strong>Performance</strong>: Runs VMs efficiently, ideal for homelabs or dev environments.</p>
</li>
<li><p><strong>Free and Open-Source</strong>: No licenses, just like Ubuntu/Kubuntu, and so on.</p>
</li>
<li><p><strong>Flexibility</strong>: Supports diverse guest OSs (Linux, Windows, BSD).</p>
</li>
<li><p><strong>Integration</strong>: Cockpit’s web UI makes VM management a breeze, no CLI required.</p>
</li>
</ul>
<p>Here’s what each tool does:</p>
<ul>
<li><p><strong>KVM</strong>: A Linux kernel module that turns your system into a hypervisor, enabling VMs to run with near-native performance by leveraging CPU virtualization features (for example, Intel VT-x).</p>
</li>
<li><p><strong>QEMU</strong>: A powerful emulator that provides the virtual hardware (for example, CPU, disk, network) for your VMs, working with KVM for fast execution.</p>
</li>
<li><p><strong>libvirt</strong>: A management layer that simplifies VM creation, networking, and storage, offering tools like <code>virsh</code> and APIs for automation.</p>
</li>
<li><p><strong>Cockpit</strong>: A web-based interface for managing VMs, system resources, and networks, perfect for beginners who want a visual dashboard.</p>
</li>
</ul>
<p>Ubuntu 24.04 (“Noble Numbat”) brings the latest kernel and tools, ensuring top-notch KVM compatibility. Let’s build your hypervisor!</p>
<h2 id="heading-step-1-check-virtualization-support">Step 1: Check Virtualization Support</h2>
<p>First, you’ll want to confirm that your CPU supports virtualization (most modern ones do). To do that, open a terminal (like Konsole on Kubuntu) and run:</p>
<pre><code class="lang-bash">lscpu | grep Virtualization
</code></pre>
<p>Look for "VT-x" (Intel) or "AMD-V" (AMD). If present, you’re good!</p>
<p>If nothing shows, check your BIOS/UEFI:</p>
<ul>
<li><p>Reboot, enter BIOS (usually <code>F2</code>, <code>Del</code>, or <code>Esc</code>).</p>
</li>
<li><p>Enable "Intel VT-x" or "AMD-V" under CPU settings.</p>
</li>
<li><p>Save and reboot.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745226012162/337e2324-50b3-4bd9-b040-01c2ac919e7c.png" alt="Konsole terminal on Kubuntu displaying ‘lscpu | grep Virtualization’ output confirming VT-x support for KVM." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-2-install-kvm-and-backend-tools">Step 2: Install KVM and Backend Tools</h2>
<p>Let’s install KVM, QEMU, and libvirt. These will form the backbone of your hypervisor:</p>
<p>Start by updating your system (you may need to restart your computer after the update):</p>
<pre><code class="lang-bash">sudo apt update &amp;&amp; sudo apt upgrade -y
</code></pre>
<p>Then install the virtualization packages:</p>
<pre><code class="lang-bash">sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils -y
</code></pre>
<ul>
<li><p><code>qemu-kvm</code>: Emulates hardware for VMs.</p>
</li>
<li><p><code>libvirt-daemon-system</code>: Manages VMs.</p>
</li>
<li><p><code>libvirt-clients</code>: CLI tools like <code>virsh</code> for hypervisor management.</p>
</li>
<li><p><code>bridge-utils</code>: For network bridging.</p>
</li>
</ul>
<p>Next, verify that KVM is loaded:</p>
<pre><code class="lang-bash">lsmod | grep kvm
</code></pre>
<p>You’ll see “kvm_intel” or “kvm_amd” if successful.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745226199517/a146d89d-2894-4bbc-b241-11a8ed385758.png" alt="Konsole terminal on Kubuntu displaying ‘lsmod | grep kvm’ output showing kvm_intel module loaded for KVM." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Finally, add your (current) user to the <code>libvirt</code> group for permission:</p>
<pre><code class="lang-bash">sudo usermod -aG libvirt <span class="hljs-variable">$USER</span>
</code></pre>
<p>Log out and back in to apply these changes.</p>
<h2 id="heading-step-3-set-up-a-network-bridge">Step 3: Set Up a Network Bridge</h2>
<p>VMs need network access, so you’ll create a bridge (<code>br0</code>) to connect them to your physical network. This allows VMs to act like devices on your network (bridged networking).</p>
<p>Ubuntu 24.04 and Kubuntu 24.04 Desktop typically use NetworkManager, while Ubuntu Server may use Netplan. We’ll prioritize the NetworkManager approach, with Netplan as an alternative.</p>
<p><strong>Note</strong>: Installing libvirt (Step 2) creates a default bridge called <code>virbr0</code> for NAT-based networking, which isolates VMs from the physical network (IPs like <code>192.168.122.x</code>). For direct network access (IPs like <code>192.168.0.x</code>), use <code>br0</code> as described below, and select it in Step 5’s VM setup.</p>
<p>You can verify whether your system is using NetworkManager or Netplan. Open a console and run <code>systemctl status NetworkManager</code>. If you see the status active and running, go with NetworkManager.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745305149513/0926f09c-1748-484f-af4c-37dcb82d06a5.png" alt="Konsole terminal on Kubuntu displaying ‘systemctl status NetworkManager’ output confirming NetworkManager status." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h3 id="heading-option-1-networkmanager-recommended-for-kubuntuubuntu-desktop">Option 1: NetworkManager (Recommended for Kubuntu/Ubuntu desktop)</h3>
<p>Check your network interface:</p>
<pre><code class="lang-bash">ip link
</code></pre>
<p>Example: <code>enp4s0</code>. Replace <code>enp4s0</code> below if yours differs.</p>
<p>First, find your Ethernet connection name:</p>
<pre><code class="lang-bash">nmcli connection show
</code></pre>
<p>Look for the <strong>NAME</strong> column where <strong>DEVICE</strong> is <code>enp4s0</code> (for example, “Wired connection 1” or “Ethernet connection”). Note this name. Ignore <code>virbr0</code>, which is libvirt’s default NAT bridge.</p>
<p>Then create a bridge named <code>br0</code>:</p>
<pre><code class="lang-bash">sudo nmcli connection add <span class="hljs-built_in">type</span> bridge ifname br0 con-name bridge-br0
</code></pre>
<p>Enslave your interface to the bridge:</p>
<pre><code class="lang-bash">sudo nmcli connection add <span class="hljs-built_in">type</span> ethernet ifname enp4s0 master br0 con-name bridge-slave-enp4s0
</code></pre>
<p>Disable the old connection (replace with your connection name identified earlier):</p>
<pre><code class="lang-bash">sudo nmcli connection down <span class="hljs-string">"Wired connection 1"</span>
sudo nmcli connection delete <span class="hljs-string">"Wired connection 1"</span>
</code></pre>
<p>Enable DHCP on the bridge:</p>
<pre><code class="lang-bash">sudo nmcli connection modify bridge-br0 ipv4.method auto
</code></pre>
<p>Activate the bridge:</p>
<pre><code class="lang-bash">sudo nmcli connection up bridge-br0
</code></pre>
<p>Verify:</p>
<pre><code class="lang-bash">ip addr show br0
nmcli connection show
</code></pre>
<p>Now you’ll want to ensure <code>br0</code> is active, <code>enp4s0</code> is enslaved, and <code>virbr0</code> is separate. First, test the internet with <code>ping 8.8.8.8</code>.</p>
<p>Then you need to define <code>br0</code> in libvirt (to appear in Cockpit’s VM network dropdown). To do this, create <code>br0.xml</code> in your home directory:</p>
<pre><code class="lang-bash">nano ~/br0.xml
</code></pre>
<p>Then add the following:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">network</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span>br0<span class="hljs-tag">&lt;/<span class="hljs-name">name</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">forward</span> <span class="hljs-attr">mode</span>=<span class="hljs-string">'bridge'</span>/&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">bridge</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'br0'</span>/&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">network</span>&gt;</span>
</code></pre>
<p>Save and exit (<code>Ctrl+O</code>, <code>Enter</code>, <code>Ctrl+X</code>).</p>
<p>Now define and start the following:</p>
<pre><code class="lang-bash">sudo virsh net-define ~/br0.xml
sudo virsh net-start br0
sudo virsh net-autostart br0
</code></pre>
<p>Verify like this:</p>
<pre><code class="lang-bash">virsh net-list --all
</code></pre>
<p>You can now delete <code>~/br0.xml</code> after defining, as libvirt stores it in <code>/etc/libvirt/qemu/networks/</code>.</p>
<pre><code class="lang-bash">rm ~/br0.xml
</code></pre>
<h3 id="heading-option-2-netplan-for-ubuntu-server-or-if-preferred">Option 2: Netplan (For Ubuntu Server or If Preferred)</h3>
<p>If you see <code>renderer: networkd</code> in <code>/etc/netplan/???.yaml</code> or prefer Netplan, follow these steps.</p>
<p>First, check your interface:</p>
<pre><code class="lang-bash">ip link
</code></pre>
<p>Example: <code>enp4s0</code>.</p>
<p>Next, edit the Netplan config like so:</p>
<pre><code class="lang-bash">sudo nano /etc/netplan/01-netcfg.yaml
</code></pre>
<p>Use the following:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">network:</span>
  <span class="hljs-attr">version:</span> <span class="hljs-number">2</span>
  <span class="hljs-attr">renderer:</span> <span class="hljs-string">networkd</span>
  <span class="hljs-attr">ethernets:</span>
    <span class="hljs-attr">enp4s0:</span>
      <span class="hljs-attr">dhcp4:</span> <span class="hljs-literal">no</span>
  <span class="hljs-attr">bridges:</span>
    <span class="hljs-attr">br0:</span>
      <span class="hljs-attr">interfaces:</span> [<span class="hljs-string">enp4s0</span>]
      <span class="hljs-attr">dhcp4:</span> <span class="hljs-literal">yes</span>
</code></pre>
<p>Save and exit (<code>Ctrl+O</code>, <code>Enter</code>, <code>Ctrl+X</code>).</p>
<p>Now, set strict permissions to avoid errors:</p>
<pre><code class="lang-bash">sudo chmod 600 /etc/netplan/01-netcfg.yaml
</code></pre>
<p>And apply:</p>
<pre><code class="lang-bash">sudo netplan apply
</code></pre>
<p>Now verify:</p>
<pre><code class="lang-bash">ip addr show br0
</code></pre>
<p>Test the internet with <code>ping 8.8.8.8</code> (from console).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745227201229/35988335-5ff1-49bc-9809-e9c08d6798c4.png" alt="Konsole terminal on Kubuntu displaying ‘nmcli connection show’ output with bridge-br0 active, enp4s0 enslaved, and virbr0 present for KVM networking." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p><strong>Troubleshooting</strong>:</p>
<ul>
<li><p><strong>Permissions error</strong>: If Netplan complains about “too open” permissions, recheck <code>sudo chmod 600 /etc/netplan/01-netcfg.yaml</code>.</p>
</li>
<li><p><strong>NetworkManager conflict</strong>: If using Netplan, ensure <code>/etc/netplan/01-network-manager-all.yaml</code> is backed up or deleted (<code>sudo mv /etc/netplan/01-network-manager-all.yaml /etc/netplan/01-network-manager-all.yaml.bak</code>).</p>
</li>
<li><p><strong>No onternet</strong>: Restart NetworkManager (<code>sudo systemctl restart NetworkManager</code>) or reboot.</p>
</li>
<li><p><strong>Wrong bridge</strong>: If a VM uses <code>virbr0</code> (NAT, <code>192.168.122.x</code>), recheck Step 5’s network setting and select <code>br0</code>.</p>
</li>
<li><p><strong>br0 missing in Cockpit</strong>: Define <code>br0</code> in libvirt (step 9 above) or ensure <code>br0</code> is active (<code>ip addr show br0</code>).</p>
</li>
</ul>
<h2 id="heading-step-4-install-cockpit-for-web-management">Step 4: Install Cockpit for Web Management</h2>
<p>Cockpit provides a slick web UI to manage VMs. Let’s go ahead and set it up.</p>
<p>First, you’ll need to install Cockpit and its VM plugin:</p>
<pre><code class="lang-bash">sudo apt install cockpit cockpit-machines -y
</code></pre>
<p>Then you can start and enable Cockpit:</p>
<pre><code class="lang-bash">sudo systemctl <span class="hljs-built_in">enable</span> --now cockpit.socket
systemctl status cockpit.socket
</code></pre>
<p>Now open your browser (for example, Firefox on Ubuntu) and visit:</p>
<pre><code class="lang-plaintext">https://localhost:9090
</code></pre>
<p>Or use your KVM server’s IP (for example, <code>https://192.168.0.100:9090</code>) if remote. Log in with your username and password. Ignore the self-signed certificate warning.</p>
<p>Allow Cockpit’s port if you’re using a firewall:</p>
<pre><code class="lang-bash">sudo ufw allow 9090
</code></pre>
<p>You’ll see Cockpit’s dashboard. Turn on administrative access by clicking on “<strong>Turn on administrative access</strong>”. Then, click “<strong>Virtual Machines</strong>” to manage VMs.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745227293385/96291774-d4cf-4de2-9392-3947ade4bb8b.png" alt="Firefox on Kubuntu displaying Cockpit login page at https://localhost:9090 for web-based VM management." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-5-create-a-guest-vm">Step 5: Create a Guest VM</h2>
<p>Let’s create a guest VM using Cockpit. We’ll use an Ubuntu 24.04 Desktop ISO as an example:</p>
<p>To start, download the Ubuntu 24.04 Desktop ISO from ubuntu.com and save it (for example, <code>/home/ranju/Downloads/ubuntu-24.04.1-desktop-amd64.iso</code>).</p>
<p>In Cockpit, go to “Virtual Machines” and click “Create VM”. Here are the specs:</p>
<ul>
<li><p><strong>Name</strong>: TestVM</p>
</li>
<li><p><strong>Installation Type</strong>: Local install media (or your desired installation type)</p>
</li>
<li><p><strong>Installation Source</strong>: Browse to your ISO (for example, <code>/home/ranju/Downloads/ubuntu-24.04.1-desktop-amd64.iso</code>).</p>
</li>
<li><p><strong>OS</strong>: Select “Ubuntu 24.04” (usually Cockpit auto-detects).</p>
</li>
<li><p><strong>Storage</strong>: Create new qcow2 volume (preferred). <em>Note: disk is created in</em> <code>/var/lib/libvirt/images/</code><em>.</em></p>
</li>
<li><p><strong>Storage limit</strong>: 20GB (adjust as needed).</p>
</li>
<li><p><strong>Memory</strong>: 4GB (adjust as needed).</p>
</li>
</ul>
<p>Click “Create and Edit”. Cockpit opens an advanced dialog where there are options for customization (for example, CPU, Network Interfaces and Boot order, and so on). Make sure that <code>br0</code> has been selected as interface source. Finally, click “<strong>Install</strong>”.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745228999671/4d80faf7-d8f8-4395-985e-298b4add426c.png" alt="Cockpit web interface in Firefox on Kubuntu showing the Create VM dialog with TestVM settings." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>In Cockpit’s VM console, follow the installer to set up the guest OS (username, password, and so on).</p>
<p><strong>Troubleshooting</strong>:</p>
<ul>
<li><p><strong>Permissions error</strong>: If you have permission error for the ISO, then copy the ISO to the default temp folder (<code>/tmp/</code>) and locate the ISO from there.</p>
<pre><code class="lang-bash">  cp /home/ranju/Downloads/ubuntu-24.04.1.iso /tmp/
</code></pre>
</li>
</ul>
<h2 id="heading-step-6-run-and-test-your-guest-vm">Step 6: Run and Test Your Guest VM</h2>
<p>Your VM is running! Let’s test it:</p>
<ol>
<li><p>In Cockpit, under “Virtual Machines,” click TestVM. You’ll see its console (a live view of the VM’s screen).</p>
</li>
<li><p>Log into the guest Ubuntu using the credentials you set.</p>
</li>
<li><p>Test networking:</p>
<ul>
<li><p>Open a terminal in the VM (via Cockpit’s console).</p>
</li>
<li><p>Run <code>ip addr</code> in the console to confirm a physical network IP (for example, <code>192.168.0.x</code> with <code>br0</code>, not <code>192.168.122.x</code> with <code>virbr0</code>).</p>
</li>
<li><p>Run <code>ping 8.8.8.8</code> to confirm internet access.</p>
</li>
</ul>
</li>
<li><p>Experiment: Open a browser in the VM, visit a website, or install apps to simulate real use.</p>
</li>
</ol>
<p>If the VM boots and connects to your network, your KVM hypervisor is rocking! You can stop, restart, or delete it from Cockpit.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745307664700/ed54d452-4979-4468-a7fe-1dd538844e25.png" alt="Cockpit web interface in Firefox on Kubuntu displaying the TestVM console with Ubuntu 24.04 desktop." class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-keep-exploring-your-hypervisor">Keep Exploring Your Hypervisor</h2>
<p>You’ve turned your Ubuntu 24.04 into a KVM hypervisor – congrats! Try these next steps:</p>
<ul>
<li><p><strong>Add more VMs</strong>: Create Windows or other Linux VMs using different ISOs.</p>
</li>
<li><p><strong>Use virt-manager</strong>: Install virt-manager for a desktop-based alternative to Cockpit (<code>sudo apt install virt-manager</code>).</p>
</li>
<li><p><strong>Back up VMs</strong>: Export VM disks with <code>virsh</code> for safety.</p>
</li>
<li><p><strong>Scale up</strong>: Add storage or RAM for heavier workloads, like my Proxmox cluster guide.</p>
</li>
</ul>
<p>Check your VMs anytime via CLI:</p>
<pre><code class="lang-bash">virsh list --all
</code></pre>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>You’ve built a fast, free KVM hypervisor on Ubuntu 24.04, complete with Cockpit’s web UI and a running guest VM. It’s a perfect playground for coding, testing, or homelab fun.</p>
<p>Share your ideas or comments with me – I’d love to hear them!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ VM Data Protection Best Practices: How to Mitigate Risk in a Virtual Environment ]]>
                </title>
                <description>
                    <![CDATA[ Vast amounts of data flow through virtualized environments these days. And that data needs to be protected. So making sure that your virtual machines are secured, along with their associated data, is key for maintaining operational continuity and saf... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/vm-data-protection-best-practices/</link>
                <guid isPermaLink="false">66bf49af410af52542e93140</guid>
                
                    <category>
                        <![CDATA[ Data security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ virtualization ]]>
                    </category>
                
                    <category>
                        <![CDATA[ virtual machine ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Data Protection ]]>
                    </category>
                
                    <category>
                        <![CDATA[ risk management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ proxmox ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vmware ]]>
                    </category>
                
                    <category>
                        <![CDATA[ risk mitigation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Risk Assessment ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vm ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Alex Tray ]]>
                </dc:creator>
                <pubDate>Fri, 16 Aug 2024 12:44:31 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723559872911/f9953e98-7948-47a0-a054-62028df854b9.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Vast amounts of data flow through virtualized environments these days. And that data needs to be protected. So making sure that your virtual machines are secured, along with their associated data, is key for maintaining operational continuity and safeguarding against cyber threats.</p>
<p>In this guide, you'll learn about VM-specific risks for data and workloads. I'll also provide some recommendations that can help you mitigate them. Implementing these data protection best practices can help you ensure production continuity, data availability, and regulatory compliance for your organization.</p>
<p><strong>Table of Contents</strong></p>
<dl>
<ul>
  <li><a href="#heading-two-of-the-main-players-vmware-and-proxmox">Two of the Main Players: VMWare and Proxmox</a></li>
  <li><a href="#heading-understanding-the-risks-of-virtual-environments">Understanding the Risks of Virtual Environments</a></li>
  <li>
    <a href="#heading-specific-risks-associated-with-virtual-environments">Specific Risks Associated with Virtual Environments</a>
    <ul>
      <li><a href="#heading-hypervisor-security-vulnerabilities">Hypervisor security vulnerabilities</a></li>
      <li><a href="#heading-vm-sprawl">VM sprawl</a></li>
      <li><a href="#heading-insecure-vm-configurations">Insecure VM configurations</a></li>
      <li><a href="#heading-snapshot-and-clone-risks">Snapshot and clone risks</a></li>
    </ul>
  </li>
  <li>
    <a href="#heading-vm-data-protection-and-secure-virtualization-best-practices">VM Data Protection and Secure Virtualization Best Practices</a>
    <ul>
      <li><a href="#heading-secure-the-virtualized-environment">Secure the Virtualized Environment</a></li>
      <li><a href="#heading-backup-and-recovery-strategies">Backup and Recovery Strategies</a></li>
      <li><a href="#heading-monitoring-and-auditing">Monitoring and Auditing</a></li>
    </ul>
  </li>
  <li>
    <a href="#heading-advanced-protection-techniques">Advanced Protection Techniques</a>
    <ul>
      <li><a href="#heading-encryption">Encryption</a></li>
      <li><a href="#heading-intrusion-detection-and-prevention-systems-idps">Intrusion Detection and Prevention Systems (IDPS)</a></li>
      <li><a href="#heading-application-and-network-security">Application and Network Security</a></li>
    </ul>
  </li></ul></dl>

<h2 id="heading-two-of-the-main-players-vmware-and-proxmox">Two of the Main Players: VMWare and Proxmox</h2>
<p>Both VMware and Proxmox offer robust solutions for virtualization, but they come with their own set of challenges and risks that can impact VM data protection.</p>
<p>VMware is the market leader in virtualization <a target="_blank" href="https://www.6sense.com/tech/virtualization/vmware-market-share#:~:text=VMware%20has%20market%20share%20of,ESXi%20with%205.99%25%20market%20share.">with almost 50% of the market share</a>, which is both a boon and a bane.</p>
<p>On the one hand, VMware has a high-end, efficient portfolio of solutions to build IT environments of any complexity and size. On the other, such popularity means that malicious actors know what they can target during cyberattacks, posing challenges in virtualization security for VMware users.</p>
<p>Proxmox, a prominent alternative to VMware, also offers robust virtualization solutions. While Proxmox may have a smaller market share compared to VMware, it provides a comprehensive set of tools for managing virtual environments. It can also be a good choice for those looking for open-source solutions with flexibility and cost-efficiency.</p>
<p>Over three-quarters of organizations that have 50+ workers <a target="_blank" href="https://smartprofile.io/analytics-papers/vmware-far-largest-server-virtualisation-market/">use server virtualization</a>. So it's hard to overestimate the importance of the data that's circulating in their virtualized workloads.</p>
<p>The workloads themselves can be mission-critical and cause global disruption and downtime in case of failures. The data can also be crucial to run efficient services and generate revenue or be subject to compliance requirements.</p>
<h2 id="heading-understanding-the-risks-of-virtual-environments">Understanding the Risks of Virtual Environments</h2>
<p>Before we proceed with VM security best practices, let’s go over some general security issues associated with virtual environments.</p>
<ul>
<li><p><strong>Data breaches</strong> are a regular issue that most IT protection systems experience. A lone hacker or an organized cybercriminal group can intrude into corporate environments to steal data. Their targets are typically clients' personal data, credit card info, credentials, and intellectual property.</p>
</li>
<li><p><strong>Insider threats</strong> are usually the most underrated yet <a target="_blank" href="https://www.ekransystem.com/en/blog/insider-threat-statistics-facts-and-figures">exceptionally dangerous issue</a>. Malicious insiders sneakily strike from the inside of an organization’s security perimeter and may have advanced access privileges. This can lead to a global IT disaster, and preventing it is a high-level challenge.</p>
</li>
<li><p><strong>Malware and ransomware attacks</strong> are an ever-evolving threat for organizations of all sizes and types.</p>
</li>
<li><p><strong>System vulnerabilities and exploits.</strong> The supply chains of today’s IT services can be complicated and consist of multiple synchronized solutions. Every solution involved in service provisioning is a potential source of vulnerabilities that malicious actors can exploit upon discovery.</p>
</li>
</ul>
<h2 id="heading-specific-risks-associated-with-virtual-environments">Specific Risks Associated with Virtual Environments</h2>
<p>Understanding the risks of virtualization – particularly with VMware, one of the most popular virtualization platforms for enterprises, and Proxmox, which has seen increasing adoption in recent times – will help you and your team build an effective data protection system in your virtualized environments.</p>
<p>The unique threats associated with these platforms dictate how you should secure your virtual machines, servers, networks, and other virtualized nodes.</p>
<p>Key factors that can weaken virtualized infrastructure security include:</p>
<h3 id="heading-hypervisor-security-vulnerabilities"><strong>Hypervisor security vulnerabilities</strong></h3>
<ul>
<li><p><strong>VMware</strong>: Because of its extensive use in enterprises, attackers frequently target VMware. Major issues can arise due to the integration and complexity of VMware's hypervisor. The "<a target="_blank" href="https://www.nakivo.com/blog/vmware-esxi-ransomware/?utm_source=Freecodecamp&amp;utm_medium=guest_post&amp;utm_campaign=free_trial">ESXiArgs</a>" ransomware strain takes advantage of VMware vulnerabilities to infiltrate computers before the distribution of updates.</p>
</li>
<li><p><strong>Proxmox</strong>: While this open-source technology does have the potential for hypervisor vulnerabilities, the community can also provide security improvements such as timely patches, vulnerability reports, and enhancements to security protocols. Insufficiently managed upgrades or third-party modules can put Proxmox users at risk of security vulnerabilities.</p>
</li>
</ul>
<h3 id="heading-vm-sprawl"><strong>VM sprawl</strong></h3>
<ul>
<li><p><strong>VMWare:</strong> The ease of deploying VMs in VMware can lead to VM sprawl, where numerous virtual machines are created but not adequately managed. IT teams can create a virtual machine, for example, to test a new feature in an isolated environment before releasing it in production. If not deleted after completing the task, the new virtual machine can remain in an environment without attention, maintenance, or security updates.</p>
</li>
<li><p><strong>Proxmox</strong>: Proxmox's flexibility in managing virtual environments causes VM sprawl, which is more likely to affect smaller teams lacking strong monitoring. Its straightforward interface and streamlined deployment processes help to make creating and managing many virtual machines (VMs) a delight. While this helps with development and testing quickly, it can also cause an influx of virtual machines (VMs) to be launched without proper management or preparation.</p>
</li>
</ul>
<h4 id="heading-insecure-vm-configurations"><strong>Insecure VM configurations</strong></h4>
<ul>
<li><p><strong>VMware</strong>: A VMWare virtual machine itself is a complex environment with multiple configurations and dependencies. Misconfiguration of VMware's resources, operating systems, or applications can lead to additional virtual desktop security risks.</p>
</li>
<li><p><strong>Proxmox</strong>: Users of Proxmox might also face security pitfalls due to misconfigured VMs, especially when utilizing custom templates or third-party integrations. Insufficient security settings can expose services and open ports, enabling unauthorized access.</p>
</li>
</ul>
<h4 id="heading-snapshot-and-clone-risks"><strong>Snapshot and clone risks</strong></h4>
<ul>
<li>Inappropriate VM snapshot retention and maintenance policies in both Proxmox and VMware environments can cause storage overload. Creating too many VM clones can eventually lead to RAM and CPU deficiencies. Insufficiency of hardware resources then causes performance degradation and disk failures, resulting in downtime and data loss.</li>
</ul>
<h2 id="heading-vm-data-protection-and-secure-virtualization-best-practices">VM Data Protection and Secure Virtualization Best Practices</h2>
<p>Data loss in virtualized environments, such as VMWare or Proxmox, can lead to fines, financial losses, and reputational damage for an organization.</p>
<p>Below are some recommendations on how to improve VM data security for virtual nodes, clusters, and infrastructures. The tips cover both virtualization-specific risks and those common to IT security, providing valuable insights for managing data protection effectively in both VMware and Proxmox environments.</p>
<h3 id="heading-secure-the-virtualized-environment">Secure the Virtualized Environment</h3>
<p>For starters, you can strengthen your environment with regular VM security practices. Consider implementing the following:</p>
<h4 id="heading-strong-access-controls-and-authentication-mechanisms"><strong>Strong access controls and authentication mechanisms.</strong></h4>
<p>Role-based access control (RBAC) is an efficient security measure that ensures users have only the access and privileges required to fulfill job duties. With roles set for every employee, their accounts become less dangerous under unauthorized access in case of, for example, compromised credentials.</p>
<p>This can help you either completely counter a security breach attempt or at least significantly mitigate the consequences of a protection failure. Two-factor authentication (2FA) added on top of that purposely complicates the login process, making regular passwords insufficient to hack and exploit an account.</p>
<h4 id="heading-regular-updates-and-patch-management"><strong>Regular updates and patch management</strong></h4>
<p>Set up regular update checks for solutions included in your supply chain. Installing updates and especially security patches on time means that your system closes known vulnerabilities. This reinforces the security perimeter and can protect your environment from random breaches and brute-force attacks, supporting secure virtualization.</p>
<h4 id="heading-network-segmentation-and-isolation"><strong>Network segmentation and isolation</strong></h4>
<p>Combined with external protection reinforcement, segmenting your network using virtual routers, firewalls and switches can be efficient in isolating critical workloads and data from major threats.</p>
<p>A complex internal environment poses an additional challenge for hackers preparing their attacks. Also, if a network scan shows that the infrastructure is ramified and segmented, some bad actors may even conclude that an attack is not worth the effort.</p>
<h3 id="heading-backup-and-recovery-strategies">Backup and Recovery Strategies</h3>
<p>Backups are essential in building an efficient VM data protection system. When all else fails, a backup can help you restore critical data and workloads with little to no downtime.</p>
<p>An efficient VM backup and recovery system includes:</p>
<p><strong>Regular and automated VM backups.</strong> To ensure minimal downtime, you need a backup with a “fresh” recovery point recorded. Given the complexity of even the smallest corporate virtualized environments, only automation and scheduling backups can ensure their regularity.</p>
<p><strong>Offsite and cloud-based backup solutions.</strong> In addition to onsite backups, consider sending data copies to offsite and cloud repositories. This helps you avoid a single point of failure and keep up with the 3-2-1 backup rule.</p>
<p>In case your main infrastructure is down due to a disruption, offsite backups in two different destinations can remain recoverable and accessible.</p>
<p><strong>Disaster recovery planning and testing.</strong> Virtualized environments can include hundreds and thousands of virtual machines, servers and clusters to provide stable and efficient services.</p>
<p>To minimize downtime after global failures, you need to <a target="_blank" href="https://www.nakivo.com/blog/components-disaster-recovery-plan-checklist/">plan disaster recovery</a> (DR) sequences and test them regularly. Set up a scheduled testing workflow to ensure checks.</p>
<p>Also, you might want to conduct disaster recovery testing sessions every time you introduce changes into your main virtualized environment.</p>
<p>Advanced <a target="_blank" href="https://www.cybersecurity-insiders.com/proxmox-backup-by-nakivo-powerful-vm-data-protection/">VM data protection</a> solutions for secure virtualization, such as <a target="_blank" href="https://www.nakivo.com/proxmox-backup/">NAKIVO Backup &amp; Replication</a>, provide the set of features and functions required to implement the above-mentioned VM backup recommendations.</p>
<p>As a regular user of the NAKIVO solution, specifically for protecting virtualized environments, I’ve experienced firsthand the benefits of its robust features. I highly recommend taking advantage of the <a target="_blank" href="https://www.nakivo.com/resources/download/trial-download/?utm_source=Freecodecamp&amp;utm_medium=guest_post&amp;utm_campaign=free_trial">free version</a> of this solution, which is available until the end of 2024.</p>
<h3 id="heading-monitoring-and-auditing">Monitoring and Auditing</h3>
<p>One of the most efficient VM data protection best practices for virtualized environments is to monitor resource usage, VM health, and behavior. This includes the following:</p>
<p><strong>Continuous monitoring of virtualized environments.</strong> Sufficient hardware resources are crucial for production continuity in virtualized environments. You may want to keep track of infrastructures in general and mission-critical VMs in particular. Thus, you can know the current resource consumption and predict scaling needs and budgets to support system stability as your organization grows.</p>
<p><strong>Audit trails and logging.</strong> Audit trails and logging help you get a sequential record of specific activities and data within systems and their components. This includes failed and successful logins, MAC addresses and IPs of involved devices, access locations, data transactions as well as VM and policy changes.</p>
<p><strong>Anomaly detection and response.</strong> With monitoring and logging established and functioning, you can detect anomalies in the behavior of users and VMs, and resource consumption changes within system nodes. With such behavioral data, you can timely react to potential security threats.</p>
<h2 id="heading-advanced-protection-techniques">Advanced Protection Techniques</h2>
<p>Advanced threat protection tips for virtual machines describe techniques related to encryption, intrusion detection and prevention systems, and additional security of applications and networks. Let’s review every technique in detail.</p>
<h3 id="heading-encryption">Encryption</h3>
<p>In a modern IT landscape where any user is able to download and use traffic interception tools, unencrypted data is most likely public data. To enhance your VM data protection for secure virtualization, you can ensure:</p>
<ul>
<li><p><strong>Encrypting data at rest and in transit.</strong> Encrypt data during transmission (in flight) and throughout retention (at rest). Such all-round data encryption enables you to enhance protection from unauthorized access in most situations.</p>
</li>
<li><p><strong>Implementing secure key management.</strong> For additional security, consider setting up an encryption key management system. This includes regular generation, secure exchange, storage and use, timely destruction and replacement of encryption keys.</p>
</li>
</ul>
<h3 id="heading-intrusion-detection-and-prevention-systems-idps">Intrusion Detection and Prevention Systems (IDPS)</h3>
<p>Intrusion detection and prevention systems are designed to scan and monitor networks and automatically take action to counter possible breaches.</p>
<ul>
<li><p><strong>Integrating IDPS with VMs.</strong> IDPS integration is about revealing the key nodes of your virtual environment and installing program “sensors” that track the situation around them. You can then count on software automation to take the first actions to counter possible intrusions as they occur.</p>
</li>
<li><p><strong>Real-time threat detection and response.</strong> Consider developing specialized workflows for responding to intrusions after the IDPS detects them and stops the most obvious malicious activities. Keep in mind that modern cyberattacks can involve a multi-layered series of smaller hits to distract and deceive the defenders.</p>
</li>
</ul>
<h3 id="heading-application-and-network-security">Application and Network Security</h3>
<p>In addition to supply chain control, network segmentation, and isolation, you can make your VM data protection system more reliable with additional app and network security enhancements. For instance, consider the following steps:</p>
<ul>
<li><p><strong>Hardening VM applications.</strong> As apps can become weak links in your protection chain, consider hardening their protection. For example, remove unnecessary components and disable unwanted services that such applications might run. Also, you can set reliable passwords, regular code reviews and role-based access controls within apps.</p>
</li>
<li><p><strong>Implementing firewall and VPN solutions.</strong> These are additional VM data protection best practices that specifically harden networks. External and internal firewalls can prevent unauthorized access to system elements, while VPN connections ensure secure access for authorized users.</p>
</li>
</ul>
<h2 id="heading-future-trends-in-vm-data-protection">Future Trends in VM Data Protection</h2>
<p>The future of secure virtualization mainly depends on the evolution of relevant threats. The popularity of virtualization solutions, such as VMWare and Proxmox, defines the close attention that hackers pay to VM vulnerabilities and specifics.</p>
<p>Malicious actors also shape their ransomware, interception, and intrusion tools to become more dangerous to virtualized IT infrastructure. Sophisticated malware enables deeply customized attacks that exploit the VM security weaknesses of the organization’s infrastructure.</p>
<p>The improvement of AI algorithms can bring additional challenges to the field, making malware spread faster, becoming less detectable, and targeting priority nodes with efficient strikes.</p>
<p>However, the same idea works for VM security best practices. AI-driven cyber defense solutions can help detect and counter specific threats in VM environments with significantly better performance and efficiency.</p>
<p>Advanced VM threat detection based on behavioral analysis throughout the entire infrastructure can help reveal malware earlier. Prevention tools independently reacting to potentially dangerous changes in an environment can enable quick response and counter cyberattacks right after they begin.</p>
<p>Lastly, AI can learn how to enhance protection flexibility and introduce defensive changes in an environment depending on how a cyberattack develops. The boosted speed and variety of <a target="_blank" href="https://www.hostpapa.com/blog/web-hosting/what-small-businesses-need-to-know-about-cybersecurity/">cybersecurity</a> moves then promote virtualized security (and data protection as a whole) to notably higher effectiveness levels.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Thorough VM security is crucial for any organization that's using virtualized IT environments. Consider implementing strong access controls, patch management, network segmentation, monitoring, auditing and app security to counter key threats and mitigate their outcomes.</p>
<p>You might also want to build an advanced <a target="_blank" href="https://www.nakivo.com/blog/proxmox-backup/">Proxmox replication</a> or <a target="_blank" href="https://www.nakivo.com/blog/vmware-backup/">VMware backup</a> system to have a swift data recovery option in case of a breach or system failure.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to run Docker on Windows 10 Home edition ]]>
                </title>
                <description>
                    <![CDATA[ By Mihail Gaberov Recently I have been watching a tutorial where, in order to follow it, you need to have Docker running on your machine. So far, so good.  But it turns out that the latest versions of Docker require Windows 10 Pro, Enterprise, or Edu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-run-docker-on-windows-10-home-edition/</link>
                <guid isPermaLink="false">66d46052d14641365a050927</guid>
                
                    <category>
                        <![CDATA[ ArchLinux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Docker ]]>
                    </category>
                
                    <category>
                        <![CDATA[ VirtualBox  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vm ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows 10 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 22 Jan 2020 09:38:50 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/head-image-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Mihail Gaberov</p>
<p>Recently I have been watching a tutorial where, in order to follow it, you need to have <a target="_blank" href="https://docs.docker.com/docker-for-windows/install/">Docker</a> running on your machine. So far, so good. </p>
<p>But it turns out that the latest versions of Docker require Windows 10 Pro, Enterprise, or Education. Which means that if you are like me and have just Windows 10 Home edition on your personal laptop, then you cannot use Docker…<strong>or maybe you still can</strong>. </p>
<p>Read on below to find out how. ?</p>
<h2 id="heading-reasoning">Reasoning</h2>
<p>First, let's do a short summary of the situation. What do we want to achieve and what do we currently have?</p>
<p>We have Windows 10 OS Home edition on our machine. We would like to have Docker running on the same machine so that we are able to create docker images, run containers, and learn better and grow faster! </p>
<p>The last one is a bit out of the scope of this article, but we should start from somewhere, no? ?.</p>
<h2 id="heading-actions">Actions</h2>
<p>After defining what we want, let's see how to achieve it. Here are the steps I followed. It worked for me, which make me want to share it with you. And maybe I can save someone a few days of going back and forth to StackOverflow! ?</p>
<p>After some reading, I found this <a target="_blank" href="http://support.divio.com/en/articles/646695-how-to-use-a-directory-outside-c-users-with-docker-toolbox-docker-for-windows">article</a>. It explains that it is possible to use Docker in Windows 10 Home by leveraging a Linux virtual machine and having Docker containers running on it. Let's see how it works.</p>
<h3 id="heading-step-1-installations">Step 1: Installations</h3>
<p>First you need to install a software called <a target="_blank" href="https://www.virtualbox.org/">Oracle VM VirtualBox</a>. It gives you the ability to have multiple virtual machines installed on your physical one. This way we can have a virtual machine which will be running Linux where our Docker will live.</p>
<p>Then use Windows PowerShall and <a target="_blank" href="https://chocolatey.org/">Chocolatey</a>, your Windows package manager, to install a <em>docker-machine</em> by running the following:</p>
<pre><code class="lang-bash">choco install docker-machine
</code></pre>
<p>Open your favorite bash terminal app and run this:</p>
<pre><code class="lang-bash">docker-machine create --driver virtualbox default
</code></pre>
<p>This will create a docker virtual machine called 'default'.</p>
<h3 id="heading-step-2-configurations">Step 2: Configurations</h3>
<p>Next, we need to configure which ports are exposed when running Docker containers. You can do that by going to Oracle VM VirtualBox -&gt; default virtual machine -&gt; Settings -&gt; Network -&gt; Adapter 1 -&gt; Port Forwarding.</p>
<p><img src="https://mihail-gaberov.eu/static/fb9bdc0bd6814d55c65b8ea7c761c8bd/fcda8/port-forwarding.png" alt="VirtualBox Port Forwarding" width="600" height="400" loading="lazy"></p>
<p>This was the <strong>most critical</strong> <strong>detail</strong> that I forgot . We need to allow Docker to mount volumes located on your hard drive. By default, you can only mount from the <code>C://Users/</code> directory. </p>
<p>To add a different path, simply go to the <strong>Oracle VM VirtualBox</strong> GUI. Select <strong>default</strong> VM and go to <em>Settings &gt; Shared Folders</em>. If you don't mind to use the default settings, do not forget to put your project under the 'Users' directory, e.g. <code>C:\Users\{your project}</code>. </p>
<p>In my case, I forgot about this and had to spend few days of head banging until I figured out why the heck was I getting a "Couldn't find package.json" error when trying to run the <a target="_blank" href="https://github.com/mihailgaberov/microservices">containers</a>, built through this <a target="_blank" href="https://www.youtube.com/watch?v=6Yfm5gHQjaQ&amp;list=PLnTRniWXnjf8YC9qJFLSVCrXfS6cyj6x6&amp;index=2">tutorial</a>.</p>
<p>Start the virtual machine by running the following command in your terminal app:</p>
<pre><code class="lang-bash">docker-machine start default
</code></pre>
<h3 id="heading-step-3-setting-up-environment-variables">Step 3: Setting up Environment Variables</h3>
<p>Next, we need to set up Docker environment variables:</p>
<pre><code class="lang-bash">docker-machine env default
</code></pre>
<p>This allows the Docker client and Docker Compose to communicate with the Docker Engine running in the Linux VM that we named "default".</p>
<p>You may also need to run:</p>
<pre><code class="lang-bash">@FOR /f <span class="hljs-string">"tokens=*"</span> %i IN (<span class="hljs-string">'"C:\ProgramData\chocolatey\lib\docker-machine\bin\docker-machine.exe" env'</span>) DO @%i
</code></pre>
<p>in order to get Docker working properly. <em>Note: the specified path in the above command may vary depending on your setup</em>.</p>
<p>If you are going to use things such as <code>docker-compose up</code>, you will need to install Docker Tools as well. You may do it by running the following commands in PowerShall:</p>
<pre><code class="lang-bash">choco install docker-cli
choco install docker-compose
</code></pre>
<p>These will install everything you need to start using Docker on your Windows 10 Home OS.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Now that we have all we need, we may spend our time on actual learning, either by following a docker-related tutorial or reading a book. No matter what you want to do next, you have all the tools you will need. </p>
<p>I personally will try to <a target="_blank" href="https://github.com/mihailgaberov/microservices">finish</a> the previously mentioned tutorial and then, who knows, may be I will start using Docker for each project I do.</p>
<p>By the way, during the process of researching, I found a very promising book which is specifically about Docker. It's called <em>"Docker in Practice" by Ian Miell</em>. If this interests you, you might want to take a look.</p>
<p>? Thanks for reading! ?</p>
<h3 id="heading-references"><strong>References</strong></h3>
<ul>
<li><a target="_blank" href="https://www.virtualbox.org/">https://www.virtualbox.org/</a></li>
<li><a target="_blank" href="https://www.sitepoint.com/docker-windows-10-home">https://www.sitepoint.com/docker-windows-10-home</a></li>
<li><a target="_blank" href="https://www.youtube.com/watch?v=6Yfm5gHQjaQ&amp;list=PLnTRniWXnjf8YC9qJFLSVCrXfS6cyj6x6&amp;index=2">https://www.youtube.com/watch?v=6Yfm5gHQjaQ&amp;list=PLnTRniWXnjf8YC9qJFLSVCrXfS6cyj6x6&amp;index=2</a></li>
<li><a target="_blank" href="https://github.com/mihailgaberov/microservices">https://github.com/mihailgaberov/microservices</a></li>
<li><a target="_blank" href="http://support.divio.com/en/articles/646695-how-to-use-a-directory-outside-c-users-with-docker-toolbox-docker-for-windows">http://support.divio.com/en/articles/646695-how-to-use-a-directory-outside-c-users-with-docker-toolbox-docker-for-windows</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
