<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kvm on Panic! At The Terminal</title>
    <link>https://blog.nousiainen.xyz/tags/kvm/</link>
    <description>Recent content in Kvm on Panic! At The Terminal</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 19 Jul 2025 21:03:07 +0300</lastBuildDate>
    <atom:link href="https://blog.nousiainen.xyz/tags/kvm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to Restore a Broken KVM VM from Backup</title>
      <link>https://blog.nousiainen.xyz/docs/kvm-vm-restore-from-backup/</link>
      <pubDate>Fri, 18 Jul 2025 20:00:00 +0300</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/kvm-vm-restore-from-backup/</guid>
      <description>&lt;h1 id=&#34;how-to-restore-a-broken-kvm-vm-from-backup&#34;&gt;&#xA;  How to Restore a Broken KVM VM from Backup&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#how-to-restore-a-broken-kvm-vm-from-backup&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Sometimes things go wrong with virtual machines — maybe a filesystem corruption or a bad update. When that happens, restoring from a backup is your best friend.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s how I restored my broken KVM VM disk image using weekly backups stored on a NAS share.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-situation&#34;&gt;&#xA;  The situation&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#the-situation&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;I have a VM called &lt;code&gt;runner.home.arpa&lt;/code&gt; running on KVM, and its disk got corrupted. The VM disk images live at &lt;code&gt;/var/lib/libvirt/images/&lt;/code&gt;, and my backups are stored on a NAS mounted at &lt;code&gt;/mnt/backups/runner.home.arpa/&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating KVM Backups with Ansible</title>
      <link>https://blog.nousiainen.xyz/docs/backing-up-kvm/</link>
      <pubDate>Sat, 12 Jul 2025 10:00:00 +0300</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/backing-up-kvm/</guid>
      <description>&lt;h1 id=&#34;automating-kvm-homelab-backups-with-ansible&#34;&gt;&#xA;  Automating KVM Homelab Backups with Ansible&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#automating-kvm-homelab-backups-with-ansible&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;When you&amp;rsquo;re running a dozen virtual machines in your homelab, manual backups quickly become a nightmare.&lt;/p&gt;&#xA;&lt;p&gt;In this post, I&amp;rsquo;ll walk you through my Ansible-based backup strategy for my KVM homelab. It automatically backs up all VMs by shutting them down gracefully, copying their disk images and configurations to a NAS, and bringing them back online.&lt;/p&gt;&#xA;&lt;h2 id=&#34;backup-strategy&#34;&gt;&#xA;  Backup Strategy&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#backup-strategy&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;My backup strategy uses Ansible to orchestrate the entire process:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Optimizing KVM Virtual Machines with Tuned Profiles</title>
      <link>https://blog.nousiainen.xyz/docs/kvm-vm-tuning-ansible/</link>
      <pubDate>Mon, 07 Jul 2025 12:00:00 +0300</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/kvm-vm-tuning-ansible/</guid>
      <description>&lt;h1 id=&#34;optimizing-kvm-virtual-machines-with-tuned-profiles&#34;&gt;&#xA;  Optimizing KVM Virtual Machines with Tuned Profiles&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#optimizing-kvm-virtual-machines-with-tuned-profiles&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;tuned&lt;/code&gt; service on Red Hat-based systems provides pre-configured performance profiles that can significantly improve your VM performance with minimal effort.&lt;/p&gt;&#xA;&lt;p&gt;In this post, I&amp;rsquo;ll show you how to optimize your KVM VMs using tuned profiles and automate the entire process with Ansible.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-playbook&#34;&gt;&#xA;  The Playbook&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#the-playbook&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Since I manage dozens of VMs in my homelab, doing this manually would be tedious. Instead, I use this Ansible playbook to apply tuned optimization to all my VMs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automated KVM VM Provisioning with Ansible and OSBuild on RHEL9</title>
      <link>https://blog.nousiainen.xyz/docs/automated-vm-provisioning-with-ansible-and-osbuild/</link>
      <pubDate>Thu, 03 Jul 2025 14:00:00 +0300</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/automated-vm-provisioning-with-ansible-and-osbuild/</guid>
      <description>&lt;h1 id=&#34;automated-kvm-vm-provisioning-with-ansible-and-osbuild-on-rhel9&#34;&gt;&#xA;  Automated KVM VM Provisioning with Ansible and OSBuild on RHEL9&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#automated-kvm-vm-provisioning-with-ansible-and-osbuild-on-rhel9&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;&#xA;  Introduction&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#introduction&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;When I started looking into automating my homelab VM provisioning, I was surprised by the lack of examples combining Ansible with OSBuild for KVM environments. Not many tutorials focus on KVM, so I wanted something that used Red Hat&amp;rsquo;s tooling - as I run a RHEL homelab.&lt;/p&gt;&#xA;&lt;p&gt;I used to provision my homelab virtual machines by hand and eventually I got tired of doing it since I like to tinker around a lot and constantly add new VMs. So, I decided to automate the process using the combination of Ansible and OSBuild.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
