<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Chris J Arges</title><link>https://chrisarges.net/posts/</link><description>Recent content in Posts on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 03 Apr 2026 20:30:00 +0000</lastBuildDate><atom:link href="https://chrisarges.net/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>how i'm using llms in 2026</title><link>https://chrisarges.net/posts/2026-04-03-my-llm-journey/</link><pubDate>Fri, 03 Apr 2026 20:30:00 +0000</pubDate><guid>https://chrisarges.net/posts/2026-04-03-my-llm-journey/</guid><description>&lt;h1 id="how-im-using-llms-in-2026"&gt;How I&amp;rsquo;m using LLMs in 2026&lt;/h1&gt;&#10;&lt;p&gt;I had to admit I caught the LLM wave a bit late. This is a story of my journey&#10;and what I&amp;rsquo;ve learned.&lt;/p&gt;&#10;&lt;h2 id="ai-as-science-fiction"&gt;AI as Science Fiction&lt;/h2&gt;&#10;&lt;p&gt;As a kid, &amp;ldquo;Artificial Intelligence&amp;rdquo; for me was science-fiction. It was Skynet&lt;a href="https://en.wikipedia.org/wiki/Skynet_(Terminator)" title="Skynet - Terminator franchise"&gt;1&lt;/a&gt;&#10;and Replicants&lt;a href="https://en.wikipedia.org/wiki/Replicant" title="Replicants - Blade Runner"&gt;2&lt;/a&gt; and positronic brains&lt;a href="https://en.wikipedia.org/wiki/Three_Laws_of_Robotics" title="Positronic brains - Isaac Asimov's Robot series"&gt;3&lt;/a&gt;. Although eventually when I started taking&#10;computer science classes, I learned that computers could display aspects of&#10;intelligence with things like primitive neural networks and red-black decision&#10;trees. After graduating I took a &amp;ldquo;Machine Learning&amp;rdquo; class and learned about how&#10;large datasets could actually produce more meaningful results with techniques&#10;like Random Forests and k-means clusters. All the while, computer vision, OCR,&#10;speech to text all kind of worked.&lt;/p&gt;</description></item><item><title>setting up a timelapse raspberry pi</title><link>https://chrisarges.net/posts/2023-11-17-timelapse-raspi/</link><pubDate>Fri, 17 Nov 2023 00:00:00 +0000</pubDate><guid>https://chrisarges.net/posts/2023-11-17-timelapse-raspi/</guid><description>&lt;p&gt;My daughter had a great idea one afternoon. She said it would be really cool to&#10;take a picture of a plant growing every day and then see what happens. Maybe&#10;she was inspired by a video she saw at school. Regardless, I took up the&#10;challenge and we embarked on this project together.&lt;/p&gt;&#10;&lt;p&gt;For her part she set up a planter that has a water circulation and light&#10;system. Once this was set up and the seed pods were ready, I brought out my&#10;trusty Raspberry Pi Model 3.&lt;/p&gt;</description></item><item><title>making a game with chatgpt</title><link>https://chrisarges.net/posts/2023-03-29-using-chatgpt-to-make-a-game/</link><pubDate>Wed, 29 Mar 2023 00:00:00 +0000</pubDate><guid>https://chrisarges.net/posts/2023-03-29-using-chatgpt-to-make-a-game/</guid><description>&lt;p&gt;There is obviously a lot of hype around ChatGPT and GPT4 right now. I wanted to&#10;take it on a test drive and see if it could help me rapidly prototype and write&#10;some code. I actually wanted to try an idea my daughter had for a game. She&#10;has been very interested in how businesses work and said it would be cool if&#10;there was a game where you had to run a lemonade stand.&lt;/p&gt;</description></item><item><title>playing piano in linux</title><link>https://chrisarges.net/posts/2021-04-26-playing-piano-in-linux/</link><pubDate>Mon, 26 Apr 2021 00:00:00 +0000</pubDate><guid>https://chrisarges.net/posts/2021-04-26-playing-piano-in-linux/</guid><description>&lt;p&gt;While on vacation I brought my small MIDI &lt;a href="https://www.akaipro.com/lpk25"&gt;keyboard&lt;/a&gt; along so that the kids could easily practice piano. This keyboard does not generate sounds on its own, so it requires some other device to generate the sounds based on the MIDI output. I used my laptop running Linux to accomplish this with some minimal setup.&lt;/p&gt;&#10;&lt;p&gt;First you must plug the keyboard in via USB. If you launch the program and get sounds, great! If not you may have to manually connect MIDI via &lt;code&gt;aconnect&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>tracing linux</title><link>https://chrisarges.net/posts/2020-12-11-tracing-on-linux/</link><pubDate>Fri, 11 Dec 2020 12:31:49 -0600</pubDate><guid>https://chrisarges.net/posts/2020-12-11-tracing-on-linux/</guid><description>&lt;p&gt;I&amp;rsquo;ve written up about some of my work at Confluera here:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://medium.com/confluera-engineering/tracing-linux-fast-compatible-complete-19cee89b3cf6"&gt;medium&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.confluera.com/post/tracing-linux-fast-compatible-complete"&gt;confluera&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>setting up a Minecraft server</title><link>https://chrisarges.net/posts/2020-09-04-setting-up-a-minecraft-server/</link><pubDate>Fri, 04 Sep 2020 10:22:46 -0500</pubDate><guid>https://chrisarges.net/posts/2020-09-04-setting-up-a-minecraft-server/</guid><description>&lt;p&gt;We&amp;rsquo;ve been spending a lot of time at home lately due to the current pandemic.&#10;Because of this the kids have really enjoyed playing Minecraft together.&#10;Initially I set up a LAN server for them to play together, but wanted to set up&#10;a community server that their friends could also access. Here I&amp;rsquo;ll describe&#10;some approaches to this with the goal of keeping things automated, low cost,&#10;secure and easy for friends to play.&lt;/p&gt;</description></item><item><title>install openssh on windows</title><link>https://chrisarges.net/posts/2019-07-16-openssh-install-on-windows/</link><pubDate>Tue, 16 Jul 2019 09:32:28 -0500</pubDate><guid>https://chrisarges.net/posts/2019-07-16-openssh-install-on-windows/</guid><description>&lt;p&gt;The following are instructions on how to setup OpenSSH on various Windows&#10;server versions. This is great if you come from a Linux background and are very&#10;used to SSH for accessing machines.&lt;/p&gt;&#10;&lt;h2 id="windows-server-2019"&gt;Windows Server 2019&lt;/h2&gt;&#10;&lt;p&gt;First run PowerShell as Administrator.&lt;/p&gt;&#10;&lt;p&gt;Next install SSH and SSHD for Windows:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0&#10;Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0&#10;&#10;Start-Service sshd&#10;Set-Service -Name sshd -StartupType &amp;#39;Automatic&amp;#39;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Confirm installation by ensuring rules are correct:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Get-NetFirewallRule -Name *ssh*&#10;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="windows-server-20162012r2"&gt;Windows Server 2016/2012R2&lt;/h2&gt;&#10;&lt;p&gt;Download zip from github:&lt;/p&gt;</description></item><item><title>bpf for linux tracing</title><link>https://chrisarges.net/posts/2019-03-21-bpf-for-tracing/</link><pubDate>Thu, 21 Mar 2019 11:54:37 -0500</pubDate><guid>https://chrisarges.net/posts/2019-03-21-bpf-for-tracing/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;Originally called eBPF for extended Berkeley Packet Filter, BPF is an in-kernel&#10;bytecode interpreter that is very multi-purpose. In this post, I&amp;rsquo;m going to&#10;focus on its tracing capabilities.&lt;/p&gt;&#10;&lt;p&gt;To use BPF one can use the bpf &lt;a href="http://man7.org/linux/man-pages/man2/bpf.2.html"&gt;syscall&lt;/a&gt;. This provides a way to both load&#10;BPF bytecode programs and also create memory maps for sharing data between&#10;kernel and user space.&lt;/p&gt;&#10;&lt;p&gt;Because of the complexity, using bpf in a DIY method becomes a bit complex.&#10;There are many ready to use tools such as &lt;a href="https://github.com/iovisor/bcc"&gt;BCC&lt;/a&gt; and libbpf that make usage&#10;way easier.&lt;/p&gt;</description></item><item><title>the magic of linux clone</title><link>https://chrisarges.net/posts/2019-01-14-the-magic-of-linux-clone/</link><pubDate>Mon, 14 Jan 2019 12:44:27 -0600</pubDate><guid>https://chrisarges.net/posts/2019-01-14-the-magic-of-linux-clone/</guid><description>&lt;p&gt;Processes and threads are concepts that have been used across many operating&#10;systems and programming languages. While we tend to think of &amp;lsquo;process&amp;rsquo; as a&#10;heavy thing and &amp;rsquo;thread&amp;rsquo; as a light thing, how they are implemented and handled&#10;depends on context. This article will focus on how the Linux operating system&#10;handles these concepts and the mechanisms used.&lt;/p&gt;&#10;&lt;h2 id="creating-a-new-process"&gt;Creating a new process&lt;/h2&gt;&#10;&lt;p&gt;Generally in Linux if you want to create a new process in C you can do the following:&lt;/p&gt;</description></item><item><title>tracing in linux</title><link>https://chrisarges.net/posts/2018-10-04-tracing-in-linux/</link><pubDate>Thu, 04 Oct 2018 09:39:10 -0500</pubDate><guid>https://chrisarges.net/posts/2018-10-04-tracing-in-linux/</guid><description>&lt;p&gt;Tracing in Linux is robust, flexible and has many options. So what mechanisms&#10;exist both in kernel and user space for instrumenting the kernel? In addition&#10;what is available in which kernel version, and what requirements does each&#10;technology require? Here we&amp;rsquo;ll mostly focus on syscall tracing.&lt;/p&gt;&#10;&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;A great overview on Linux tracing systems can be found &lt;a href="https://jvns.ca/blog/2017/07/05/linux-tracing-systems/"&gt;here&lt;/a&gt;. Overall&#10;thinking about tracing systems as data sources (in kernel), and frontends help&#10;explain why there are so many tools. Some data sources are &amp;rsquo;tracepoints&amp;rsquo; while&#10;other are &amp;lsquo;probes&amp;rsquo;. Tracepoints are low-overhead and can be activated or&#10;deactivated, they are compiled into the kernel so they cannot be dynamically&#10;instrumented. Probes are very flexible, but require larger overhead as you are&#10;replacing a &amp;rsquo;nop&amp;rsquo; instruction with a branch in order to redirect execution of&#10;probed function. In addition you must know the function name and can only&#10;instrument &amp;lsquo;real&amp;rsquo; (non-inlined) functions. Some good slides describing this are&#10;&lt;a href="https://blog.linuxplumbersconf.org/2014/ocw/system/presentations/1773/original/ftrace-kernel-hooks-2014.pdf"&gt;here&lt;/a&gt;. Other overviews of tracing technologies can be found &lt;a href="http://www.brendangregg.com/blog/2015-07-08/choosing-a-linux-tracer.html"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>using sed encryption on harddrives</title><link>https://chrisarges.net/posts/2018-02-15-using-sed-encryption-on-disks/</link><pubDate>Thu, 15 Feb 2018 21:42:03 -0600</pubDate><guid>https://chrisarges.net/posts/2018-02-15-using-sed-encryption-on-disks/</guid><description>&lt;p&gt;Disk encryption can be accomplished on Linux in many ways depending on your&#10;hardware. &lt;a href="https://gitlab.com/cryptsetup/cryptsetup/"&gt;LUKS&lt;/a&gt; provides block-layer level encryption, and most modern&#10;Linux distros provide easy ways to use and setup keys with the device. The&#10;&lt;a href="http://ecryptfs.org/"&gt;eCryptFS&lt;/a&gt; project provides filesystem level encryption which gives a bit&#10;more flexibility.&lt;/p&gt;&#10;&lt;p&gt;However, many new disks have encryption built-in to the drive&amp;rsquo;s controller and&#10;can be interfaced with utilities such as &lt;a href="https://wiki.archlinux.org/index.php/hdparm"&gt;hdparm&lt;/a&gt; and &lt;a href="https://github.com/Drive-Trust-Alliance/sedutil"&gt;sedutil-cli&lt;/a&gt;.&#10;This built in encryption is called FDE (Full Disk Encryption) or SED (Self&#10;Encrypting Drives). When these disks have encryption keys enabled, upon power&#10;loss they become locked and must be unlocked before they are used. Different&#10;protocols can be used for disks, here I&amp;rsquo;ll cover OPAL and ATA type commands.&lt;/p&gt;</description></item><item><title>getting activity logs from azure</title><link>https://chrisarges.net/posts/2018-01-22-getting-activity-logs-from-azure/</link><pubDate>Mon, 22 Jan 2018 11:26:32 -0600</pubDate><guid>https://chrisarges.net/posts/2018-01-22-getting-activity-logs-from-azure/</guid><description>&lt;p&gt;I was tasked with looking into how to connect to the Azure API using python.&#10;Below are some of my setup notes for getting this working.&lt;/p&gt;&#10;&lt;p&gt;First install the az client. Follow this link to get things setup on your platform:&#10;&lt;code&gt;https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;In order to create our client you can create a json file that contains the&#10;necessary credentials. This can be consumed by the python library.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;az login&#10;az ad sp create-for-rbac --sdk-auth &amp;gt; mycredentials.json&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you get a &lt;code&gt;Role assignment creation failed&lt;/code&gt; error you&amp;rsquo;ll need to ensure you&#10;have proper permissions from your Azure administrator.&lt;/p&gt;</description></item><item><title>using terraform with ansible</title><link>https://chrisarges.net/posts/2018-01-05-using-terraform-and-ansible/</link><pubDate>Fri, 05 Jan 2018 15:24:58 -0600</pubDate><guid>https://chrisarges.net/posts/2018-01-05-using-terraform-and-ansible/</guid><description>&lt;p&gt;A lot of my work lately has been transforming one-off machines into systems&#10;that can be re-generated and re-deployed easily. For much of these we use&#10;Debian packaging and ansible. In many instances the output needs to be cloud&#10;images as well as things that can be imaged on baremetal. For this we use&#10;Packer which can drive ansible. While using ansible to describe how a system is&#10;composed is nice, we also need to describe how those systems will be deployed.&#10;This is where something like terraform comes in.&lt;/p&gt;</description></item><item><title>creating a function wrapper in golang</title><link>https://chrisarges.net/posts/2016-05-20-creating-a-function-wrapper-in-golang/</link><pubDate>Fri, 20 May 2016 15:53:09 -0500</pubDate><guid>https://chrisarges.net/posts/2016-05-20-creating-a-function-wrapper-in-golang/</guid><description>&lt;p&gt;Here is a snippet that allows one to create a &amp;lsquo;wrapper&amp;rsquo; function that you can&#10;input a generic function and parameters too in golang. &lt;code&gt;callme&lt;/code&gt; takes a&#10;function and a variadic set of parameters. By using the reflect library we can&#10;properly check number of parameters a function has as well as value types.&#10;Finally we use &lt;code&gt;Call&lt;/code&gt; to call the function with the processed parameters. A use&#10;case for this could be calling a function and allowing for retries or&#10;additional checking.&lt;/p&gt;</description></item><item><title>signed kernel modules using an auxiliary key</title><link>https://chrisarges.net/posts/2016-03-25-signed-kernel-modules-using-an-auxiliary-key/</link><pubDate>Fri, 25 Mar 2016 14:55:59 -0500</pubDate><guid>https://chrisarges.net/posts/2016-03-25-signed-kernel-modules-using-an-auxiliary-key/</guid><description>&lt;p&gt;This post explains how to build a kernel and corresponding modules with the&#10;following criteria:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;code&gt;CONFIG_MODULE_SIG_KEY&lt;/code&gt; is set to default and we destroy the private part of&#10;the signing key after the initial build&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;code&gt;CONFIG_SYSTEM_TRUSTED_KEYS&lt;/code&gt; contains an additional certificate we can use to&#10;sign modules built afterwards or out of tree&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Module signing enforcement is turned on&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;By having a separate key for signing modules, one could potentially revoke the&#10;&amp;lsquo;out of tree&amp;rsquo; module signing key; but keep the built-in key for modules built&#10;during the initial build time.&lt;/p&gt;</description></item><item><title>a simple robotic car</title><link>https://chrisarges.net/posts/2016-03-18-a-simple-robotic-car/</link><pubDate>Fri, 18 Mar 2016 22:56:12 -0500</pubDate><guid>https://chrisarges.net/posts/2016-03-18-a-simple-robotic-car/</guid><description>&lt;p&gt;Here is a really cool car robot I built:&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://chrisarges.net/images/robotv1.jpg" alt="Image of Robot"&gt;&lt;/p&gt;&#10;&lt;p&gt;This post will document roughly how I put it together. If you want to build&#10;your own you can read this guide for an outline and perhaps share or improve&#10;the code.&lt;/p&gt;&#10;&lt;h1 id="setup-board"&gt;Setup Board&lt;/h1&gt;&#10;&lt;p&gt;For my car robot I&amp;rsquo;m using a Raspberry Pi Zero since it is small and uses low&#10;power. First go to this &lt;a href="https://www.raspberrypi.org/downloads/raspbian/"&gt;link&lt;/a&gt;, download and install Raspbian Lite and&#10;ensure you can boot into it on your Pi. Expand your filesystem and ensure you&#10;can connect wirelesly to your board.&lt;/p&gt;</description></item><item><title>grub-reboot with submenus</title><link>https://chrisarges.net/posts/2016-02-25-grub-reboot-with-submenus/</link><pubDate>Thu, 25 Feb 2016 10:05:51 -0500</pubDate><guid>https://chrisarges.net/posts/2016-02-25-grub-reboot-with-submenus/</guid><description>&lt;p&gt;Occasionally it is useful to be able to reboot a machine into an earlier kernel&#10;and watching and waiting for the grub menu isn&amp;rsquo;t always feasible or convenient.&lt;/p&gt;&#10;&lt;p&gt;The command &lt;code&gt;grub-reboot&lt;/code&gt; allows you to set a temporary entry to use for the&#10;next reboot; however you need to know the correct input in order for it to work.&lt;/p&gt;&#10;&lt;p&gt;First, look at &lt;code&gt;/boot/grub/grub.cfg&lt;/code&gt; and determine which kernel you want to&#10;reboot into. Note the menu and submenus to construct a string of the form&#10;&lt;code&gt;menu&amp;gt;submenu&lt;/code&gt;. For example if you want to reboot into an older kernel you can&#10;do:&lt;/p&gt;</description></item><item><title>flashing coreboot on an x60t</title><link>https://chrisarges.net/posts/2016-02-08-coreboot-on-an-x60t/</link><pubDate>Mon, 08 Feb 2016 08:48:47 -0600</pubDate><guid>https://chrisarges.net/posts/2016-02-08-coreboot-on-an-x60t/</guid><description>&lt;p&gt;I was gifted a dusty X60t and remembered how it was one of the more well&#10;supported targets for coreboot/libreboot. Thus I decided to take it apart and&#10;reflash the BIOS. The following articles explains how this is done. Note, that&#10;it is possible to flash the BIOS from a booted Linux install; I decided to do&#10;things the hard way.&lt;/p&gt;&#10;&lt;h1 id="disassembly"&gt;Disassembly&lt;/h1&gt;&#10;&lt;p&gt;This &lt;a href="https://libreboot.org/docs/install/x60tablet_unbrick.html"&gt;guide&lt;/a&gt; does a really good job of explaining how to take apart the X60t.&#10;I took pictures of before and after to remember where things were placed. The&#10;BIOS chip on my motherboard was on the backside so I had to remove it&#10;completely from the chassis.&lt;/p&gt;</description></item><item><title>building ubuntu kernels with debug symbols</title><link>https://chrisarges.net/posts/2015-10-02-building-ubuntu-kernels-with-debug-symbols/</link><pubDate>Fri, 02 Oct 2015 08:53:52 -0500</pubDate><guid>https://chrisarges.net/posts/2015-10-02-building-ubuntu-kernels-with-debug-symbols/</guid><description>&lt;p&gt;Occasionally it is useful to be able to build a kernel the Ubuntu way with&#10;debug symbols. The following is how to install dependencies, clone the tree,&#10;and finally build in such a way that ddeb packages get generated.&lt;/p&gt;&#10;&lt;p&gt;Here&amp;rsquo;s how:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get build-dep linux-image-&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;uname -r&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install fakeroot pkg-config-dbgsym git&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/wily &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd wily&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fakeroot debian/rules clean&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;debian/rules build-generic&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fakeroot debian/rules binary-generic binary-headers skipdbg&lt;span style="color:#f92672"&gt;=&lt;/span&gt;false&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Wait a bit and you should see a -dbgsym package get generated.&lt;/p&gt;</description></item><item><title>using linux livepatch on ubuntu</title><link>https://chrisarges.net/posts/2015-09-21-livepatch-on-ubuntu/</link><pubDate>Mon, 21 Sep 2015 13:03:26 -0500</pubDate><guid>https://chrisarges.net/posts/2015-09-21-livepatch-on-ubuntu/</guid><description>&lt;p&gt;Livepatching was &lt;a href="https://lkml.org/lkml/2014/11/6/387"&gt;introduced&lt;/a&gt; in the v4.0 kernel, and now Ubuntu 15.10 has&#10;a kernel capable of using this new and exciting feature. This works by using&#10;ftrace to redirect kernel function calls to the newly patched functions. In&#10;addition mechanisms for hooking into module insertion and removal are used for&#10;patching loadable modules. This feature also has sysfs directories for tracking&#10;which patches are applied and which functions they modify. With the basics&#10;aside, this blog post will show some simple examples of how to livepatch your&#10;kernel.&lt;/p&gt;</description></item><item><title>linux make deb-pkg speedup</title><link>https://chrisarges.net/posts/2015-07-30-linux-make-deb-pkg-speedup/</link><pubDate>Thu, 30 Jul 2015 15:20:31 -0500</pubDate><guid>https://chrisarges.net/posts/2015-07-30-linux-make-deb-pkg-speedup/</guid><description>&lt;p&gt;Because I&amp;rsquo;ve run &lt;code&gt;make deb-pkg&lt;/code&gt; so many times, I&amp;rsquo;ve started to see exactly where&#10;it starts to slow down even with really large machines. Observing cpu usage, I&#10;noticed that many parts of the build were serialized on a single core. Upon&#10;further investigation I found the following.&lt;/p&gt;&#10;&lt;h3 id="upstream-packaging"&gt;Upstream Packaging&lt;/h3&gt;&#10;&lt;p&gt;Module installation takes a really long time, and when building with&#10;&lt;code&gt;make deb-pkg -jN&lt;/code&gt;, you&amp;rsquo;ll see output like the following:&lt;/p&gt;</description></item><item><title>accessing maas database directly</title><link>https://chrisarges.net/posts/2015-05-27-accessing-maas-db-directly/</link><pubDate>Wed, 27 May 2015 13:02:46 -0500</pubDate><guid>https://chrisarges.net/posts/2015-05-27-accessing-maas-db-directly/</guid><description>&lt;p&gt;Let&amp;rsquo;s say you&amp;rsquo;ve messed up your MAAS installation and have no idea how to&#10;recover data about your nodes. Have no fear, you can access the django managed&#10;database directly.&lt;/p&gt;&#10;&lt;p&gt;Just use the following as root:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;maas-region-admin dbshell --installed&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you have access to an SQL command line interface.&lt;/p&gt;&#10;&lt;p&gt;For example if I want to see all hostnames and power_parameters for my servers,&#10;I can do the following:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;select hostname,power_parameters from maasserver_node;&#10;&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>qemu/kvm guest debugging</title><link>https://chrisarges.net/posts/2015-04-13-qemu-kvm-guest-debugging/</link><pubDate>Mon, 13 Apr 2015 12:24:22 -0500</pubDate><guid>https://chrisarges.net/posts/2015-04-13-qemu-kvm-guest-debugging/</guid><description>&lt;p&gt;Occasionally it is useful to debug a running guest VM&amp;rsquo;s kernel. Setup your host&#10;machine for virtual machine hosting with QEMU/KVM, and add ddebs to your host&#10;system using this &lt;a href="https://wiki.ubuntu.com/DebuggingProgramCrash"&gt;wiki&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Next, compile your own qemu with &lt;code&gt;--enable-debug&lt;/code&gt;. Setup your environment to&#10;use this binary (if using libvirt), or call it directly using qemu.&lt;/p&gt;&#10;&lt;p&gt;Ensure you have &lt;code&gt;vmlinux&lt;/code&gt; of the L1 guest somewhere in your L0 machine.&lt;/p&gt;&#10;&lt;p&gt;First, setup your L1 guest. If running with qemu add the &lt;code&gt;-s&lt;/code&gt; flag. With&#10;libvirt you can add the following entry to your machine description:&lt;/p&gt;</description></item><item><title>using gcov/lcov with the linux kernel</title><link>https://chrisarges.net/posts/2014-11-13-using-gcovlcov-with-linux-kernel/</link><pubDate>Thu, 13 Nov 2014 09:45:00 -0800</pubDate><guid>https://chrisarges.net/posts/2014-11-13-using-gcovlcov-with-linux-kernel/</guid><description>&lt;p&gt;GCOV/LCOV are amazing tools to figure out code coverage in the Linux kernel. It&#10;is fairly trivial to setup on your own machine. First, enable the following in&#10;your kernel configuration:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_KERNEL&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_PROFILE_ALL&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_FORMAT_AUTODETECT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Build the kernel and install headers/debug/images to your machine. Note there&#10;may be issues if you run this on a separate machine so consult the official&#10;&lt;a href="https://www.kernel.org/doc/Documentation/gcov.txt" title="gcov docs"&gt;documentation&lt;/a&gt; for additional information.&lt;/p&gt;&#10;&lt;p&gt;Boot the machine with the instrumented kernel and use the following to verify&#10;GCOV_KERNEL was setup properly:&lt;/p&gt;</description></item><item><title>getting kernel crashdumps for hung machines</title><link>https://chrisarges.net/posts/2014-10-31-getting-kernel-crashdumps-for-hung/</link><pubDate>Fri, 31 Oct 2014 13:53:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-10-31-getting-kernel-crashdumps-for-hung/</guid><description>&lt;p&gt;Debugging hung machines can be a bit tricky. Here I&amp;rsquo;ll document methods to&#10;trigger a crashdump when these hangs occur. What exactly does it mean when a&#10;machine &amp;lsquo;hangs&amp;rsquo; or &amp;lsquo;freezes-up&amp;rsquo;? More information can be found in the kernel&#10;&lt;a href="https://www.kernel.org/doc/Documentation/lockup-watchdogs.txt"&gt;documentation&lt;/a&gt;, but overall there are really a few types of hangs.&lt;/p&gt;&#10;&lt;p&gt;A &amp;ldquo;Soft Lock-Up&amp;rdquo; is when the kernel loops in kernel mode for a duration without&#10;giving tasks a chance to run. A &amp;ldquo;Hard Lock-Up&amp;rdquo; is when the kernel loops in kernel&#10;mode for a duration without letting other interrupts run. In addition a&#10;&amp;ldquo;Hung Task&amp;rdquo; is when a userspace task has been blocking for a duration.&lt;/p&gt;</description></item><item><title>using ktest.pl with ubuntu</title><link>https://chrisarges.net/posts/2014-07-01-using-ktestpl-with-ubuntu/</link><pubDate>Tue, 01 Jul 2014 13:10:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-07-01-using-ktestpl-with-ubuntu/</guid><description>&lt;p&gt;Bisecting the kernel is one of those tasks that&amp;rsquo;s time-consuming and error prone.&#10;Ktest.pl is a script that lives in the linux kernel source &lt;a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/testing/ktest?id=HEAD"&gt;tree&lt;/a&gt; that helps&#10;to automate this process. The script is extremely extensible and as&#10;such takes time to understand which variables need to be set and where. In this&#10;post, I&amp;rsquo;ll go over how to perform a kernel bisection using a VM as the target&#10;machine. In this example I&amp;rsquo;m using &amp;lsquo;ubuntu&amp;rsquo; as the VM name.&lt;/p&gt;</description></item><item><title>using CRIU to checkpoint a kernel build</title><link>https://chrisarges.net/posts/2014-06-25-using-criu-to-checkpoint-kernel-build/</link><pubDate>Wed, 25 Jun 2014 13:46:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-25-using-criu-to-checkpoint-kernel-build/</guid><description>&lt;p&gt;&lt;a href="http://criu.org/Main_Page"&gt;CRIU&lt;/a&gt; stands for Checkpoint/Restart in Userspace. As the criu package should&#10;be landing in Utopic soon, and I wanted to test drive it to see how it handles.&lt;/p&gt;&#10;&lt;p&gt;I thought of an interesting example of being in the middle of a linux kernel&#10;build and a security update needing to be installed and the machine rebooted.&#10;While most of us could probably just reboot and rebuild, why not checkpoint it&#10;and save the progress; then restore after the system update? I admit its not&#10;the most useful example; but it is pretty cool nonetheless.&lt;/p&gt;</description></item><item><title>manually deploying openstack with a virtual maas on ubuntu trusty (part 2)</title><link>https://chrisarges.net/posts/2014-06-16-manually-deploying-openstack-with_16/</link><pubDate>Mon, 16 Jun 2014 10:16:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-16-manually-deploying-openstack-with_16/</guid><description>In the previous post, I went over how to setup a virtual MAAS environment using KVM [&lt;a href="http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html"&gt;1&lt;/a&gt;]. Here I will explain how to setup Juju for use with this environment.&#10;&#10;&lt;br /&gt;&lt;br /&gt;For this setup, we’ll use the maas-server as the juju client to interact with the cluster.&lt;br /&gt;&lt;br /&gt;This guide was very useful:&lt;br /&gt;&lt;a href="https://maas.ubuntu.com/docs/juju-quick-start.html"&gt;https://maas.ubuntu.com/docs/juju-quick-start.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Update to the latest stable tools:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-add-repository ppa:juju/stable&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;/pre&gt;Next we want to setup juju on the host machine.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install juju-core&lt;/pre&gt;Create juju environment file.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju init&lt;/pre&gt;Generate a specific MAAS API key by using the following link:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/"&gt;http://192.168.100.10/MAAS/account/prefs/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;write the following to ~/.juju/environments.yaml replacing ‘maas api key’ with what was generated above:&lt;br /&gt;&lt;pre class="prettyprint"&gt;default: vmaas&lt;br /&gt;environments:&lt;br /&gt;&amp;nbsp; vmaas:&lt;br /&gt;&amp;nbsp; &amp;nbsp; type: maas&lt;br /&gt;&amp;nbsp; &amp;nbsp; maas-server: 'http://192.168.100.10/MAAS'&lt;br /&gt;&amp;nbsp; &amp;nbsp; maas-oauth: '&amp;lt;maas api key&amp;gt;'&lt;br /&gt;&amp;nbsp; &amp;nbsp; admin-secret: ubuntu # or something generated with uuid&lt;br /&gt;&amp;nbsp; &amp;nbsp; default-series: trusty&lt;br /&gt;&lt;/pre&gt;Now let’s sync tools and bootstrap a node. Note, if you have multiple juju environments then you may need to specify ‘-e vmaas’ if it isn’t your default environment.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju sync-tools&lt;br /&gt;juju bootstrap # add --show-log --debug &amp;nbsp;for more output&lt;br /&gt;&lt;/pre&gt;See if it works by using the following command:&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju status&lt;/pre&gt;You should see something similar to the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;~$ juju status&lt;br /&gt;environment: vmaas&lt;br /&gt;machines:&lt;br /&gt;&amp;nbsp; "0":&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-state: down&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-state-info: (started)&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-version: 1.18.4&lt;br /&gt;&amp;nbsp; &amp;nbsp; dns-name: maas-node-0.maas&lt;br /&gt;&amp;nbsp; &amp;nbsp; instance-id: /MAAS/api/1.0/nodes/node-e41b0c34-e1cb-11e3-98c6-5254001aae69/&lt;br /&gt;&amp;nbsp; &amp;nbsp; series: trusty&lt;br /&gt;services: {}&lt;br /&gt;&lt;/pre&gt;Now we can do a test deployment with the juju-gui to our bootstrap node.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju deploy juju-gui&lt;/pre&gt;While it is deploying you can type the following to get a log.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju debug-log&lt;/pre&gt;I wanted to be able to access the juju-gui from an ‘external’ address, so I edited /etc/networking/interfaces on that machine to have a static address:&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju ssh 0&lt;/pre&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/networking/interfaces&lt;br /&gt;&lt;/pre&gt;Add the following to the file:&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;&amp;nbsp; address 192.168.100.11&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&lt;/pre&gt;Bring that interface up.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo ifup eth0&lt;/pre&gt;The password can be found here on the host machine:&lt;br /&gt;&lt;pre class="prettyprint"&gt;grep pass .juju/environments/vmaas.jenv&lt;/pre&gt;If you used the above configurations it should be ‘ubuntu’.&lt;br /&gt;&lt;br /&gt;Log into the service so you can monitor the status graphically during the deployment.&lt;br /&gt;&lt;br /&gt;If you get errors saying that servers couldn’t be reached you may have DNS configuration or proxy issues. You’ll have to first resolve these before using Juju. I’ve had is intermittent network issues in my lab. In order to workaround those physical issues you may have to retry the bootstrap, or increase the timeout values in ~/.juju/environments.yaml to use the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;nbsp; bootstrap-retry-delay: 5&lt;br /&gt;&amp;nbsp; bootstrap-timeout: 1200&lt;br /&gt;&lt;/pre&gt;Now you’re cooking with juju.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html"&gt;http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>manually deploying openstack with a virtual maas on ubuntu trusty (part 1)</title><link>https://chrisarges.net/posts/2014-06-13-manually-deploying-openstack-with/</link><pubDate>Fri, 13 Jun 2014 15:05:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-13-manually-deploying-openstack-with/</guid><description>The goal of this new few series of posts is to be able to setup virtual machines to simulate a real-world openstack deployment using maas and juju. This goes through setting up a maas-server in a VM as well as setting up maas-nodes in VMs and getting them enlisted/commissioned into the maas-server. Next juju is configured to use the maas cluster. Finally, openstack is deployed using juju.&#10;&#10;&lt;br /&gt;&lt;div&gt;&lt;h2&gt;Overview&lt;/h2&gt;&lt;div&gt;&lt;h3&gt;Requirements&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Ideally, a large server with 16 cores, 32G memory, 500G disk. Obviously you can tweak this setup to work with less; but be prepared to lock up lesser machines. In addition your host machine needs to be able to support nested virtualization.&lt;br /&gt;&lt;h3&gt;&lt;span style="font-family: inherit;"&gt;Topology&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Here is the basics of what will be setup for our virtual maas cluster. Each red box is a virtual machine with two interfaces. The eth0 interface in the VM connects to the NATed maas-internet network, while the VM’s eth1 interface connects to the isolated maas-management network. The number of maas-nodes should match what is required for the deployment; however it is simple enough to enlist more nodes later. I choose to use a public/private network in order to be more flexible later in how openstack networking is set up.&lt;br /&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://4.bp.blogspot.com/-AYzkHv8R9o8/U58a3XQcwsI/AAAAAAAAElk/ce9RZTfDSnE/s1600/Manually+Deploying+Openstack+on+A+Virtual+MaaS+with+Ubuntu+Trusty.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://4.bp.blogspot.com/-AYzkHv8R9o8/U58a3XQcwsI/AAAAAAAAElk/ce9RZTfDSnE/s1600/Manually+Deploying+Openstack+on+A+Virtual+MaaS+with+Ubuntu+Trusty.png" height="299" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2&gt;Setup Host Machine&lt;/h2&gt;&lt;h3&gt;Install Requirements&lt;/h3&gt;&lt;div&gt;First install all required programs on the host machine.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install libvirt-bin qemu-kvm cpu-checker virtinst uvtool&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next, check if kvm is working correctly.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;kvm-ok&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure nested KVM is enabled. (replace intel with amd if necessary)&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;cat /sys/module/kvm_intel/parameters/nested&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This should output Y, if it doesn’t do the following:&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;sudo modprobe -r kvm_intel&lt;br /&gt;sudo modprobe kvm_intel nested=1&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure $USER is added to libvirtd group.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;groups | grep libvirtd&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure host machine has SSH keys generated and setup. (Be careful, don’t overwrite your existing keys)&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;[ -d ~/.ssh ] || ssh-keygen -t rsa&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;Virtual Network Setup&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;This step can be done via virt-manager, but also done via command line using virsh.&lt;/div&gt;&lt;div&gt;Setup a virtual network which uses NAT to communicate with the host machine with the following parameters:&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;Network Name: maas_internet&lt;br /&gt;Network: 192.168.100.0/24&lt;br /&gt;Do _not_ Enable DHCP.&lt;br /&gt;Forwarding to physical network; Any physical device; NAT&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;And setup an isolated virtual network the following parameters: &lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;Network Name: maas_management&lt;br /&gt;Network: 10.10.10.0/24&lt;br /&gt;Do _not_ Enable DHCP.&lt;br /&gt;Isolated network;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Install the MAAS Server&lt;/h2&gt;&lt;h3&gt;Download and Start the Install&lt;/h3&gt;Ensure you have virt-manager connected to the hypervisor.&lt;br /&gt;While there are many ways we can create virtual machines, I chose the tool uvtool because it works well in Trusty and quickly creates VM based on the Ubuntu cloud image.&lt;br /&gt;&lt;br /&gt;Sync the latest cloud trusty cloud image:&lt;br /&gt;&lt;pre class="prettyprint"&gt;uvt-simplestreams-libvirt sync release=trusty arch=amd64&lt;/pre&gt;&lt;br /&gt;Create a maas-server VM:&lt;br /&gt;&lt;pre class="prettyprint"&gt;uvt-kvm create maas-server release=trusty arch=amd64 --disk 20 --memory 2048 --password ubuntu&lt;/pre&gt;&lt;br /&gt;After it boots, shut it down and &amp;nbsp;edit the VM’s machine configuration.&lt;br /&gt;Make the two network interfaces connect to maas_internet and maas_management respectively.&lt;br /&gt;&lt;br /&gt;Now edit /etc/network/interfaces to have the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;&amp;nbsp; address 192.168.100.10&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&amp;nbsp; gateway 192.168.100.1&lt;br /&gt;&amp;nbsp; dns-nameservers 10.10.10.10 192.168.100.1&lt;br /&gt;&lt;br /&gt;auto eth1&lt;br /&gt;iface eth1 inet static&lt;br /&gt;&amp;nbsp; address 10.10.10.10&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&amp;nbsp; dns-nameservers 10.10.10.10 192.168.100.1&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;And follow the instructions here:&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/install.html#pkg-install"&gt;http://maas.ubuntu.com/docs/install.html#pkg-install&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Which is essentially:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install maas maas-dhcp maas-dns&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;MAAS Server Post Install Tasks&lt;/h3&gt;&lt;a href="http://maas.ubuntu.com/docs/install.html#post-install"&gt;http://maas.ubuntu.com/docs/install.html#post-install&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First let’s check if the webpage is working correctly. Depending on your installation, you may need to proxy into a remote host hypervisor before accessing the webpage. If you’re working locally you should be able to access this address directly (as the libvirt maas_internet network is already connected to your local machine).&lt;br /&gt;&lt;br /&gt;If you need to access it indirectly (and 192.168.100.0 is a non-conflicting subnet):&lt;br /&gt;&lt;pre class="prettyprint"&gt;sshuttle -D -r &amp;lt;hypervisor IP&amp;gt; 192.168.100.0/24&lt;/pre&gt;&lt;br /&gt;Access the following:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS"&gt;http://192.168.100.10/MAAS&lt;/a&gt;&lt;br /&gt;It should remind you that post installation tasks need to be completed.&lt;br /&gt;&lt;br /&gt;Let’s create the admin user from the hypervisor machine:&lt;br /&gt;ssh ubuntu@192.168.100.10&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo maas-region-admin createadmin --username=root --email="user@host.com" --password=ubuntu&lt;/pre&gt;&lt;br /&gt;If you want to limit the types of boot images that can be created you need to edit&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/maas/bootresources.yaml&lt;/pre&gt;&lt;br /&gt;Import boot images, using the new root user you created to log in:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/clusters/"&gt;http://192.168.100.10/MAAS/clusters/&lt;/a&gt;&lt;br /&gt;Now click 'import boot images' and be patient as it will take some time before these images are imported.&lt;br /&gt;&lt;br /&gt;Add a key for the host machine here:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/sshkey/add/"&gt;http://192.168.100.10/MAAS/account/prefs/sshkey/add/&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Configure the MAAS Cluster&lt;/h3&gt;Follow instructions here to setup cluster:&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/cluster-configuration.html"&gt;http://maas.ubuntu.com/docs/cluster-configuration.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/clusters/"&gt;http://192.168.100.10/MAAS/clusters/&lt;/a&gt;&lt;br /&gt;Click on ‘Cluster master’&lt;br /&gt;Click on edit interface eth1.&lt;br /&gt;&lt;pre class="prettyprint"&gt;Interface: eth1&lt;br /&gt;Management: DHCP and DNS&lt;br /&gt;IP: 10.10.10.10&lt;br /&gt;Subnet mask: 255.255.255.0&lt;br /&gt;Broadcast IP: 10.10.10.255&lt;br /&gt;Router IP: 10.10.10.10&lt;br /&gt;IP Range Low: 10.10.10.100&lt;br /&gt;IP Range High: 10.10.10.200&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Click Save Interface&lt;br /&gt;Ensure Nodes Auto-Enlist&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a MAAS key and use that to log in:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/"&gt;http://192.168.100.10/MAAS/account/prefs/&lt;/a&gt;&lt;br /&gt;Click on ‘+ Generate MAAS key’ and copy that down.&lt;br /&gt;&lt;br /&gt;Log into the maas-server, and then log into maas using the MAAS key:&lt;br /&gt;maas login maas-server http://192.168.100.10/MAAS&lt;br /&gt;&lt;br /&gt;Now set all nodes to auto accept:&lt;br /&gt;&lt;pre class="prettyprint"&gt;maas maas-server nodes accept-all&lt;/pre&gt;&lt;br /&gt;Setup keys on the maas-server so it can access the virtual machine host&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo mkdir -p ~maas&lt;br /&gt;sudo chown maas:maas ~maas&lt;br /&gt;sudo -u maas ssh-keygen&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the pubkey in ~maas/.ssh/id_rsa.pub to the virsh servers authorized_keys and to the maas SSH keys (&lt;a href="http://192.168.100.10/MAAS/account/prefs/sshkey/add/"&gt;http://192.168.100.10/MAAS/account/prefs/sshkey/add/&lt;/a&gt;)&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo cat /home/maas/.ssh/id_rsa.pub&lt;/pre&gt;&lt;br /&gt;Now install virsh to test a connection and allow the maas-server to control maas-nodes.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install libvirt-bin&lt;/pre&gt;&lt;br /&gt;Test the connection to the hypervisor (replace ubuntu with hypervisor host user)&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo -u maas virsh -c qemu+ssh://ubuntu@192.168.100.1/system list --all&lt;/pre&gt;&lt;h3&gt;Confirm Maas-Server Networking&lt;/h3&gt;Ensure we can reach important address via maas-server:&lt;br /&gt;&lt;pre class="prettyprint"&gt;host streams.canonical.com&lt;br /&gt;host store.juju.ubuntu.com&lt;br /&gt;host archive.ubuntu.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And that we can download charms if needed:&lt;br /&gt;&lt;pre class="prettyprint"&gt;wget https://store.juju.ubuntu.com/charm-info&lt;/pre&gt;&lt;h3&gt;Setup Traffic Forwarding&lt;/h3&gt;Setup maas-server to forward traffic from eth1 to eth0:&lt;br /&gt;&lt;br /&gt;You can type the following out manually or add it as an upstart script to ensure forwarding is setup properly each time add this file to &lt;b&gt;/etc/init/ovs-routing.conf &lt;/b&gt;(thanks to Juan Negron):&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;description "Setup NAT rules for ovs bridge"&lt;br /&gt;&lt;br /&gt;start on runlevel [2345]&lt;br /&gt;&lt;br /&gt;env EXTIF="eth0"&lt;br /&gt;env BRIDGE="eth1"&lt;br /&gt;&lt;br /&gt;task&lt;br /&gt;&lt;br /&gt;script&lt;br /&gt; echo "Configuring modules"&lt;br /&gt; modprobe ip_tables || :&lt;br /&gt; modprobe nf_conntrack || :&lt;br /&gt; modprobe nf_conntrack_ftp || :&lt;br /&gt; modprobe nf_conntrack_irc || :&lt;br /&gt; modprobe iptable_nat || :&lt;br /&gt; modprobe nf_nat_ftp || :&lt;br /&gt;&lt;br /&gt; echo "Configuring forwarding and dynaddr"&lt;br /&gt; echo "1" &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt; echo "1" &amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;&lt;br /&gt; echo "Configuring iptables rules"&lt;br /&gt; iptables-restore &amp;lt;&amp;lt;-EOM&lt;br /&gt;*nat&lt;br /&gt;-A POSTROUTING -o ${EXTIF} -j MASQUERADE&lt;br /&gt;COMMIT&lt;br /&gt;*filter&lt;br /&gt;:INPUT ACCEPT [0:0]&lt;br /&gt;:FORWARD ACCEPT [0:0]&lt;br /&gt;:OUTPUT ACCEPT [0:0]&lt;br /&gt;-A FORWARD -i ${BRIDGE} -o ${EXTIF} -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;-A FORWARD -i ${EXTIF} -o ${BRIDGE} -j ACCEPT&lt;br /&gt;-A FORWARD -j LOG&lt;br /&gt;COMMIT&lt;br /&gt;EOM&lt;br /&gt;&lt;br /&gt;end script&lt;br /&gt;&lt;/pre&gt;Then start the service:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo service ovs-routing start&lt;/pre&gt;&lt;h3&gt;Setup Squid Proxy&lt;/h3&gt;Ensure squid proxy can access cloud images:&lt;br /&gt;&lt;pre class="prettyprint"&gt;echo "cloud-images.ubuntu.com" | sudo tee /etc/squid-deb-proxy/mirror-dstdomain.acl.d/98-cloud-images&lt;/pre&gt;&lt;pre class="prettyprint"&gt;sudo service squid-deb-proxy restart&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Install MAAS Nodes&lt;/h2&gt;Now we can virt-install each maas-node on the hypervisor such that it automatically pxe boots and auto-enlists into MAAS. You can adjust the script below to create as many nodes as required. I’ve also simplified things by creating everything with dual nics and ample memory and hard drive space, but of course you could use custom machines per service. Compute-nodes need more compute power, ceph nodes will need more storage, and quantum-gateway will need dual nics. In addition you could specify raw disks instead of qcow2, or use storage pools; but in this case I wanted something simple that didn’t automatically use all the space it needed.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;for i in {0..19}; do&lt;br /&gt; virt-install \&lt;br /&gt; --name=maas-node-${i} \&lt;br /&gt; --connect=qemu:///system --ram=4096 --vcpus=1 --hvm --virt-type=kvm \&lt;br /&gt; --pxe --boot network,hd \&lt;br /&gt; --os-variant=ubuntutrusty --graphics vnc --noautoconsole --os-type=linux --accelerate \&lt;br /&gt;--disk=/var/lib/libvirt/images/maas-node-${i}.qcow2,bus=virtio,format=qcow2,cache=none,sparse=true,size=32 \&lt;br /&gt; --network=network=maas_internet,model=virtio \&lt;br /&gt; --network=network=maas_management,model=virtio &lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now each node needs to be manually enlisted with the proper power configuration.&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/nodes.html#virtual-machine-nodes"&gt;http://maas.ubuntu.com/docs/nodes.html#virtual-machine-nodes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;Host Name: maas-node-${i}.vmaas&lt;br /&gt;Power Type: virsh&lt;br /&gt;Power Address: qemu+ssh://ubuntu@192.168.100.1/system&lt;br /&gt;Power ID: maas-node-${i}&lt;br /&gt;&lt;/pre&gt;Here we need to match the machines to the mac address and update the power requirements. &amp;nbsp;You can get the mac addresses of each node by using the following on the hypervisor:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;virsh dumpxml maas-node-${i} | grep "mac addr"&lt;/pre&gt;&lt;br /&gt;Here is a script that helps automate some of this process, it can be run from the maas-server (replace USER ubuntu with the appropriate value) this matches mac address from virsh to the ones in maas and then sets up the power accordingly:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;import sys, os, libvirt&lt;br /&gt;from xml.dom.minidom import parseString&lt;br /&gt;os.environ['DJANGO_SETTINGS_MODULE'] = 'maas.settings'&lt;br /&gt;sys.path.append("/usr/share/maas")&lt;br /&gt;from maasserver.models import Node, Tag&lt;br /&gt;&lt;br /&gt;hhost = 'qemu+ssh://ubuntu@192.168.100.1/system'&lt;br /&gt;&lt;br /&gt;conn = libvirt.open(hhost)&lt;br /&gt;nodes_dict = {}&lt;br /&gt;domains = conn.listDefinedDomains()&lt;br /&gt;for node_name in domains:&lt;br /&gt; node = conn.lookupByName(node_name)&lt;br /&gt; node_xml = parseString(node.XMLDesc(0))&lt;br /&gt; node_mac1 = node_xml.getElementsByTagName('interface')[0].getElementsByTagName('mac')[0].getAttribute('address')&lt;br /&gt; nodes_dict[node_mac1] = node_name&lt;br /&gt;&lt;br /&gt;maas_nodes = Node.objects.all()&lt;br /&gt;for node in maas_nodes:&lt;br /&gt; try:&lt;br /&gt; system_id = node.system_id&lt;br /&gt; mac = node.get_primary_mac()&lt;br /&gt; node_name = nodes_dict[str(mac)]&lt;br /&gt; node.hostname = node_name&lt;br /&gt; node.power_type = 'virsh'&lt;br /&gt; node.power_parameters = { 'power_address':hhost, 'power_id':node_name }&lt;br /&gt; node.save()&lt;br /&gt; except: pass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note you will need python-libvirt and run the above command with something like the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo -u maas ./setup-nodes.py&lt;/pre&gt;&lt;h3&gt;Setup Fastpath and Commission Nodes&lt;/h3&gt;You most likely want to use fast-path installer on nodes to speed up installation times. Set all nodes to use fastpath installer using another bulk action on the nodes.&lt;br /&gt;&lt;br /&gt;After you have all this done, click bulk action commission.&lt;br /&gt;You should see all your machines starting up if you set things up properly, give this some time. You should have all the nodes in the 'Ready' state in maas now!&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/nodes/"&gt;http://192.168.100.10/MAAS/nodes/&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Confirm DNS setup&lt;/h3&gt;One point of trouble can be ensuring DNS is setup correctly. We can test this by starting a maas node and inside of that trying the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;dig streams.canonical.com&lt;br /&gt;dig store.juju.ubuntu.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If we can’t hit those, we’ll need to ensure the maas server is setup correctly.&lt;br /&gt;Go to: &lt;a href="http://192.168.100.10/MAAS/settings/"&gt;http://192.168.100.10/MAAS/settings/&lt;/a&gt;&lt;br /&gt;Enter the host machines upstream DNS if necessary here, it should setup the bind configuration file and restart that service. After this re-test.&lt;br /&gt;&lt;br /&gt;In addition I had to disable dnssec-validation for bind. Edit the following file:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/bind/named.conf.options&lt;/pre&gt;&lt;br /&gt;And change the following value:&lt;br /&gt;&lt;pre class="prettyprint"&gt;dnssec-validation no;&lt;/pre&gt;&lt;br /&gt;And restart the service:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo service bind9 restart&lt;/pre&gt;&lt;br /&gt;Now you have a working virtual maas setup using the latest Ubuntu LTS!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://3.bp.blogspot.com/-nAwPK-nWeaA/U58a_Kf7v4I/AAAAAAAAEls/8JACkxWF4xU/s1600/Screenshot+from+2014-06-10+13:57:30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://3.bp.blogspot.com/-nAwPK-nWeaA/U58a_Kf7v4I/AAAAAAAAEls/8JACkxWF4xU/s1600/Screenshot+from+2014-06-10+13:57:30.png" height="544" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description></item><item><title>using kgraft with ubuntu</title><link>https://chrisarges.net/posts/2014-06-06-using-kgraft-with-ubuntu/</link><pubDate>Fri, 06 Jun 2014 11:50:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-06-using-kgraft-with-ubuntu/</guid><description>&lt;p&gt;New live kernel patching projects have hit LKML recently &lt;a href="https://lkml.org/lkml/2014/4/30/477"&gt;here&lt;/a&gt; and&#10;&lt;a href="https://lkml.org/lkml/2014/5/1/273"&gt;here&lt;/a&gt;, and I&amp;rsquo;ve taken the opportunity to test drive kGraft with the Ubuntu&#10;kernel. This post documents how to get a sample patch working.&lt;/p&gt;&#10;&lt;p&gt;First, I had to take the &lt;a href="https://git.kernel.org/cgit/linux/kernel/git/jirislaby/kgraft.git/"&gt;patches&lt;/a&gt; and apply them against the&#10;ubuntu-utopic kernel, which is based on 3.15-rc8 as of this post. They&#10;cherry-picked cleanly and the branch I&amp;rsquo;m using is stored &lt;a href="http://zinc.ubuntu.com/git?p=arges/ubuntu-utopic.git;a=shortlog;h=refs/heads/kgraft-utopic"&gt;here&lt;/a&gt;. In addition&#10;to applying the patches I had to also enable CONFIG_KGRAFT. A pre-built test&#10;kernel can be downloaded &lt;a href="http://people.canonical.com/~arges/kgraft-utopic/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>netfilter hooks to snoop packets</title><link>https://chrisarges.net/posts/2014-03-24-netfilter-hooks-to-snoop-packets/</link><pubDate>Mon, 24 Mar 2014 07:47:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-03-24-netfilter-hooks-to-snoop-packets/</guid><description>&lt;p&gt;I&amp;rsquo;ve written a short netfilter hook to help snoop some outgoing packets. You can&#10;view the source code &lt;a href="https://github.com/arges/nf-snoop"&gt;here&lt;/a&gt;. I read &lt;a href="http://www.netfilter.org/documentation/HOWTO/netfilter-hacking-HOWTO-3.html"&gt;a&lt;/a&gt; &lt;a href="http://www.linuxjournal.com/article/7184"&gt;few&lt;/a&gt; &lt;a href="http://www.paulkiddie.com/2009/10/creating-a-simple-hello-world-netfilter-module/"&gt;articles&lt;/a&gt; to get an&#10;idea of how to put things together.&lt;/p&gt;</description></item><item><title>creating a local vm easily and automatically</title><link>https://chrisarges.net/posts/2014-03-05-creating-local-vm-easily-and/</link><pubDate>Wed, 05 Mar 2014 14:22:00 -0800</pubDate><guid>https://chrisarges.net/posts/2014-03-05-creating-local-vm-easily-and/</guid><description>&lt;p&gt;This is the nifty little snippet I use to create a quick and dirty VM for&#10;testing. Just &lt;code&gt;apt-get install vmbuilder&lt;/code&gt; and run the following:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;NAME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;ubuntu&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vmbuilder kvm ubuntu --arch &lt;span style="color:#e6db74"&gt;&amp;#39;amd64&amp;#39;&lt;/span&gt; --suite &lt;span style="color:#e6db74"&gt;&amp;#39;precise&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--rootsize &lt;span style="color:#e6db74"&gt;&amp;#39;8096&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--mem &lt;span style="color:#e6db74"&gt;&amp;#39;1024&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--components &lt;span style="color:#e6db74"&gt;&amp;#39;main,universe&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--addpkg vim &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--addpkg openssh-server &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--addpkg bash-completion &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--user &lt;span style="color:#e6db74"&gt;&amp;#39;ubuntu&amp;#39;&lt;/span&gt; --pass &lt;span style="color:#e6db74"&gt;&amp;#39;ubuntu&amp;#39;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-d /var/lib/libvirt/images/&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;NAME&lt;span style="color:#e6db74"&gt;}&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--libvirt qemu:///system &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-o &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-v --debug &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--hostname &lt;span style="color:#e6db74"&gt;${&lt;/span&gt;NAME&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you need additional help consult the&#10;&lt;a href="https://help.ubuntu.com/12.04/serverguide/jeos-and-vmbuilder.html"&gt;serverguide&lt;/a&gt;&lt;/p&gt;</description></item><item><title>using LTS HWE kernels with MAAS nodes</title><link>https://chrisarges.net/posts/2014-03-05-using-lts-hwe-kernels-with-maas-nodes/</link><pubDate>Wed, 05 Mar 2014 14:21:00 -0800</pubDate><guid>https://chrisarges.net/posts/2014-03-05-using-lts-hwe-kernels-with-maas-nodes/</guid><description>&lt;p&gt;Once you get machines setup using &lt;a href="http://maas.ubuntu.com/"&gt;MAAS&lt;/a&gt;, you may want to be able to install&#10;an alternative kernel when starting a machine. Here&amp;rsquo;s how to do it.&lt;/p&gt;&#10;&lt;p&gt;This is assuming we have already commissioned a node, but have not started it.&lt;/p&gt;&#10;&lt;p&gt;If we are using the &lt;em&gt;normal&lt;/em&gt; installer with MAAS do the following: Edit&#10;&lt;code&gt;/etc/maas/preseeds/preseed_master&lt;/code&gt; on your maas-server&lt;/p&gt;&#10;&lt;p&gt;Add the second line as shown:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;d-i base-installer/kernel/image string linux-server d-i&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;base-installer/kernel/override-image string linux-generic-lts-saucy&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Start the node, Now when you boot you should be using the 3.11 series kernel.&lt;/p&gt;</description></item><item><title>creating a local vm domain from an ubuntu cloud image</title><link>https://chrisarges.net/posts/2014-02-17-creating-local-vm-domain-from-ubuntu/</link><pubDate>Mon, 17 Feb 2014 11:43:00 -0800</pubDate><guid>https://chrisarges.net/posts/2014-02-17-creating-local-vm-domain-from-ubuntu/</guid><description>&lt;p&gt;It is very convenient to be able to quickly spin up a local VM in order to do&#10;some sort of bug verification or testing. Generally I can use a cloud provider&#10;to spin up an instance, but occasionally you need the flexibility of a local VM&#10;in order to setup more complex networking or other specific environments.&lt;/p&gt;&#10;&lt;p&gt;This &lt;a href="http://ubuntu-smoser.blogspot.com/2013/02/using-ubuntu-cloud-images-without-cloud.html"&gt;link&lt;/a&gt; was extremely helpful in figuring our how to setup a ready to boot&#10;image, but I noticed a few issues. First, on Precise I didn&amp;rsquo;t have the&#10;cloud-localds tool, and second there wasn&amp;rsquo;t a very simple way to import the&#10;image into libvirt.&lt;/p&gt;</description></item><item><title>automatic bisection of qemu with console and monitor interaction</title><link>https://chrisarges.net/posts/2013-12-16-automatic-bisection-of-qemu-with/</link><pubDate>Mon, 16 Dec 2013 14:39:00 -0800</pubDate><guid>https://chrisarges.net/posts/2013-12-16-automatic-bisection-of-qemu-with/</guid><description>&lt;p&gt;I had some fun debugging a performance &lt;a href="http://pad.lv/1100843"&gt;issue&lt;/a&gt; after VM migration on v1.0.&#10;Because this was fixed in newer versions, a bisect was in order. Doing this&#10;manually becomes very tedious so writing some scripts to use &lt;code&gt;git bisect run&lt;/code&gt;&#10;really helps. Here I&amp;rsquo;ll document how I did this in case others find it useful&#10;when trying to bisect issues in qemu.&lt;/p&gt;&#10;&lt;p&gt;First step is getting the problem reproducible using the command line. In&#10;addition you will also need to output anything that be used to determine if the&#10;test case passes or fails using standard console output. This makes it easy to&#10;run the test case with expect. You will need to &lt;a href="https://help.ubuntu.com/community/SerialConsoleHowto"&gt;follow&lt;/a&gt; on how to setup your&#10;VM to use serial output.&lt;/p&gt;</description></item><item><title>setup an external drives as raid1</title><link>https://chrisarges.net/posts/2013-12-16-setup-external-drives-as-raid1/</link><pubDate>Mon, 16 Dec 2013 14:37:00 -0800</pubDate><guid>https://chrisarges.net/posts/2013-12-16-setup-external-drives-as-raid1/</guid><description>&lt;p&gt;I purchased a cheap two drive USB enclosure in order to setup an external drive&#10;that had RAID-1 so I could backup photos and recordings.&lt;/p&gt;&#10;&lt;p&gt;First, I formatted both drives. Then I ran extended smart self-tests to ensure&#10;I had decent drives. With RAID-1 and two drives I can only tolerate 1 drive&#10;failure.&lt;/p&gt;&#10;&lt;p&gt;Next ensure mdadm is installed: &lt;code&gt;sudo apt-get install mdadm&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;Determine which dev devices the disks show up as. Next, create the raid device&#10;pointing at the correct dev directory.&lt;/p&gt;</description></item><item><title>use default gpg key for debuild</title><link>https://chrisarges.net/posts/2013-09-10-use-default-gpg-key-for-debuild/</link><pubDate>Tue, 10 Sep 2013 09:30:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-10-use-default-gpg-key-for-debuild/</guid><description>&lt;p&gt;When using &lt;code&gt;debuild -S&lt;/code&gt; to build a package on new machines, I need to go&#10;through the process of ensuring that my gpg is set up properly. If set up&#10;incorrectly, I get the following message with &lt;code&gt;debuild -S&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;gpg: skipped &lt;span style="color:#e6db74"&gt;&amp;#34;User &amp;lt;user@host.com&amp;gt;&amp;#34;&lt;/span&gt;: secret key not available&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To fix this, I go through the following steps:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Ensure I have proper gpg keys set up. You can check if yours is installed&#10;properly using: &lt;code&gt;gpg --list-keys&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Add &lt;code&gt;DEBEMAIL&lt;/code&gt; and &lt;code&gt;DEBFULLNAME&lt;/code&gt; to &lt;code&gt;~/.bashrc&lt;/code&gt;. Ensure&#10;&lt;code&gt;DEBEMAIL&lt;/code&gt; matches the email in the matching gpg key, and ensure&#10;DEBFULLNAME matches the name in same key. Put these into your &lt;code&gt; ~/.bashrc&lt;/code&gt;&#10;file or wherever they will be sourced into your environment.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Make sure your key is the default key: Edit &lt;code&gt;~/.gnupg/gpg.conf&lt;/code&gt; such&#10;that default-key is set to the proper key. This should match the 8 character&#10;fingerprint that you verified in (1).&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Make sure the same key is the default for debuilder: Edit&#10;/etc/devscripts.conf with the folllowing: &lt;code&gt;DEBSIGN_KEYID=XXXXXX&lt;/code&gt; where&#10;&lt;code&gt;XXXXXX&lt;/code&gt; is your key.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Now next time you use &lt;code&gt;debuild -S&lt;/code&gt; it should use the proper gpg key,&#10;name and email address!&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item><item><title>fixing a firewire audio interface</title><link>https://chrisarges.net/posts/2013-09-06-fixing-presonus-firestudio-interface/</link><pubDate>Fri, 06 Sep 2013 14:34:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-06-fixing-presonus-firestudio-interface/</guid><description>I had an issue where my Presonus Firestudio Project would have a red blinking light when I turned it on. This was before I even plugged it into my computer. Determining that it wasn't a software issue, I decided to open the thing up and figure out what's going on.&#10;&#10;I did the usual and checked for any bulging capacitors, burn marks, or just anything that would give me a clue why this wasn't working. I found some test points on the board labeled with voltages and decided to test them with a DMM. The DMM was reading way below the indicated voltages and they were actually swinging back and forth which led me to conclude that this must be a problem in the power supply board. I took the board out and visually inspected the capacitors and couldn't find one that looked bad. Therefore I ended up just purchasing replacements for all of the capacitors on the power supply board and decided to just replace them and see what happens. After replacing all the capacitors on the board, I carefully plugged in the board and a solid red light came on! Overall, be careful when working with large capacitors like this (There is a 450V one on this board). I made sure they were discharged with a large low ohm resistor to make sure I didn't get a nasty shock. Below is a picture of the board all fixed up!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-Q-l6T2vVgBI/Ui9D3kq0a1I/AAAAAAAADfM/AYFtzQ2N_Cg/s1600/presonus.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://1.bp.blogspot.com/-Q-l6T2vVgBI/Ui9D3kq0a1I/AAAAAAAADfM/AYFtzQ2N_Cg/s1600/presonus.jpg" height="208" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;</description></item><item><title>diy kubb set</title><link>https://chrisarges.net/posts/2013-09-06-diy-kubb-set/</link><pubDate>Fri, 06 Sep 2013 14:24:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-06-diy-kubb-set/</guid><description>After a visit to England, I had the pleasure of playing this awesome game and decided I'd like to play it back home.&#10;&#10;After a bit of a sticker shock after seeing it on Amazon, I decided that it would be easy enough to build my own set. I enlisted the help of a friend and set out to the hardware store. &amp;nbsp;I would recommend buying a little bit extra, but overall the materials came to around $18. I recommend having a mitre saw, circular saw, and either a good supply of sandpaper or a floor sander handy. Below is a picture of the final product. To build your own set, just read the directions below and find out what works for you.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-dsQGZCFGqhE/UipHMO_NvuI/AAAAAAAADes/ThNUZHKiFbQ/s1600/kubb3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://1.bp.blogspot.com/-dsQGZCFGqhE/UipHMO_NvuI/AAAAAAAADes/ThNUZHKiFbQ/s1600/kubb3.jpg" height="320" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;References&lt;/h3&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.thisoldhouse.com/toh/how-to/intro/0,,20398029,00.html"&gt;http://www.thisoldhouse.com/toh/how-to/intro/0,,20398029,00.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.instructables.com/id/How-to-Make-a-Kubb-Set/"&gt;http://www.instructables.com/id/How-to-Make-a-Kubb-Set/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.designsponge.com/2011/08/diy-project-kubb-%E2%80%93-the-swedish-lawn-game.html"&gt;http://www.designsponge.com/2011/08/diy-project-kubb-%E2%80%93-the-swedish-lawn-game.html&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description></item><item><title>building a proper debian source package with dkms</title><link>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</link><pubDate>Thu, 05 Sep 2013 07:10:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</guid><description>&lt;p&gt;How can one use DKMS to build a proper debian source package? The &lt;code&gt;mkdsc&lt;/code&gt;&#10;command will actually generate one automatically, but there are a few more&#10;steps to simplify it, and bring it up to date.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a DKMS package. Make sure you&#10;can build it using dkms. Then do the following:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#First pull in some dependencies as necessary&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install devscripts debhelper&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create the debian source package&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dkms mkdsc -m hello -v 0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create a directory to work in, and let’s copy those files into it&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir ~/dsc &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; cd ~/dsc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cp /var/lib/dkms/hello/0.1/dsc/* .&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Extract the .dsc to be able to edit the directory&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dpkg-source -x hello-dkms_0.1.dsc &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd hello-dkms-0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we run debuild -uc -us, we see a few lintian errors and warnings:&lt;/p&gt;</description></item><item><title>building a binary debian kernel module package with dkms</title><link>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</link><pubDate>Tue, 23 Jul 2013 14:40:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</guid><description>&lt;p&gt;DKMS packaging works great for building out of tree kernel modules. However,&#10;what do you do when you need to install to a machine without a compiler? You&#10;can accompish this by using DKMS&amp;rsquo;s &lt;code&gt;mkdriverdisk&lt;/code&gt; functionality.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a proper DKMS package.&lt;/p&gt;&#10;&lt;p&gt;After you&amp;rsquo;ve built the module successfully, you can use the following bash&#10;script to extract the .deb installer from the driverdisk. This way you can copy&#10;the deb file to the target machine and install. You must ensure that &lt;code&gt;$(uname -rm)&lt;/code&gt;&#10;on the target machine matches the build machine.&lt;/p&gt;</description></item><item><title>using git send-email for sending kernel patches</title><link>https://chrisarges.net/posts/2013-07-18-using-git-send-email-for-sending-kernel/</link><pubDate>Thu, 18 Jul 2013 15:27:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-07-18-using-git-send-email-for-sending-kernel/</guid><description>&lt;p&gt;Sending patches to a Linux kernel mailing list can be done easily using&#10;git-send-email. This post will help setup your environment and show you how to&#10;format the git send-email command. In addition there are some more advanced&#10;features that help when you need to send from multiple accounts.&lt;/p&gt;&#10;&lt;h3 id="git-setup"&gt;Git Setup&lt;/h3&gt;&#10;&lt;p&gt;First, install git and git-email. Then, setup &lt;code&gt;~/.gitconfig&lt;/code&gt; for your user&#10;and proper sendemail section. This shows a sendemail setup for a typical single&#10;gmail account.&lt;/p&gt;</description></item></channel></rss>