{"id":67,"date":"2017-01-11T16:27:50","date_gmt":"2017-01-12T00:27:50","guid":{"rendered":"https:\/\/www.lucaswilliams.net\/?p=67"},"modified":"2017-01-11T16:32:02","modified_gmt":"2017-01-12T00:32:02","slug":"livepatching-the-kernel-in-ubuntu-16-04-lts","status":"publish","type":"post","link":"https:\/\/www.lucaswilliams.net\/index.php\/2017\/01\/11\/livepatching-the-kernel-in-ubuntu-16-04-lts\/","title":{"rendered":"Livepatching the Kernel in Ubuntu 16.04 LTS"},"content":{"rendered":"<p>Hello everyone and Happy New Year! I hope 2017 has started great for everyone out there.<\/p>\n<p>So I have been playing around with Canonical&#8217;s Livepatch service on my Ubuntu 16.04 servers and I have to say, it is pretty slick. I run two KVM hosts that run various servers and containers so that I can do my job. In fact, this web server runs as a KVM on one of my hosts. Since I can&#8217;t typically run kernel updates and reboot when ever I feel like since I have other work loads running on these servers, Canonical Livepatch answers this problem for me.<\/p>\n<p>How it works is pretty simple. When a security patch for the Kernel comes out, this service downloads the patch and installs it in the running kernel on my system\u00a0<strong>WITHOUT HAVING TO REBOOT MY SERVER!!!<\/strong> That is amazing!! I get the security update to patch and make my system secure and I don&#8217;t have to schedule a maintenance window and bring down 20+ VM&#8217;s and 100+ containers, I can just update the host and BAM! All my containers and my hosts are updated, no reboot, no downtime. I still have to touch all my KVM&#8217;s, but that is the way when you run VM&#8217;s.<\/p>\n<p>So you want to try this out? It&#8217;s pretty simple to setup. First, it only works on Ubuntu 16.04 LTS. This &#8220;should&#8221; change to be available in 14.04 but as of when I wrote this, it was still not yet available on 14.04.<\/p>\n<p>The Kernel Livepatch is a snap application, making use of snaps on the system. This makes it even easier to install and update. To install on your system, it is as simple as:<\/p>\n<p><code>sudo snap install canonical-livepatch<\/code><\/p>\n<p>This will pull down the snap application and install and start it. Now, you have to enable the service. You need to go to\u00a0<a href=\"https:\/\/auth.livepatch.canonical.com\">https:\/\/auth.livepatch.canonical.com<\/a>\u00a0to sign up for the service. Regular Ubuntu users are authorized up to 3 machines to get Livepatches for. If you need more, you can purchase them via support for your systems. Once you are signed up, you will have a token that you use to add your systems.<\/p>\n<p>You then run:<\/p>\n<p><code>sudo canonical-livepatch enable &lt;TOKEN&gt;<\/code><\/p>\n<p>This will setup livepatch. To see it work, simply run<\/p>\n<p><code>canonical-livepatch status --verbose<\/code><\/p>\n<p>and you will get the following output:<\/p>\n<pre><code>client-version: \"6\"\r\nmachine-id: --REMOVED--\r\nmachine-token: --REMOVED--\r\narchitecture: x86_64\r\ncpu-model: Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz\r\nlast-check: 2017-01-11T15:21:36.477627539-08:00\r\nboot-time: 2016-11-28T09:16:56-08:00\r\nuptime: 1062h5m33s\r\nstatus:\r\n- kernel: 4.4.0-47.68-generic\r\n  running: true\r\n  livepatch:\r\n    checkState: checked\r\n    patchState: applied\r\n    version: \"15.1\"\r\n    fixes: |-\r\n      * CVE-2016-7425\r\n      * CVE-2016-8655\r\n      * CVE-2016-8658<\/code><\/pre>\n<p>I have those CVE&#8217;s installed, and I didn&#8217;t have to reboot my system for them to be implemented. \u00a0Now my KVM host is patched, and I had 0 downtime to do it.<\/p>\n<p>There you have it. Let me know in the comments if you have any questions!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone and Happy New Year! I hope 2017 has started great for everyone out there. So I have been playing around with Canonical&rsquo;s Livepatch service on my Ubuntu 16.04 servers and I have to say, it is pretty slick. I run two KVM hosts that run various servers and containers so that I can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,6],"tags":[27,21,28,29,5],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-livepatch","category-ubuntu","tag-canonical","tag-configure","tag-livepatch","tag-snap","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":4,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lucaswilliams.net\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}