<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Virtualization on Major Hayden</title><link>https://major.io/tags/virtualization/</link><description>Recent content in Virtualization on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Thu, 09 Jul 2026 20:41:49 +0000</lastBuildDate><atom:link href="https://major.io/tags/virtualization/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenStack isn’t dead. It’s boring. That’s a good thing.</title><link>https://major.io/p/openstack-isnt-dead-its-boring-thats-a-good-thing/</link><pubDate>Fri, 24 Feb 2017 16:06:24 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/openstack-isnt-dead-its-boring-thats-a-good-thing/</guid><description>&lt;p&gt;&lt;em&gt;NOTE: The opinions shared in this post are mine alone and are not related to my employer in any way.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The first &lt;a href="https://www.openstack.org/ptg/"&gt;OpenStack Project Teams Gathering (PTG)&lt;/a&gt; event was held this week in Atlanta. The week was broken into two parts: cross-project work on Monday and Tuesday, and individual projects Wednesday through Friday. I was there for the first two days and heard a few discussions that started the same way.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Everyone keeps saying OpenStack is dead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Is it?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;OpenStack isn&amp;rsquo;t dead.&lt;/strong&gt; It&amp;rsquo;s boring.&lt;/p&gt;
&lt;h2 id="the-report-of-my-death-was-an-exaggeration"&gt;&amp;ldquo;The report of my death was an exaggeration&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;Mark Twain &lt;a href="http://www.thisdayinquotes.com/2010/06/reports-of-my-death-are-greatly.html"&gt;said it best&lt;/a&gt;, but it works for OpenStack as well. The news has plenty of negative reports that cast a shadow over OpenStack&amp;rsquo;s future. You don&amp;rsquo;t have to look far to find them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fortune.com/2016/12/19/openstack-public-cloud/"&gt;HPE and Cisco Moves Hurt OpenStack&amp;rsquo;s Public Cloud Story (Fortune)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cbronline.com/news/cloud/public/cisco-killing-off-openstack-public-cloud/"&gt;Is Cisco killing off its OpenStack public cloud? (Computer Business Review)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.itworld.com/article/2699624/open-source-tools/openstack-still-has-an-enterprise-problem.html"&gt;OpenStack still has an enterprise problem&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This isn&amp;rsquo;t evidence of OpenStack&amp;rsquo;s demise, but rather a transformation. Gartner called OpenStack a &lt;a href="https://www.theregister.co.uk/2015/05/18/openstack_private_clouds_are_science_projects_says_gartner/"&gt;&amp;ldquo;science project&amp;rdquo;&lt;/a&gt; in 2015 and now 451 Research Group is &lt;a href="http://www.informationweek.com/cloud/what-you-need-to-know-about-openstack/a/d-id/1328252"&gt;saying something very different&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;451 Research Group estimates OpenStack&amp;rsquo;s ecosystem to grow nearly five-fold in revenue, from US$1.27 billion market size in 2015 to US$5.75 billion by 2020.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A 35% CAGR sounds pretty good for a product in the middle of a transformation. In Texas, we&amp;rsquo;d say that&amp;rsquo;s more than enough to &lt;a href="http://english.stackexchange.com/questions/92393/origin-of-more-x-than-you-can-shake-a-stick-at"&gt;&amp;ldquo;shake a stick at&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="the-transformation"&gt;The transformation&lt;/h2&gt;
&lt;p&gt;You can learn a lot about the transformation going on within OpenStack by reading analyst reports and other news online. I won&amp;rsquo;t go into that here since that data is readily available.&lt;/p&gt;
&lt;p&gt;Instead, I want to take a look at how OpenStack has changed from the perspective of a developer. My involvement with OpenStack started in the Diablo release in 2011 and my first OpenStack Summit was the Folsom summit in San Francisco.&lt;/p&gt;
&lt;p&gt;Much of the discussion at that time was around the &amp;ldquo;minutiae&amp;rdquo; of developing software in its early forms. We discussed topics like how to test, how to handle a myriad of requirements that constantly change, and which frameworks to use in which projects. The list of projects was quite short at that time (there were only 7 main services in Grizzly). Lots of effort certainly poured into feature development, but there was a ton of work being done to keep the wheels from falling off entirely.&lt;/p&gt;
&lt;p&gt;The discussions at this week&amp;rsquo;s PTG were very different.&lt;/p&gt;
&lt;p&gt;Most of the discussion was around adding new integrations, improving reliability, and increasing scale. Questions were asked about how to integrate OpenStack into existing enterprise processes and applications. Reliability discussions were centered less around making the OpenStack services reliable, but more around how to increase overall resiliency when other hardware or software is misbehaving.&lt;/p&gt;
&lt;p&gt;Discussions or arguments about minutiae were difficult to find.&lt;/p&gt;
&lt;h2 id="boring-is-good"&gt;Boring is good&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;I&amp;rsquo;m not trying to say that working with OpenStack is boring.&lt;/strong&gt; Developing software within the OpenStack community is an enjoyable experience. The rules and regulations within most projects are there to prevent design mistakes that have appeared before and many of these sets of rules are aligned between projects. Testing code and providing meaningful reviews is also straightforward.&lt;/p&gt;
&lt;p&gt;However, the drama, both unproductive and productive, that plagued the project in the past is diminishing. It still exists in places, especially when it comes to vendor relationships. (That&amp;rsquo;s where most open source projects see their largest amounts of friction, anyway.)&lt;/p&gt;
&lt;p&gt;This transformation may make OpenStack appear &amp;ldquo;dead&amp;rdquo; to some. The OpenStack community is solving different problems now. Many of them are larger and more difficult to solve. Sometimes these challenges take more than one release to overcome. Either way, many OpenStack developers are up for these new challenges, even if they don&amp;rsquo;t make the headlines.&lt;/p&gt;
&lt;p&gt;As for me: &lt;strong&gt;bring on the boring&lt;/strong&gt;. Let&amp;rsquo;s crush the hard stuff.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Photo credit: By Mike (Flickr: DSC_6831_2_3_tonemapped) [&lt;a href="http://creativecommons.org/licenses/by/2.0"&gt;CC BY 2.0&lt;/a&gt;], &lt;a href="https://commons.wikimedia.org/wiki/File%3AMidtown_HDR_Atlanta.jpg"&gt;via Wikimedia Commons&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>OpenStack instances come online with multiple network ports attached</title><link>https://major.io/p/openstack-instances-come-online-with-multiple-network-ports-attached/</link><pubDate>Wed, 03 Aug 2016 14:40:16 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/openstack-instances-come-online-with-multiple-network-ports-attached/</guid><description>&lt;p&gt;I ran into an interesting problem recently in my production OpenStack deployment that runs the Mitaka release. On various occasions, instances were coming online with multiple network ports attached, even though I only asked for one network port.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The problem&lt;/h2&gt;
&lt;p&gt;If I issued a build request for ten instances, I&amp;rsquo;d usually end up with this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;6 instances with one network port attached&lt;/li&gt;
&lt;li&gt;2-3 instances with two network ports attached &lt;em&gt;(not what I want)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;1-2 instances with three or four network ports attached &lt;em&gt;(&lt;strong&gt;definitely&lt;/strong&gt; not what I want)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When I examined the instances with multiple network ports attached, I found that one of the network ports would be marked as &lt;em&gt;up&lt;/em&gt; while the others would be marked as &lt;em&gt;down&lt;/em&gt;. However, the IP addresses associated with those extra ports would still be associated with the instance in horizon and via the nova API. All of the network ports seemed to be fully configured on the neutron side.&lt;/p&gt;
&lt;h2 id="digging-into-neutron"&gt;Digging into neutron&lt;/h2&gt;
&lt;p&gt;The neutron API logs are fairly chatty, especially while instances are building, but I found two interesting log lines for one of my instances:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;172.29.236.41,172.29.236.21 - - [02/Aug/2016 14:03:11] &amp;#34;GET /v2.0/ports.json?tenant_id=a7b0519330ed481884431102a72dd04c&amp;amp;device_id=05eef1bb-5356-43d9-86c9-4d9854d4d46b HTTP/1.1&amp;#34; 200 2137 0.025282
172.29.236.11,172.29.236.21 - - [02/Aug/2016 14:03:15] &amp;#34;GET /v2.0/ports.json?tenant_id=a7b0519330ed481884431102a72dd04c&amp;amp;device_id=05eef1bb-5356-43d9-86c9-4d9854d4d46b HTTP/1.1&amp;#34; 200 3098 0.027803
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are two requests to create network ports for this instance and neutron is allocating ports to both requests. This would normally be just fine, but I only asked for one network port on this instance.&lt;/p&gt;
&lt;p&gt;The IP addresses making the requests are unusual, though. &lt;code&gt;172.29.236.11&lt;/code&gt; and &lt;code&gt;172.29.236.41&lt;/code&gt; are two of the hypervisors within my cloud. Why are both of them asking neutron for network ports? Only one of those hypervisors should be building my instance, not both. After checking both hypervisors, I verified that the instance was only provisioned on one of the hosts and not both.&lt;/p&gt;
&lt;h2 id="looking-at-nova-compute"&gt;Looking at nova-compute&lt;/h2&gt;
&lt;p&gt;The instance ended up on the &lt;code&gt;172.29.236.11&lt;/code&gt; hypervisor once it finished building and the logs on that hypervisor looked fine:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;nova.virt.libvirt.driver [-] [instance: 05eef1bb-5356-43d9-86c9-4d9854d4d46b] Instance spawned successfully.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I logged into the &lt;code&gt;172.29.236.41&lt;/code&gt; hypervisor since it was the one that asked neutron for a port but it never built the instance. The logs there had a much different story:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[instance: 05eef1bb-5356-43d9-86c9-4d9854d4d46b] Instance failed to spawn
Traceback (most recent call last):
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/compute/manager.py&amp;#34;, line 2218, in _build_resources
 yield resources
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/compute/manager.py&amp;#34;, line 2064, in _build_and_run_instance
 block_device_info=block_device_info)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/driver.py&amp;#34;, line 2773, in spawn
 admin_pass=admin_password)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/driver.py&amp;#34;, line 3191, in _create_image
 instance, size, fallback_from_host)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/driver.py&amp;#34;, line 6765, in _try_fetch_image_cache
 size=size)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py&amp;#34;, line 251, in cache
 *args, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py&amp;#34;, line 591, in create_image
 prepare_template(target=base, max_size=size, *args, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/oslo_concurrency/lockutils.py&amp;#34;, line 271, in inner
 return f(*args, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py&amp;#34;, line 241, in fetch_func_sync
 fetch_func(target=target, *args, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/libvirt/utils.py&amp;#34;, line 429, in fetch_image
 max_size=max_size)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/images.py&amp;#34;, line 120, in fetch_to_raw
 max_size=max_size)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/virt/images.py&amp;#34;, line 110, in fetch
 IMAGE_API.download(context, image_href, dest_path=path)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/image/api.py&amp;#34;, line 182, in download
 dst_path=dest_path)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/image/glance.py&amp;#34;, line 383, in download
 _reraise_translated_image_exception(image_id)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/image/glance.py&amp;#34;, line 682, in _reraise_translated_image_exception
 six.reraise(new_exc, None, exc_trace)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/image/glance.py&amp;#34;, line 381, in download
 image_chunks = self._client.call(context, 1, &amp;#39;data&amp;#39;, image_id)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/nova/image/glance.py&amp;#34;, line 250, in call
 result = getattr(client.images, method)(*args, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/glanceclient/v1/images.py&amp;#34;, line 148, in data
 % urlparse.quote(str(image_id)))
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/glanceclient/common/http.py&amp;#34;, line 275, in get
 return self._request(&amp;#39;GET&amp;#39;, url, **kwargs)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/glanceclient/common/http.py&amp;#34;, line 267, in _request
 resp, body_iter = self._handle_response(resp)
 File &amp;#34;/openstack/venvs/nova-13.3.0/lib/python2.7/site-packages/glanceclient/common/http.py&amp;#34;, line 83, in _handle_response
 raise exc.from_response(resp, resp.content)
ImageNotFound: Image 8feacda9-91fd-48ce-b983-54f7b6de6650 could not be found.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is one of those occasions where I was glad to find an exception in the log. The image that couldn&amp;rsquo;t be found is an image I&amp;rsquo;ve used regularly in the environment before, and I know it exists.&lt;/p&gt;
&lt;h2 id="gandering-at-glance"&gt;Gandering at glance&lt;/h2&gt;
&lt;p&gt;First off, I asked glance what it knew about the image:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ openstack image show 8feacda9-91fd-48ce-b983-54f7b6de6650
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | 8de08e3fe24ee788e50a6a508235aa64 |
| container_format | bare |
| created_at | 2016-08-03T01:25:34Z |
| disk_format | qcow2 |
| file | /v2/images/8feacda9-91fd-48ce-b983-54f7b6de6650/file |
| id | 8feacda9-91fd-48ce-b983-54f7b6de6650 |
| min_disk | 0 |
| min_ram | 0 |
| name | Fedora 24 |
| owner | a7b0519330ed481884431102a72dd04c |
| properties | description=&amp;#39;&amp;#39; |
| protected | False |
| schema | /v2/schemas/image |
| size | 204590080 |
| status | active |
| tags | |
| updated_at | 2016-08-03T01:25:39Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If glance knows about the image, why can&amp;rsquo;t that hypervisor build an instance with that image? While I was scratching my head, &lt;a href="https://twitter.com/cloudnull"&gt;Kevin Carter&lt;/a&gt; walked by my desk and joined in the debugging.&lt;/p&gt;
&lt;p&gt;He asked about how I had deployed glance and what storage backend I was using. I was using the regular file storage backend since I don&amp;rsquo;t have swift deployed in the environment. He asked me how many glance nodes I had (I had two) and if I was doing anything to sync the images between the glance nodes.&lt;/p&gt;
&lt;p&gt;Then it hit me.&lt;/p&gt;
&lt;p&gt;&lt;img alt="stitch_frustrated.gif" loading="lazy" src="https://major.io/p/openstack-instances-come-online-with-multiple-network-ports-attached/stitch_frustrated.gif"&gt;&lt;/p&gt;
&lt;p&gt;Although both glance nodes knew about the image (since that data is in the database), &lt;strong&gt;only one of the glance nodes had the actual image content (the actual qcow2 file) stored&lt;/strong&gt;. That means that if a hypervisor requests the image from a glance node that knows about the image but doesn&amp;rsquo;t have it stored, the hypervisor won&amp;rsquo;t be able to retrieve the image.&lt;/p&gt;
&lt;p&gt;Unfortunately, the checks go in this order on the nova-compute side:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ask glance if this image exists and if this tenant can use it&lt;/li&gt;
&lt;li&gt;Configure the network&lt;/li&gt;
&lt;li&gt;Retrieve the image&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If a hypervisor rolls through steps one and two without issues, but then fails on step 3, the network port will be provisioned but won&amp;rsquo;t come up on the instance. There&amp;rsquo;s nothing that cleans up that port in the Mitaka release, so it requires manual intervention.&lt;/p&gt;
&lt;h2 id="the-fix"&gt;The fix&lt;/h2&gt;
&lt;p&gt;As a temporary workaround, I took one of the glance nodes offline so that only one glance node is being used. After hundreds of builds, all of the instances came up with only one network port attached!&lt;/p&gt;
&lt;p&gt;There are a few options for long-term fixes.&lt;/p&gt;
&lt;p&gt;I could deploy swift and put glance images into swift. That would allow me to use multiple glance nodes with the same swift backend. Another option would be to use an existing swift deployment, such as Rackspace&amp;rsquo;s Cloud Files product.&lt;/p&gt;
&lt;p&gt;Since I&amp;rsquo;m not eager to deploy swift in my environment for now, I decided to remove the second glance node and reconfigure nova to use only one glance node. That means I&amp;rsquo;m running with only one glance node and a failure there could be highly annoying. However, that trade-off is fine with me until I can get around to deploying swift.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I&amp;rsquo;ve opened &lt;a href="https://bugs.launchpad.net/nova/+bug/1609526"&gt;a bug&lt;/a&gt; for nova so that the network ports are cleaned up if the instance fails to build.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Photo credit: &lt;a href="https://flic.kr/p/tfpXk"&gt;Flickr: pascalcharest&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Talk Recap: Automated security hardening with OpenStack-Ansible</title><link>https://major.io/p/talk-recap-automated-security-hardening-openstack-ansible/</link><pubDate>Tue, 26 Apr 2016 21:19:02 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/talk-recap-automated-security-hardening-openstack-ansible/</guid><description>&lt;p&gt;Today is the second day of the &lt;a href="https://www.openstack.org/summit/austin-2016/"&gt;OpenStack Summit in Austin&lt;/a&gt; and I offered up a talk on host security hardening in OpenStack clouds. You can &lt;a href="http://www.slideshare.net/MajorHayden/automated-security-hardening-with-openstackansible"&gt;download the slides&lt;/a&gt; or watch the video here:&lt;/p&gt;
&lt;p&gt;&lt;span class="embed-youtube" style="text-align:center; display: block;"&gt;&lt;iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/q_uDtdpLmpg?version=3&amp;#038;rel=1&amp;#038;fs=1&amp;#038;autohide=2&amp;#038;showsearch=0&amp;#038;showinfo=1&amp;#038;iv_load_policy=1&amp;#038;wmode=transparent' allowfullscreen='true' style='border:0;'&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a quick recap of the talk and the conversations afterward:&lt;/p&gt;
&lt;h2 id="security-tug-of-war"&gt;Security tug-of-war&lt;/h2&gt;
&lt;p&gt;Information security is a challenging task, mainly because it is more than just a technical problem. Technology is a big part of it, but communication, culture, and compromise are also critical. I flashed up this statement on the slides:&lt;/p&gt;
&lt;blockquote class="twitter-tweet tw-align-center" data-width="500"&gt;
 &lt;p lang="en" dir="ltr"&gt;
 "People should feel like security is something they are part of; not something that is done to them" &lt;a href="https://twitter.com/majorhayden"&gt;@majorhayden&lt;/a&gt; &lt;a href="https://t.co/Blh9rZp0uL"&gt;pic.twitter.com/Blh9rZp0uL&lt;/a&gt;
 &lt;/p&gt;
 &lt;p&gt;
 &amp;mdash; Rackspace (@Rackspace) &lt;a href="https://twitter.com/Rackspace/status/724998210154979329"&gt;April 26, 2016&lt;/a&gt;
 &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the end, the information security teams, the developers &lt;em&gt;and&lt;/em&gt; the auditors must be happy. This can be a challenging tightrope to walk, but automating some security allows everyone to get what they want in a scalable and repeatable way.&lt;/p&gt;
&lt;h2 id="meeting-halfway"&gt;Meeting halfway&lt;/h2&gt;
&lt;p&gt;The &lt;a href="http://docs.openstack.org/developer/openstack-ansible-security"&gt;openstack-ansible-security role&lt;/a&gt; allows information security teams to meet developers or OpenStack deployers halfway. It can easily bolt onto existing Ansible playbooks and manage host security hardening for Ubuntu 14.04 systems. The role also works in non-OpenStack environments just as well. All of the documentation, configuration, and Ansible tasks are all included with the role.&lt;/p&gt;
&lt;p&gt;The role itself applies security configurations to each host in an environment. Those configurations are based on the Security Technical Implementation Guide (STIG) from the Defense Information Systems Agency (DISA), which is part of the United States Department of Defense. The role takes the configurations from the STIG and makes small tweaks to fit an OpenStack environment. All of the tasks are carefully translated from the STIG for Red Hat Enterprise Linux 6 (there is no STIG for Ubuntu currently).&lt;/p&gt;
&lt;p&gt;The role is available now as part of OpenStack-Ansible in the Liberty, Mitaka, and Newton releases. Simply adjust &lt;code&gt;apply_security_hardening&lt;/code&gt; from &lt;code&gt;false&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and deploy. For other users, the role can easily be used in any Ansible playbook. &lt;em&gt;(Be sure to review the configuration to ensure its defaults meet your requirements.)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="getting-involved"&gt;Getting involved&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://major.io/wp-content/uploads/2011/11/openstack-justheo.png"&gt;&lt;img src="https://major.io/wp-content/uploads/2011/11/openstack-justheo.png" alt="OpenStack security" width="232" height="214" class="alignright size-full wp-image-2592" /&gt;&lt;/a&gt;We need your help! Upcoming plans include Ubuntu 16.04 and CentOS support, a rebase onto the RHEL 7 STIG (which will be finalized soon), and better reporting.&lt;/p&gt;
&lt;p&gt;Join us later this week for the OpenStack-Ansible design summit sessions or anytime on Freenode in #openstack-ansible. We&amp;rsquo;re on the OpenStack development mailing list as well (be sure to use the &lt;code&gt;[openstack-ansible][security]&lt;/code&gt; tags.&lt;/p&gt;
&lt;h2 id="hallway-conversations"&gt;Hallway conversations&lt;/h2&gt;
&lt;p&gt;Lots of people came by to chat afterwards and offered to join in the development. A few people were hoping it would have been the security &amp;ldquo;silver bullet&amp;rdquo;, and I reset some expectations.&lt;/p&gt;
&lt;p&gt;Some attendees has good ideas around making the role more generic and adding an &amp;ldquo;OpenStack switch&amp;rdquo; that would configure many variables to fit an OpenStack environment. That would allow people to use it easily with non-OpenStack environments.&lt;/p&gt;
&lt;p&gt;Other comments were around hardening inside of Linux containers. These users had &amp;ldquo;heavy&amp;rdquo; containers where the entire OS is virtualized and multiple processes might be running at the same time. Some of the configuration changes (especially the kernel tunables) don&amp;rsquo;t make sense inside a container like that, but many of the others could be useful. For more information on securing Linux containers, watch the video from &lt;a href="https://www.openstack.org/summit/austin-2016/summit-schedule/events/8615"&gt;Thomas Cameron&amp;rsquo;s talk&lt;/a&gt; here at the summit.&lt;/p&gt;
&lt;h2 id="thank-you"&gt;Thank you&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;d like to thank everyone for coming to the talk today and sharing their feedback. It&amp;rsquo;s immensely useful and I pile all of that feedback into future talks. Also, I&amp;rsquo;d like to thank all of the people at Rackspace who helped me review the slides and improve them.&lt;/p&gt;
&lt;iframe src='https://www.slideshare.net/slideshow/embed_code/61387839' width='425' height='348' allowfullscreen webkitallowfullscreen mozallowfullscreen&gt;&lt;/iframe&gt;</description></item><item><title>systemd-networkd and macvlan interfaces</title><link>https://major.io/p/systemd-networkd-and-macvlan-interfaces/</link><pubDate>Mon, 26 Oct 2015 13:50:36 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/systemd-networkd-and-macvlan-interfaces/</guid><description>&lt;p&gt;I spent some time working with &lt;a href="http://virt.kernelnewbies.org/MacVTap"&gt;macvlan&lt;/a&gt; interfaces on KVM hypervisors last weekend. They&amp;rsquo;re interesting because they&amp;rsquo;re not really a &lt;em&gt;bridge&lt;/em&gt;. It allows you to assign multiple MAC addresses to a single interface and then allow the kernel to filter traffic into tap interfaces based on the MAC address in the packet. If you&amp;rsquo;re looking for a highly detailed explanation, head on over to &lt;a href="http://backreference.org/2014/03/20/some-notes-on-macvlanmacvtap/"&gt;waldner&amp;rsquo;s blog&lt;/a&gt; for a deep dive into the technology and the changes that come along with it.&lt;/p&gt;
&lt;h2 id="why-macvlan"&gt;Why macvlan?&lt;/h2&gt;
&lt;p&gt;Bridging can become a pain to work with, especially when you&amp;rsquo;re forced to add in creative filtering rules and keep them updated. The macvlan interfaces can help with that (read up on &lt;a href="http://backreference.org/2014/03/20/some-notes-on-macvlanmacvtap/"&gt;VEPA&lt;/a&gt; mode). There are some &lt;a href="http://www.spinics.net/lists/netdev/msg103457.html"&gt;interesting email threads&lt;/a&gt; showing that macvlan interfaces can improve network performance for various workloads. Low latency workloads can benefit from the simplicity and low overhead of macvlan interfaces.&lt;/p&gt;
&lt;h2 id="systemd-networkd-and-macvlan-interfaces"&gt;systemd-networkd and macvlan interfaces&lt;/h2&gt;
&lt;p&gt;Fortunately for us, systemd-networkd makes configuring a macvlan interface &lt;strong&gt;really&lt;/strong&gt; easy. I&amp;rsquo;ve written about &lt;a href="https://major.io/2015/03/26/creating-a-bridge-for-virtual-machines-using-systemd-networkd/"&gt;configuring bridges with systemd-networkd&lt;/a&gt; and the process for macvlan interfaces is similar.&lt;/p&gt;
&lt;p&gt;In my scenario, I have a 1U server with an ethernet interface called &lt;code&gt;enp4s0&lt;/code&gt; (read up on &lt;a href="https://major.io/2015/08/21/understanding-systemds-predictable-network-device-names/"&gt;interface naming with systemd-udevd&lt;/a&gt;). I want to make a macvlan interface for virtual machines and I&amp;rsquo;ll be attaching VM&amp;rsquo;s to that interface via macvtap interfaces. It&amp;rsquo;s similar to bridging where you make a bridge and then give everyone a port on the bridge.&lt;/p&gt;
&lt;p&gt;Start by creating a network device for our macvlan interface:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# /etc/systemd/network/vmbridge.netdev&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[NetDev]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;vmbridge&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Kind&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;macvlan&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[MACVLAN]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;bridge&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve told systemd-networkd that I want a macvlan interface set up in bridge mode. This will allow hosts and virtual machines to talk to one another on the interface. You could choose &lt;code&gt;vepa&lt;/code&gt; for the mode if you want additional security. However, this will force traffic out to your upstream switch/router and makes it challenging for hosts and guests to communicate with each other.&lt;/p&gt;
&lt;p&gt;Now that we have a device configured, let&amp;rsquo;s configure the IP address for the macvlan interface (similar to configuring a bridge):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# /etc/systemd/network/vmbridge.network&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Match]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;vmbridge&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Network]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;IPForward&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Address&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;192.168.250.33/24&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Gateway&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;192.168.250.1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;DNS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;192.168.250.1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s tell systemd-networkd that our physical network interface, &lt;code&gt;enp4s0&lt;/code&gt;, is part of this interface:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# /etc/systemd/network/enp4s0.network&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Match]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;enp4s0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Network]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;MACVLAN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;vmbridge&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is very similar to a configuration for a standard Linux bridge. Once you&amp;rsquo;ve reached this step, you&amp;rsquo;ll most likely want to reboot to ensure all of your network devices come up properly.&lt;/p&gt;
&lt;h2 id="attaching-a-virtual-machine"&gt;Attaching a virtual machine&lt;/h2&gt;
&lt;p&gt;Attaching a KVM virtual machine to the macvlan interface is quite easy. When you&amp;rsquo;re creating a new VM using &lt;code&gt;virt-manager&lt;/code&gt;, look for this setting in the wizard:&lt;/p&gt;
&lt;p&gt;&lt;img alt="6" loading="lazy" src="https://major.io/wp-content/uploads/2015/10/Selection_036.png"&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re installing via &lt;code&gt;virt-install&lt;/code&gt; just use the following argument for your network configuration:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;--network type=direct,source=vmbridge,source_mode=bridge
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll end up with interfaces like these after creating multiple virtual machines:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500
 link/ether 52:54:00:83:53:f2 brd ff:ff:ff:ff:ff:ff promiscuity 0
 macvtap mode bridge addrgenmode eui64
15: macvtap2@enp4s0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500
 link/ether 52:54:00:f1:76:0b brd ff:ff:ff:ff:ff:ff promiscuity 0
 macvtap mode bridge addrgenmode eui64
17: macvtap3@enp4s0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500
 link/ether 52:54:00💿53:34 brd ff:ff:ff:ff:ff:ff promiscuity 0
 macvtap mode bridge addrgenmode eui64
20: macvtap1@enp4s0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500
 link/ether 52:54:00:18:79:d3 brd ff:ff:ff:ff:ff:ff promiscuity 0
 macvtap mode bridge addrgenmode eui64
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Live migration failures with KVM and libvirt</title><link>https://major.io/p/live-migration-failures-with-kvm-and-libvirt/</link><pubDate>Mon, 03 Aug 2015 13:13:30 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/live-migration-failures-with-kvm-and-libvirt/</guid><description>&lt;p&gt;I decided to change some of my infrastructure back to KVM again, and the overall experience has been quite good in Fedora 22. Using libvirt with KVM is a breeze and the virt-manager tools make it even easier. However, I ran into some problems while trying to migrate virtual machines from one server to another.&lt;/p&gt;
&lt;h3 id="the-error"&gt;The error&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# virsh migrate --live --copy-storage-all bastion qemu+ssh://root@192.168.250.33/system
error: internal error: unable to execute QEMU command &amp;#39;drive-mirror&amp;#39;: Failed to connect socket: Connection timed out
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That error message wasn&amp;rsquo;t terribly helpful. I started running through my usual list of checks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Can the hypervisors talk to each other?&lt;/em&gt; Yes, iptables is disabled.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Are ssh keys configured?&lt;/em&gt; Yes, verified.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What about ssh host keys being accepted on each side?&lt;/em&gt; Both sides can ssh without interaction.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;SELinux?&lt;/em&gt; No AVC&amp;rsquo;s logged.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Libvirt logs?&lt;/em&gt; Nothing relevant in libvirt&amp;rsquo;s qemu logs.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Filesystem permissions for libvirt&amp;rsquo;s directories?&lt;/em&gt; Identical on both sides.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Libvirt daemon running on both sides?&lt;/em&gt; Yes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was pretty confused at this point. A quick Google search didn&amp;rsquo;t reveal too many relevant issues, but I did find a &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=1025699"&gt;Red Hat Bug from 2013&lt;/a&gt; that affected RHEL 7. The issue in the bug was that libvirt wasn&amp;rsquo;t using the right ports to talk between servers and those packets were being dropped by iptables. My iptables rules were empty.&lt;/p&gt;
&lt;h3 id="debug-time"&gt;Debug time&lt;/h3&gt;
&lt;p&gt;I ran the same command with &lt;code&gt;LIBVIRT_DEBUG=1&lt;/code&gt; at the front:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; debug.log
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After scouring the pages and pages of output, I couldn&amp;rsquo;t find anything useful.&lt;/p&gt;
&lt;h3 id="eureka"&gt;Eureka!&lt;/h3&gt;
&lt;p&gt;I spotted an error message briefly in virt-manager or the debug logs that jogged my brain to think about a potential problem: hostnames. Both hosts had a fairly bare &lt;code&gt;/etc/hosts&lt;/code&gt; file without IP/hostname pairs for each hypervisor. After editing both servers&amp;rsquo; &lt;code&gt;/etc/hosts&lt;/code&gt; file to include the short and full hostnames for each hypervisor, I tested the live migration one more time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Success!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The migration went off without a hitch in virt-manager and via the &lt;code&gt;virsh&lt;/code&gt; client. I migrated several VM&amp;rsquo;s, including the one running this site, with no noticeable interruption.&lt;/p&gt;</description></item><item><title>Try out LXC with an Ansible playbook</title><link>https://major.io/p/try-lxc-ansible-playbook/</link><pubDate>Wed, 17 Dec 2014 13:50:26 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/try-lxc-ansible-playbook/</guid><description>&lt;p&gt;&lt;a href="https://major.io/wp-content/uploads/2014/08/image-ansible.png"&gt;&lt;img src="https://major.io/wp-content/uploads/2014/08/image-ansible-300x300.png" alt="Ansible logo" width="300" height="300" class="alignright size-medium wp-image-5157" srcset="https://major.io/wp-content/uploads/2014/08/image-ansible-300x300.png 300w, https://major.io/wp-content/uploads/2014/08/image-ansible-150x150.png 150w, https://major.io/wp-content/uploads/2014/08/image-ansible.png 700w" sizes="(max-width: 300px) 100vw, 300px" /&gt;&lt;/a&gt;The world of containers is constantly evolving lately. The latest turn of events involves the CoreOS developers when they announced &lt;a href="https://coreos.com/blog/rocket/"&gt;Rocket&lt;/a&gt; as an alternative to &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;. However, &lt;a href="https://linuxcontainers.org/"&gt;LXC&lt;/a&gt; still lingers as a very simple path to begin using containers.&lt;/p&gt;
&lt;p&gt;When I talk to people about LXC, I often hear people talk about how difficult it is to get started with LXC. After all, Docker provides an easy-to-use image downloading function that allows you to spin up multiple different operating systems in Docker containers within a few minutes. It also comes with a daemon to help you manage your images and your containers.&lt;/p&gt;
&lt;p&gt;Managing LXC containers using the basic LXC tools isn&amp;rsquo;t terribly easy - I&amp;rsquo;ll give you that. However, managing LXC through &lt;a href="https://libvirt.org/drvlxc.html"&gt;libvirt&lt;/a&gt; makes the process much easier. I &lt;a href="https://major.io/2014/04/21/launch-secure-lxc-containers-on-fedora-20-using-selinux-and-svirt/"&gt;wrote a little about this&lt;/a&gt; earlier in the year.&lt;/p&gt;
&lt;p&gt;I decided to turn the LXC container deployment process into an &lt;a href="https://github.com/major/ansible-lxc"&gt;Ansible playbook&lt;/a&gt; that you can use to automatically spawn an LXC container on any server or virtual machine. At the moment, only Fedora 20 and 21 are supported. I plan to add CentOS 7 and Debian support soon.&lt;/p&gt;
&lt;p&gt;Clone the repository to get started:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;git clone https://github.com/major/ansible-lxc.git
cd ansible-lxc
ansible-playbook -i hosts playbook.yml
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you&amp;rsquo;re running the playbook on the actual server or virtual machine where you want to run LXC, there&amp;rsquo;s no need to alter the &lt;code&gt;hosts&lt;/code&gt; file. You will need to adjust it if you&amp;rsquo;re running your playbook from a remote machine.&lt;/p&gt;
&lt;p&gt;As the playbook runs, it will install all of the necessary packages and begin assembling a Fedora 21 chroot. It will register the container with libvirt and do some basic configuration of the chroot so that it will work as a container. You&amp;rsquo;ll end up with a running Fedora 21 LXC container that is using the built-in default NAT network created by libvirt. The playbook will print out the IP address of the container at the end. The default password for root is &lt;em&gt;fedora&lt;/em&gt;. I wouldn&amp;rsquo;t recommend leaving that for a production use container. ;)&lt;/p&gt;
&lt;p&gt;All of the normal &lt;code&gt;virsh&lt;/code&gt; commands should work on the container. For example:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# Stop the container gracefully
virsh shutdown fedora21
# Start the container
virsh start fedora21
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Feel free to install the virt-manager tool and manage everything via a GUI locally or via X forwarding:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install virt-manager dejavu* xorg-x11-xauth
# OPTIONAL: For a better looking virt-manager interface, install these, too
yum -y install gnome-icon-theme gnome-themes-standard
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Configure static IP addresses for Project Atomic’s KVM image</title><link>https://major.io/p/configure-static-ip-addresses-for-project-atomics-kvm-image/</link><pubDate>Wed, 23 Apr 2014 15:14:39 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/configure-static-ip-addresses-for-project-atomics-kvm-image/</guid><description>&lt;p&gt;Amid all of the Docker buzz at the Red Hat Summit, &lt;a href="http://www.projectatomic.io/"&gt;Project Atomic&lt;/a&gt; was launched. It&amp;rsquo;s a minimalistic Fedora 20 image with a &lt;a href="http://www.projectatomic.io/docs/gettingstarted/"&gt;few tweaks&lt;/a&gt;, including &lt;a href="http://rpm-ostree.cloud.fedoraproject.org/#/"&gt;rpm-ostree&lt;/a&gt; and &lt;a href="https://openshift.github.io/geard/"&gt;geard&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are &lt;a href="http://www.projectatomic.io/download/"&gt;great instructions&lt;/a&gt; on the site for firing up a test instance under KVM but my test server doesn&amp;rsquo;t have a DHCP server on its network. You can use Project Atomic with static IP addresses fairly easily:&lt;/p&gt;
&lt;p&gt;Create a one-line &lt;code&gt;/etc/sysconfig/network&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;NETWORKING&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Drop in a basic network configuration into &lt;code&gt;/etc/sysconfig/network-scripts/ifcfg-eth0&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;DEVICE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;eth0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;IPADDR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;10.127.92.32&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;NETMASK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;255.255.255.0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;GATEWAY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;10.127.92.1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;ONBOOT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;All that&amp;rsquo;s left is to set DNS servers and a hostname:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;echo &amp;#34;nameserver 8.8.8.8&amp;#34; &amp;gt; /etc/resolv.conf
hostnamectl set-hostname myatomichost.example.com
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Bring up the network interface:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;ifup eth0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Of course, you could do all of this via the &lt;code&gt;nmcli&lt;/code&gt; tool if you prefer to go that route.&lt;/p&gt;</description></item><item><title>Launch secure LXC containers on Fedora 20 using SELinux and sVirt</title><link>https://major.io/p/launch-secure-lxc-containers-on-fedora-20-using-selinux-and-svirt/</link><pubDate>Tue, 22 Apr 2014 04:11:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/launch-secure-lxc-containers-on-fedora-20-using-selinux-and-svirt/</guid><description>&lt;p&gt;&lt;img alt="1" loading="lazy" src="https://major.io/wp-content/uploads/2013/07/selinux-penguin-new_medium.png"&gt;&lt;/p&gt;
&lt;p&gt;Getting started with &lt;a href="https://en.wikipedia.org/wiki/LXC"&gt;LXC&lt;/a&gt; is a bit awkward and I&amp;rsquo;ve assembled this guide for anyone who wants to begin experimenting with LXC containers in Fedora 20. As an added benefit, you can follow almost every step shown here when creating LXC containers on &lt;a href="https://access.redhat.com/site/products/Red_Hat_Enterprise_Linux/Get-Beta"&gt;Red Hat Enterprise Linux 7&lt;/a&gt; Beta (which is based on Fedora 19).&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll need a physical machine or a VM running Fedora 20 to get started. &lt;span style="color: #888888"&gt;(You could put a container in a container, but things get a little dicey with that setup. Let&amp;rsquo;s just avoid talking about nested containers for now. No, really, I shouldn&amp;rsquo;t have even brought it up. Sorry about that.)&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="prep-work"&gt;Prep Work&lt;/h3&gt;
&lt;p&gt;Start by updating all packages to the latest versions available:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Verify that SELinux is in enforcing mode by running &lt;code&gt;getenforce&lt;/code&gt;. If you see &lt;em&gt;Disabled&lt;/em&gt; or &lt;em&gt;Permissive&lt;/em&gt;, get SELinux into enforcing mode with a quick configuration change:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;sed -i &amp;#39;s/^SELINUX=.*/SELINUX=enforcing/&amp;#39; /etc/selinux/config
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I recommend installing &lt;code&gt;setroubleshoot-server&lt;/code&gt; to make it easier to find the root cause of AVC denials:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-yum" data-lang="yum"&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reboot now. This will ensure that SELinux comes up in enforcing mode (verify that with &lt;code&gt;getenforce&lt;/code&gt; after reboot) and it ensures that auditd starts up sedispatch (for setroubleshoot).&lt;/p&gt;
&lt;h3 id="install-management-libraries-and-utilities"&gt;Install management libraries and utilities&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s grab libvirt along with LXC support and a basic NAT networking configuration.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install libvirt-daemon-lxc libvirt-daemon-config-network
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Launch libvirtd via systemd and ensure that it always comes up on boot. This step will also adjust firewalld for your containers and ensure that dnsmasq is serving up IP addresses via DHCP on your default NAT network.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;systemctl start libvirtd.service
systemctl enable libvirtd.service
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="bootstrap-our-container"&gt;Bootstrap our container&lt;/h3&gt;
&lt;p&gt;Installing packages into the container&amp;rsquo;s filesystem will take some time.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y --installroot=/var/lib/libvirt/filesystems/fedora20 --releasever=20 --nogpg install systemd passwd yum fedora-release vim-minimal openssh-server procps-ng iproute net-tools dhclient
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This step fills in the filesystem with the necessary packages to run a Fedora 20 container. We now need to tell libvirt about the container we&amp;rsquo;ve just created.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virt-install --connect lxc:// --name fedora20 --ram 512 --filesystem /var/lib/libvirt/filesystems/fedora20/,/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, libvirt will know enough about the container to start it and you&amp;rsquo;ll be connected to the console of the container! We need to adjust some configuration files within the container to use it properly. Detach from the console with CTRL-].&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s stop the container so we can make some adjustments.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virsh -c lxc:// shutdown fedora20
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="get-the-container-ready-for-production"&gt;Get the container ready for production&lt;/h3&gt;
&lt;p&gt;Hop into your container and set a root password.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;chroot /var/lib/libvirt/filesystems/fedora20 /bin/passwd root
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We will be logging in as root via the console occasionally and we need to allow that access.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;echo &amp;#34;pts/0&amp;#34; &amp;gt;&amp;gt; /var/lib/libvirt/filesystems/fedora20/etc/securetty
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Since we will be using our NAT network with our auto-configured dnsmasq server (thanks to libvirt), we can configure a simple DHCP setup for eth0:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;cat &amp;lt; &amp;lt; EOF &amp;gt; /var/lib/libvirt/filesystems/fedora20/etc/sysconfig/network
NETWORKING=yes
EOF
cat &amp;lt; &amp;lt; EOF &amp;gt; /var/lib/libvirt/filesystems/fedora20/etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=dhcp
ONBOOT=yes
DEVICE=eth0
EOF
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Using ssh makes the container a lot easier to manage, so let&amp;rsquo;s ensure that it starts when the container boots. (You could do this via systemctl after logging in at the console, but I&amp;rsquo;m lazy.)&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;chroot /var/lib/libvirt/filesystems/fedora20/
ln -s /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/
exit
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="launch"&gt;Launch!&lt;/h3&gt;
&lt;p&gt;Cross your fingers and launch the container.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virsh -c lxc:// start --console fedora20
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll be attached to the console during boot but don&amp;rsquo;t worry, hold down CTRL-] to get back to your host prompt. Check the dnsmasq leases to find your container&amp;rsquo;s IP address and you can login as root over ssh.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;cat /var/lib/libvirt/dnsmasq/default.leases
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="security"&gt;Security&lt;/h3&gt;
&lt;p&gt;After logging into your container via ssh, check the process labels within the container:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# ps aufxZ
LABEL USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 1 0.0 1.3 47444 3444 ? Ss 03:18 0:00 /sbin/init
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 18 0.0 2.0 43016 5368 ? Ss 03:18 0:00 /usr/lib/systemd/systemd-journald
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 38 0.4 7.8 223456 20680 ? Ssl 03:18 0:00 /usr/bin/python -Es /usr/sbin/firewalld -
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 40 0.0 0.7 26504 2084 ? Ss 03:18 0:00 /usr/sbin/smartd -n -q never
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 41 0.0 0.4 19268 1252 ? Ss 03:18 0:00 /usr/sbin/irqbalance --foreground
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 44 0.0 0.6 34696 1636 ? Ss 03:18 0:00 /usr/lib/systemd/systemd-logind
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 46 0.0 1.8 267500 4832 ? Ssl 03:18 0:00 /sbin/rsyslogd -n
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 dbus 47 0.0 0.6 26708 1680 ? Ss 03:18 0:00 /bin/dbus-daemon --system --address=syste
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 rpc 54 0.0 0.5 41992 1344 ? Ss 03:18 0:00 /sbin/rpcbind -w
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 55 0.0 0.3 25936 924 ? Ss 03:18 0:00 /usr/sbin/atd -f
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 56 0.0 0.5 22728 1488 ? Ss 03:18 0:00 /usr/sbin/crond -n
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 60 0.0 0.2 6412 784 pts/0 Ss+ 03:18 0:00 /sbin/agetty --noclear -s console 115200
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 74 0.0 3.2 339808 8456 ? Ssl 03:18 0:00 /usr/sbin/NetworkManager --no-daemon
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 394 0.0 5.9 102356 15708 ? S 03:18 0:00 \_ /sbin/dhclient -d -sf /usr/libexec/nm
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 polkitd 83 0.0 4.4 514792 11548 ? Ssl 03:18 0:00 /usr/lib/polkit-1/polkitd --no-debug
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 rpcuser 110 0.0 0.6 46564 1824 ? Ss 03:18 0:00 /sbin/rpc.statd
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 111 0.0 1.3 82980 3620 ? Ss 03:18 0:00 /usr/sbin/sshd -D
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 409 0.0 1.9 131576 5084 ? Ss 03:18 0:00 \_ sshd: root@pts/1
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 413 0.0 0.9 115872 2592 pts/1 Ss 03:18 0:00 \_ -bash
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 438 0.0 0.5 123352 1344 pts/1 R+ 03:19 0:00 \_ ps aufxZ
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 411 0.0 0.8 44376 2252 ? Ss 03:18 0:00 /usr/lib/systemd/systemd --user
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 412 0.0 0.5 66828 1328 ? S 03:18 0:00 \_ (sd-pam)
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 436 0.0 0.4 21980 1144 ? Ss 03:19 0:00 /usr/lib/systemd/systemd-hostnamed
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll notice something interesting if you run &lt;code&gt;getenforce&lt;/code&gt; now within the container — SELinux is disabled. Actually, it&amp;rsquo;s not really disabled. The processing of SELinux policy is done on the host. The container isn&amp;rsquo;t able to see what&amp;rsquo;s going on outside of its own files and processes. The &lt;a href="http://libvirt.org/drvlxc.html#security"&gt;libvirt documentation for LXC&lt;/a&gt; hints at the importance of this isolation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A suitably configured UID/GID mapping is a pre-requisite to making containers secure, in the absence of sVirt confinement.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In the absence of the “user” namespace being used, containers cannot be considered secure against exploits of the host OS. The sVirt SELinux driver provides a way to secure containers even when the “user” namespace is not used. The cost is that writing a policy to allow execution of arbitrary OS is not practical. The SELinux sVirt policy is typically tailored to work with an simpler application confinement use case, as provided by the “libvirt-sandbox” project.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This leads to something really critical to understand:&lt;/p&gt;
&lt;h3 id="containers-dont-contain"&gt;Containers don&amp;rsquo;t contain&lt;/h3&gt;
&lt;p&gt;Dan Walsh has a &lt;a href="https://danwalsh.livejournal.com/30565.html"&gt;great post&lt;/a&gt; that goes into the need for sVirt and the protections it can provide when you need to be insulated from potentially dangerous virtual machines or containers. If a user is root inside a container, they&amp;rsquo;re root on the host as well. &lt;span style="color: #888888"&gt;(There&amp;rsquo;s an exception: &lt;a href="https://lwn.net/Articles/436445/"&gt;UID namespaces&lt;/a&gt;. But let&amp;rsquo;s not talk about that now. Oh great, first it was nested containers and now I brought up UID namespaces. Sorry again.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Dan&amp;rsquo;s talk about securing containers hasn&amp;rsquo;t popped up on the &lt;a href="http://www.redhat.com/summit/2014/presentations/"&gt;Red Hat Summit presentations&lt;/a&gt; page quite yet but here are some notes that I took and then highlighted:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Containers don&amp;rsquo;t contain. The kernel doesn&amp;rsquo;t know about containers. Containers simply use kernel subsystems to carve up namespaces for applications.&lt;/li&gt;
&lt;li&gt;Containers on Linux aren&amp;rsquo;t complete. Don&amp;rsquo;t compare directly to Solaris zones yet.&lt;/li&gt;
&lt;li&gt;Running containers without Mandatory Access Control (MAC) systems like SELinux or AppArmor opens the door for full system compromise via untrusted applications and users within containers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using MAC gives you one extra barrier to keep a malicious container from getting higher levels of access to the underlying host. There&amp;rsquo;s always a chance that a kernel exploit could bypass MAC but it certainly raises the level of difficulty for an attacker and allows server operators extra time to react to alerts.&lt;/p&gt;</description></item><item><title>Docker, trusted builds, and Fedora 20</title><link>https://major.io/p/docker-trusted-builds-and-fedora-20/</link><pubDate>Wed, 26 Mar 2014 05:17:58 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/docker-trusted-builds-and-fedora-20/</guid><description>&lt;p&gt;Docker is a hot topic in the Linux world at the moment and I decided to try out the new &lt;a href="http://blog.docker.io/2013/11/introducing-trusted-builds/"&gt;trusted build process&lt;/a&gt;. Long story short, you put your Dockerfile along with any additional content into your GitHub repository, link your GitHub account with Docker, and then fire off a build. The Docker index labels it as &amp;ldquo;trusted&amp;rdquo; since it was build from source files in your repository.&lt;/p&gt;
&lt;p&gt;I set off to build a Dockerfile to provision a container that would run all of the &lt;a href="https://major.io/icanhazip-com-faq/"&gt;icanhazip&lt;/a&gt; services. Getting httpd running was a little tricky, but I soon had a &lt;a href="https://github.com/major/icanhaz/blob/master/docker/Dockerfile"&gt;working Dockerfile&lt;/a&gt; that built and ran successfully on Fedora 20.&lt;/p&gt;
&lt;p&gt;The trusted build process kicked off without much fuss and I found myself waiting for a couple of hours for my job to start. I was sad to see an error after waiting so long:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Installing : httpd-2.4.7-3.fc20.x86_64
error: unpacking of archive failed on file /usr/sbin/suexec: cpio: cap_set_file
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Well, that&amp;rsquo;s weird. It turns out that &lt;code&gt;cap_set_file&lt;/code&gt; is part of libcap that sets filesystem capabilities based on the POSIX.1e standards. You can read up on capabilities in the &lt;a href="https://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.2/capfaq-0.2.txt"&gt;Linux kernel capabilities FAQ&lt;/a&gt;. &lt;em&gt;(Special thanks to Andrew Clayton getting me pointed in the right direction there.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://fedoraproject.org/wiki/User:Goldmann"&gt;Marek Goldmann&lt;/a&gt; ran into this problem back in September 2013 and opened a &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=1012952"&gt;bug report&lt;/a&gt;. Marek &lt;a href="https://bugzilla.redhat.com/attachment.cgi?id=804061&amp;amp;action=diff"&gt;proposed a change&lt;/a&gt; to the Docker codebase that would remove setfcap from the list of banned capabilities in the LXC template used by docker. Another workaround would be to use the &lt;code&gt;-privileged&lt;/code&gt; option to perform a build in privileged mode (available in docker 0.6+).&lt;/p&gt;
&lt;p&gt;Both of those workarounds are unavailable when doing trusted builds with docker&amp;rsquo;s index. Sigh.&lt;/p&gt;
&lt;p&gt;I fired off an email to Docker&amp;rsquo;s support staff and received a quick reply:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Major,&lt;/p&gt;
&lt;p&gt;We are aware of this issue, and we are currently working on a fix, and we hope to have something we can start testing this week. I&amp;rsquo;m not sure when we will be able to roll out the fix, but we are hoping soon. Until then, there isn&amp;rsquo;t anything you can do to work around it. Sorry for the inconvenience.&lt;/p&gt;
&lt;p&gt;If anything changes, we will be sure to let you know.&lt;/p&gt;
&lt;p&gt;Ken&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It wasn&amp;rsquo;t the answer I wanted but it&amp;rsquo;s good to know that the issue is being worked. In the meantime, I&amp;rsquo;ll push an untrusted build of the icanhazip Docker container up to the index for everyone to enjoy.&lt;/p&gt;
&lt;p&gt;Stay tuned for updates.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATED 2014-08-08:&lt;/strong&gt; Per Thomas&amp;rsquo; comment below, this has been &lt;a href="https://github.com/docker/docker/pull/5930"&gt;fixed upstream&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>virt-manager: ‘NoneType’ object has no attribute ‘cpus’</title><link>https://major.io/p/virt-manager-nonetype-object-has-no-attribute-cpus/</link><pubDate>Thu, 06 Mar 2014 18:44:58 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/virt-manager-nonetype-object-has-no-attribute-cpus/</guid><description>&lt;p&gt;After upgrading my Fedora 20 Xen hypervisor to virt-manager 1.0.0, I noticed that I couldn&amp;rsquo;t open the console or VM details for any of my guests. Running &lt;code&gt;virt-manager --debug&lt;/code&gt; gave me the following traceback:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Traceback (most recent call last):
 File &amp;#34;/usr/share/virt-manager/virtManager/engine.py&amp;#34;, line 803, in _show_vm_helper
 details = self._get_details_dialog(uri, uuid)
 File &amp;#34;/usr/share/virt-manager/virtManager/engine.py&amp;#34;, line 760, in _get_details_dialog
 obj = vmmDetails(con.get_vm(uuid))
 File &amp;#34;/usr/share/virt-manager/virtManager/details.py&amp;#34;, line 530, in __init__
 self.init_details()
 File &amp;#34;/usr/share/virt-manager/virtManager/details.py&amp;#34;, line 990, in init_details
 for name in [c.model for c in cpu_values.cpus]:
AttributeError: &amp;#39;NoneType&amp;#39; object has no attribute &amp;#39;cpus&amp;#39;
[Tue, 04 Mar 2014 22:13:31 virt-manager 21019] DEBUG (error:84) error dialog message:
summary=Error launching details: &amp;#39;NoneType&amp;#39; object has no attribute &amp;#39;cpus&amp;#39;
details=Error launching details: &amp;#39;NoneType&amp;#39; object has no attribute &amp;#39;cpus&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=1072704"&gt;opened a bug report&lt;/a&gt; and the fix was &lt;a href="https://git.fedorahosted.org/cgit/virt-manager.git/commit/?id=b078ba8c3d69b62fe748d9182babef8971914277"&gt;committed upstream&lt;/a&gt; today. If you want to make these updates to your Fedora 20 server before the update package is available, just snag the &lt;a href="http://koji.fedoraproject.org/koji/buildinfo?buildID=502966"&gt;three RPM&amp;rsquo;s from koji&lt;/a&gt; and install them:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;mkdir /tmp/virt-manager
cd /tmp/virt-manager
wget http://kojipkgs.fedoraproject.org/packages/virt-manager/1.0.0/4.fc20/noarch/virt-install-1.0.0-4.fc20.noarch.rpm
wget http://kojipkgs.fedoraproject.org/packages/virt-manager/1.0.0/4.fc20/noarch/virt-manager-1.0.0-4.fc20.noarch.rpm
wget http://kojipkgs.fedoraproject.org/packages/virt-manager/1.0.0/4.fc20/noarch/virt-manager-common-1.0.0-4.fc20.noarch.rpm
yum localinstall *.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Thanks to Cole&amp;rsquo;s comment below, you can actually pull in the RPM&amp;rsquo;s using koji directly:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;koji download-build virt-manager-1.0.0-4.fc20
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Installing Xen on Fedora 20</title><link>https://major.io/p/installing-xen-on-fedora-20/</link><pubDate>Fri, 28 Feb 2014 03:43:27 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/installing-xen-on-fedora-20/</guid><description>&lt;p&gt;&lt;a href="https://major.io/wp-content/uploads/2012/06/xen_logo_small.png"&gt;&lt;img src="https://major.io/wp-content/uploads/2012/06/xen_logo_small-300x133.png" alt="Xen Logo" width="300" height="133" class="alignright size-medium wp-image-3397" srcset="https://major.io/wp-content/uploads/2012/06/xen_logo_small-300x133.png 300w, https://major.io/wp-content/uploads/2012/06/xen_logo_small.png 800w" sizes="(max-width: 300px) 100vw, 300px" /&gt;&lt;/a&gt;I&amp;rsquo;ve written about &lt;a href="https://major.io/2013/06/02/installing-the-xen-hypervisor-on-fedora-19/"&gt;installing Xen on Fedora 19&lt;/a&gt; and earlier versions on this blog before. Let&amp;rsquo;s tackle it on Fedora 20.&lt;/p&gt;
&lt;p&gt;Start with the Xen hypervisor and the basic toolset first:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install xen xen-hypervisor xen-libs xen-runtime
systemctl enable xend.service
systemctl enable xendomains.service
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Get GRUB2 in order:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# grep ^menuentry /boot/grub2/grub.cfg | cut -d &amp;#34;&amp;#39;&amp;#34; -f2
Fedora, with Linux 3.13.4-200.fc20.x86_64
Fedora, with Linux 0-rescue-c9dcecb251df472fbc8b4e620a749f6d
Fedora, with Xen hypervisor
# grub2-set-default &amp;#39;Fedora, with Xen hypervisor&amp;#39;
# grub2-editenv list
saved_entry=Fedora, with Xen hypervisor
# grub2-mkconfig -o /boot/grub2/grub.cfg
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now reboot. When the server restarts, verify that Xen is running:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# xm dmesg | head
 __ __ _ _ _____ _ ___ __ ____ ___
 \ \/ /___ _ __ | || | |___ / / | / _ \ / _| ___|___ \ / _ \
 \ // _ \ &amp;#39;_ \ | || |_ |_ \ | |_| (_) || |_ / __| __) | | | |
 / \ __/ | | | |__ _| ___) || |__\__, || _| (__ / __/| |_| |
 /_/\_\___|_| |_| |_|(_)____(_)_| /_(_)_| \___|_____|\___/

(XEN) Xen version 4.3.1 (mockbuild@[unknown]) (gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)) debug=n Thu Feb 6 16:52:58 UTC 2014
(XEN) Latest ChangeSet:
(XEN) Bootloader: GRUB 2.00
(XEN) Command line: placeholder
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As I&amp;rsquo;ve mentioned before, I enjoy using virt-manager to manage my VM&amp;rsquo;s. Let&amp;rsquo;s get started:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install virt-manager dejavu* xorg-x11-xauth
yum -y install libvirt-daemon-driver-network libvirt-daemon-driver-storage libvirt-daemon-xen
systemctl enable libvirtd.service
systemctl start libvirtd.service
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;By this point, you have the Xen hypervisor running and you have VM management tools available from virt-manager and libvirt. Enjoy!&lt;/p&gt;</description></item><item><title>PXE boot Fedora 19 using a Mikrotik firewall</title><link>https://major.io/p/pxe-boot-fedora-19-using-a-mikrotik-firewall/</link><pubDate>Tue, 23 Jul 2013 21:47:33 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/pxe-boot-fedora-19-using-a-mikrotik-firewall/</guid><description>&lt;p&gt;Outside of the RHCA exams, I haven&amp;rsquo;t configured a &lt;a href="http://en.wikipedia.org/wiki/Preboot_Execution_Environment"&gt;PXE&lt;/a&gt; system for my personal needs. A colleague demoed his PXE setup for me and I was hooked. Once I realized how much time I could save when I&amp;rsquo;m building and tearing down virtual machines, it made complete sense. This post will show you how to configure PXE and tftpd in Mikrotik&amp;rsquo;s RouterOS to boot and install Fedora 19 (as well as provide rescue environments).&lt;/p&gt;
&lt;p&gt;The first thing you&amp;rsquo;ll need are a few files from a working Fedora installation. Install the &lt;code&gt;syslinux-tftpboot&lt;/code&gt; package and grab the following files:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/tftpboot/pxelinux.0
/tftpboot/vesamenu.c32
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll also need a &lt;a href="http://mirrors.kernel.org/fedora/releases/19/Fedora/x86_64/os/images/pxeboot/vmlinuz"&gt;vmlinuz&lt;/a&gt; and &lt;a href="http://mirrors.kernel.org/fedora/releases/19/Fedora/x86_64/os/images/pxeboot/initrd.img"&gt;initrd.img&lt;/a&gt; file from your favorite Fedora mirror (use the linked text here for F19 x86_64 or look in the &lt;code&gt;os/images/pxeboot&lt;/code&gt; directory on the mirror for your architecture).&lt;/p&gt;
&lt;p&gt;When you have your four files, create a directory on the Mikrotik via FTP called &lt;strong&gt;tftp&lt;/strong&gt;, and upload those to your Mikrotik. Your directory should look something like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; ls tftp/
-rw-rw---- 1 root root 155792 Jul 23 00:01 vesamenu.c32
-rw-rw---- 1 root root 5055896 Jul 22 23:41 vmlinuz
-rw-rw---- 1 root root 32829968 Jul 22 23:42 initrd.img
-rw-rw---- 1 root root 26460 Jul 22 23:37 pxelinux.0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Within the &lt;strong&gt;tftp&lt;/strong&gt; directory, make a directory called &lt;strong&gt;pxelinux.cfg&lt;/strong&gt;. Add a file called &lt;strong&gt;default&lt;/strong&gt; inside the pxelinux.cfg directory with these contents:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;default vesamenu.c32
prompt 0
timeout 600

display boot.msg

label linux
 menu label ^Install or upgrade an existing system
 kernel vmlinuz
 append initrd=initrd.img repo=http://mirrors.kernel.org/fedora/releases/19/Fedora/x86_64/os/ ks=http://example.com/kickstart.ks ip=eth0:dhcp
label vesa
 menu label Install system with ^basic video driver
 kernel vmlinuz
 append initrd=initrd.img xdriver=vesa nomodeset
label rescue
 menu label ^Rescue installed system
 menu default
 kernel vmlinuz
 append initrd=initrd.img repo=http://mirrors.kernel.org/fedora/releases/19/Fedora/x86_64/os/ rescue ip=eth0:dhcp
label local
 menu label Boot from ^local drive
 localboot 0xffff
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Be sure to adjust the &lt;code&gt;ip=&lt;/code&gt; &lt;code&gt;and&lt;/code&gt; &lt;code&gt;repo=&lt;/code&gt; arguments to fit your server. Keep in mind that from Fedora 17 on, you&amp;rsquo;ll need to use the &lt;a href="https://fedoraproject.org/wiki/Dracut/Options#Network"&gt;dracut syntax&lt;/a&gt; for anaconda boot options. Once that&amp;rsquo;s done, you&amp;rsquo;re ready to configure the Mikrotik firewall, so get logged into the firewall over ssh.&lt;/p&gt;
&lt;p&gt;We need to set some network options for our Mikrotik&amp;rsquo;s DHCP server:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/ip dhcp-server network
set 0 boot-file-name=pxelinux.0 next-server=192.168.25.1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The value for &lt;code&gt;next-server=&lt;/code&gt; should be the gateway address for your internal network (the Mikrotik&amp;rsquo;s internal IP).&lt;/p&gt;
&lt;p&gt;Next, we need to configure the tftp server so that it serves up files to our internal network:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/ip tftp
add ip-addresses=192.168.25.0/24 real-filename=tftp/pxelinux.0 req-filename=pxelinux.0
add ip-addresses=192.168.25.0/24 real-filename=tftp/pxelinux.cfg/default req-filename=pxelinux.cfg/default
add ip-addresses=192.168.25.0/24 real-filename=tftp/vmlinuz req-filename=vmlinuz
add ip-addresses=192.168.25.0/24 real-filename=tftp/vesamenu.c32 req-filename=vesamenu.c32
add ip-addresses=192.168.25.0/24 real-filename=tftp/initrd.img req-filename=initrd.img
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now it&amp;rsquo;s time to test it! If you&amp;rsquo;re using a physical machine, double check your BIOS to verify that PXE boot is enabled for your ethernet interface. Most modern chipsets have support for it, but be sure to check that it&amp;rsquo;s enabled. You may have to reboot after enabling it in the BIOS for the ethernet BIOS to be included.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re using a virtual machine, just start up virt-manager and choose &lt;em&gt;Network Boot (PXE)&lt;/em&gt; from the installation options:&lt;/p&gt;
&lt;p&gt;&lt;img alt="6" loading="lazy" src="https://major.io/wp-content/uploads/2013/07/virt-manager-pxe.png"&gt;&lt;/p&gt;
&lt;p&gt;Once the VM boots, you&amp;rsquo;ll be sent straight to the PXE boot screen:&lt;/p&gt;
&lt;p&gt;&lt;img alt="7" loading="lazy" src="https://major.io/wp-content/uploads/2013/07/pxetest-Virtual-Machine.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TAKE NOTE!&lt;/strong&gt; In the pxelinux.cfg/default file, I set rescue mode to boot as the default option. This will prevent a situation where you forget to remove PXE from a system&amp;rsquo;s boot order and accidentally re-kickstart over the live system.&lt;/p&gt;
&lt;p&gt;The installer should now boot up normally and you can install your Fedora system via kickstart or via the anaconda interface.&lt;/p&gt;</description></item><item><title>Boot VM’s with virt-manager and libvirt with ISO’s stored remotely via samba/cifs</title><link>https://major.io/p/boot-vms-with-virt-manager-and-libvirt-with-isos-stored-remotely-via-sambacifs/</link><pubDate>Sun, 07 Jul 2013 01:51:10 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/boot-vms-with-virt-manager-and-libvirt-with-isos-stored-remotely-via-sambacifs/</guid><description>&lt;p&gt;&lt;img alt="1" loading="lazy" src="https://major.io/wp-content/uploads/2013/07/qnap.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Pairing &lt;a href="http://virt-manager.org/"&gt;virt-manager&lt;/a&gt; with KVM makes booting new VM&amp;rsquo;s pretty darned easy. I have a &lt;a href="http://www.qnap.com/en/?lang=en&amp;amp;sn=822&amp;amp;c=1655&amp;amp;sc=1656&amp;amp;t=1660&amp;amp;n=6703"&gt;QNAP NAS&lt;/a&gt; at home with a bunch of ISO&amp;rsquo;s stored in share available to guests and I wanted to use that with libvirt to boot new VM&amp;rsquo;s. (By the way, if you&amp;rsquo;re looking for an off-the-shelf NAS that is built with solid hardware and pretty reliable software, try one of the QNAP devices. You still get access to many of the usual commands that you would normally find on a Linux box for emergencies. More on that in a later post.)&lt;/p&gt;
&lt;p&gt;The first step was creating a mountpoint and configuring the mount in /etc/fstab:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# mkdir /mnt/iso
# grep qemu /etc/passwd
qemu❌107:107:qemu user:/:/sbin/nologin
# echo &amp;#34;//qnap/ISO /mnt/iso cifs _netdev,guest,uid=107,gid=107,defaults 0 0&amp;#34; &amp;gt;&amp;gt; /etc/fstab
# mount /mnt/iso
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;My QNAP is already in /etc/hosts so I didn&amp;rsquo;t need to specify the IP in the file. Adding &lt;code&gt;_netdev&lt;/code&gt; ensures that the network will be up before the mount is made. The &lt;code&gt;guest&lt;/code&gt; option ensures that I won&amp;rsquo;t be prompted for credentials and the &lt;code&gt;uid=107,gid=107&lt;/code&gt; mounts the share as the qemu user. If you forget this, virt-manager will throw some ugly permissions errors from libvirt.&lt;/p&gt;
&lt;p&gt;From there, I had another permissions error and I suspected that SELinux was preventing libvirt from accessing the files in the share. A quick check of /var/log/messages revealed that I was right:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Jul 6 16:12:51 nuc1 setroubleshoot: SELinux is preventing /usr/bin/qemu-system-x86_64 from open access on the file /mnt/iso/livecd.iso. For complete SELinux messages. run sealert -l c1c80b2c-b5df-4114-86c7-ffee98274552
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here&amp;rsquo;s the output from sealert:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# sealert -l c1c80b2c-b5df-4114-86c7-ffee98274552
SELinux is preventing /usr/bin/qemu-system-x86_64 from open access on the file /mnt/iso/livecd.iso.

***** Plugin catchall_boolean (89.3 confidence) suggests *******************

If you want to allow virt to use samba
Then you must tell SELinux about this by enabling the &amp;#39;virt_use_samba&amp;#39; boolean.
You can read &amp;#39;None&amp;#39; man page for more details.
Do
setsebool -P virt_use_samba 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The fix is a quick one:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# setsebool -P virt_use_samba 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You should be all set after that. Press “Browse Local” in virt-manager when you look for your ISO to boot the virtual machine and navigate over to /mnt/iso for your list of ISO&amp;rsquo;s.&lt;/p&gt;</description></item><item><title>Installing the Xen hypervisor on Fedora 19</title><link>https://major.io/p/installing-the-xen-hypervisor-on-fedora-19/</link><pubDate>Mon, 03 Jun 2013 04:27:43 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/installing-the-xen-hypervisor-on-fedora-19/</guid><description>&lt;p&gt;It&amp;rsquo;s been a little while &lt;a href="https://major.io/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/"&gt;since I last posted about installing Xen on Fedora&lt;/a&gt;, so I figured that Fedora 19&amp;rsquo;s beta release was as good a time as any to write a new post. To get started, you&amp;rsquo;ll need to get Fedora 19 installed on your favorite hardware (or virtual machine).&lt;/p&gt;
&lt;p&gt;Install the Xen hypervisor and tools. Also, ensure that both of the necessary daemons are running on each boot:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install xen xen-hypervisor xen-libs xen-runtime
chkconfig xend on
chkconfig xendomains on
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll notice that I didn&amp;rsquo;t start the daemons quite yet. We will need the xen hypervisor running before they will be of any use.&lt;/p&gt;
&lt;p&gt;Now, let&amp;rsquo;s configure GRUB2. I wrote a &lt;a href="https://major.io/2012/07/16/boot-the-xen-hypervisor-by-default-in-fedora-17-with-grub-2/"&gt;quick post about these steps&lt;/a&gt; last year. The Xen kernel entry should already be configured (by grubby), but it&amp;rsquo;s not the default. Fixing that is a quick process:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# grep ^menuentry /boot/grub2/grub.cfg | cut -d &amp;#34;&amp;#39;&amp;#34; -f2
Fedora, with Linux 3.9.4-300.fc19.x86_64
Fedora, with Linux 0-rescue-4ea51ecfff4f4e64a5ec903c495ee5b6
Fedora, with Xen hypervisor
# grub2-set-default &amp;#39;Fedora, with Xen hypervisor&amp;#39;
# grub2-editenv list
saved_entry=Fedora, with Xen hypervisor
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, you&amp;rsquo;re ready to reboot. After the reboot, verify that Xen is running:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# xm dmesg | head
 __ __ _ _ ____ ____ ____ __ _ ___
 \ \/ /___ _ __ | || | |___ \ |___ \ | ___| / _| ___/ |/ _ \
 \ // _ \ &amp;#39;_ \ | || |_ __) | __) |_|___ \ | |_ / __| | (_) |
 / \ __/ | | | |__ _| / __/ _ / __/|__|__) || _| (__| |\__, |
 /_/\_\___|_| |_| |_|(_)_____(_)_____| |____(_)_| \___|_| /_/

(XEN) Xen version 4.2.2 (mockbuild@phx2.fedoraproject.org) (gcc (GCC) 4.8.0 20130412 (Red Hat 4.8.0-2)) Fri May 17 19:39:53 UTC 2013
(XEN) Latest ChangeSet: unavailable
(XEN) Bootloader: GRUB 2.00
(XEN) Command line: placeholder
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you&amp;rsquo;re adventurous on the command line, you&amp;rsquo;re done here. However, I enjoy using virt-manager for quick access to virtual machines and I also like all of the scripting and remote administration capabilities that libvirt delivers. Let&amp;rsquo;s get the tools and daemons installed and running:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install virt-manager dejavu* xorg-x11-xauth
yum -y install libvirt-daemon-driver-network libvirt-daemon-driver-storage libvirt-daemon-xen
chkconfig libvirtd on
service libvirtd start
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;re now ready to use virt-manager to manage your virtual machines. Simply ssh to your hypervisor with X forwarding enabled (&lt;code&gt;ssh -X hypervisor.mydomain.com&lt;/code&gt;) and run &lt;code&gt;virt-manager&lt;/code&gt;. You won&amp;rsquo;t have a virtual network or bridge to use for virtual machines quite yet. You have two options: NAT your VM&amp;rsquo;s or configure a network bridge. I prefer the bridge but you may require something different in your environment.&lt;/p&gt;
&lt;p&gt;For the NAT option (the easiest for beginners):&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install libvirt-daemon-config-network libvirt-daemon-config-nwfilter
service libvirtd restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For the network-bridge option, you&amp;rsquo;ll need to adjust your network scripts to create a bridge and add your primary network interface to the bridge. That&amp;rsquo;s a bit outside the scope of this post, but the &lt;a href="http://fedoraproject.org/wiki/Networking/Bridging"&gt;Fedora Wiki&lt;/a&gt; and &lt;a href="http://www.howtoforge.com/virtualization-with-kvm-on-a-fedora-17-server"&gt;HowtoForge&lt;/a&gt; (ignore the KVM parts of their guide).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You now have a working Xen installation on Fedora 19!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong style="color: #D42020;"&gt;FOR THOSE WHO EMBRACE SECURITY:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you run SELinux in Enforcing mode, there&amp;rsquo;s still a lingering issue where SELinux prevents python (running under xend) from talking to block devices (like logical volumes). I &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=839287"&gt;opened a bug&lt;/a&gt; about a similar problem before but I need to open another one for the block device issue. If you&amp;rsquo;re itching for a workaround, you can force SELinux into permissive mode for the xend_t context only:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum -y install selinux-policy-devel
semanage permissive -a xend_t
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s not the best option for now, but it&amp;rsquo;s certainly better than &lt;code&gt;setenforce 0&lt;/code&gt;. ;)&lt;/p&gt;</description></item><item><title>Migrate KVM virtual machines from CentOS 6 to Fedora 18 without the luxury of shared storage</title><link>https://major.io/p/migrate-kvm-virtual-machines-from-centos-6-to-fedora-18-without-the-luxury-of-shared-storage/</link><pubDate>Wed, 22 May 2013 15:15:36 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/migrate-kvm-virtual-machines-from-centos-6-to-fedora-18-without-the-luxury-of-shared-storage/</guid><description>&lt;p&gt;I&amp;rsquo;ve converted one of my KVM hypervisors from CentOS 6 to Fedora 18 and now comes the task of migrating my virtual machines off of my single remaining CentOS 6 hypervisor. This is definitely on a budget, so there&amp;rsquo;s no shared storage to make this process easier.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how I did it:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Migrate the logical volume&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;My first VM to migrate is my Fedora development VM where I build and test new packages. I have a 10G logical volume on the old node:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@helium ~]# lvs /dev/mapper/vg_helium-fedora--dev
 LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
 fedora-dev vg_helium -wi-a--- 10.00g
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I made a 10G logical volume on the new hypervisor:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@hydrogen ~]# lvcreate -n fedora-dev -L10G vg_hydrogen
 Logical volume &amp;#34;fedora-dev&amp;#34; created
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After getting ssh keys set up between both hypervisors and installing &lt;a href="http://linux.die.net/man/1/pv"&gt;&lt;code&gt;pv&lt;/code&gt;&lt;/a&gt; (to track progress), I started the storage migration over ssh:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;dd if=/dev/mapper/vg_helium-fedora--dev | pv | ssh hydrogen dd of=/dev/mapper/vg_hydrogen-fedora--dev
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Luckily it was only a 10GB logical volume so it transferred over in a few minutes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dump and adjust the source VM&amp;rsquo;s XML&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On the source server, I dumped the VM configuration to an XML file and copied it to the new host:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virsh dumpxml fedora-dev &amp;gt; fedora-dev.xml
scp fedora-dev.xml hydrogen:
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Before importing the XML file on the new host, there are some adjustments that need to be made. First off was an adjustment of the storage volume since the new host had the same logical volume name but a different volume group (the source line):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;disk&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;block&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;device=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;disk&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;driver&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;qemu&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;raw&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;cache=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;none&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;io=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;native&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/driver&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;dev=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;/dev/vg_hydrogen/fedora-dev&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;target&lt;/span&gt; &lt;span class="na"&gt;dev=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;vda&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;bus=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;virtio&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/target&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;address&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;pci&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;domain=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0x0000&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;bus=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0x00&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;slot=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0x05&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;function=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0x0&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/address&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/disk&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Also, there&amp;rsquo;s a mismatch with the machine type (not architecture) between CentOS 6 and Fedora 18. I dumped the XML from a VM running on the Fedora 18 hypervisor and compared the machine type to my old CentOS VM&amp;rsquo;s XML (the XML from the CentOS VM is on top):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gd"&gt;- &amp;lt;type arch=&amp;#39;x86_64&amp;#39; machine=&amp;#39;rhel6.3.0&amp;#39;&amp;gt;hvm&amp;lt;/type&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+ &amp;lt;type arch=&amp;#39;x86_64&amp;#39; machine=&amp;#39;pc-1.2&amp;#39;&amp;gt;hvm&amp;lt;/type&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I replaced &lt;code&gt;rhel6.3.0&lt;/code&gt; with &lt;code&gt;pc-1.2&lt;/code&gt;. &lt;em&gt;If you forget this step, your VM won&amp;rsquo;t start.&lt;/em&gt; You&amp;rsquo;ll get some errors about a mismatched machine type before the VM boots.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s one last fix: the path to the &lt;code&gt;qemu-kvm&lt;/code&gt; emulator:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gd"&gt;- &amp;lt;emulator&amp;gt;/usr/libexec/qemu-kvm&amp;lt;/emulator&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+ &amp;lt;emulator&amp;gt;/usr/bin/qemu-kvm&amp;lt;/emulator&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;/usr/libexec/qemu-kvm&lt;/code&gt; with &lt;code&gt;/usr/bin/qemu-kvm&lt;/code&gt; and save your XML file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Import the VM configuration and launch the VM&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Importing the VM on the Fedora 18 hypervisor was easy:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virsh define fedora-dev.xml
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That causes the configuration to load into libvirt and it should appear in &lt;code&gt;virt-manager&lt;/code&gt; or &lt;code&gt;virsh list&lt;/code&gt; by this point. If not, double check your previous steps and look for error messages in your logs. That doesn&amp;rsquo;t actually start the virtual machine, so I started it on the command line:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;virsh start fedora-dev
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Within a few moments, the VM was up and responding to pings.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a good idea to hop into &lt;code&gt;virt-manager&lt;/code&gt; and verify that the VM configuration is what you expect. Some configuration options don&amp;rsquo;t line up terribly well between CentOS 6 and Fedora 18. You might need to adjust a few to match the performance you expect to see.&lt;/p&gt;</description></item><item><title>Changing your ssh server’s port from the default: Is it worth it?</title><link>https://major.io/p/changing-your-ssh-servers-port-from-the-default-is-it-worth-it/</link><pubDate>Wed, 15 May 2013 04:43:41 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/changing-your-ssh-servers-port-from-the-default-is-it-worth-it/</guid><description>&lt;p&gt;Changing my ssh port from the default port (22) has been one of my standard processes for quite some time when I build new servers or virtual machines. However, I see arguments crop up regularly about it (like &lt;a href="http://redd.it/1ebe0d"&gt;this reddit thread&lt;/a&gt; or &lt;a href="http://redd.it/fnz1h"&gt;this other one&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Before I go any further, let&amp;rsquo;s settle the &amp;ldquo;security through obscurity&amp;rdquo; argument. &lt;em&gt;(This could probably turn into its own post but I&amp;rsquo;ll be brief for now.)&lt;/em&gt; Security should always be applied in layers. This provides multiple levels of protection from initial attacks, like information gathering attempts or casual threats against known vulnerabilities. In addition, these layers of security should be applied &lt;strong&gt;within&lt;/strong&gt; the environment so that breaking into one server after getting a pivot point in the environment should be just as difficult (if not more difficult) than the original attack that created the pivot point. If &amp;ldquo;security through obscurity&amp;rdquo; tactics make up &lt;em&gt;one layer&lt;/em&gt; of a &lt;em&gt;multi-layered solution&lt;/em&gt;, I&amp;rsquo;d encourage you to obscure your environment as long as it doesn&amp;rsquo;t &lt;a href="http://security.blogoverflow.com/2012/08/confidentiality-integrity-availability-the-three-components-of-the-cia-triad/"&gt;affect your availability&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The key takeaway is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Security through obscurity is effective if it&amp;rsquo;s one layer in a multi-layer security solution&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let&amp;rsquo;s get back to the original purpose of the post.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The biggest benefit to changing the port is to avoid being seen by casual scans.&lt;/strong&gt; The vast majority of people hunting for any open ssh servers will look for port 22. Some will try the usual variants, like 222 and 2222, but those are few and far between. I ran an experiment with a virtual machine exposed to the internet which had sshd listening on port 22. The server stayed online for one week and then I changed the ssh port to 222. &lt;strong&gt;The number of attacks dropped by 98%.&lt;/strong&gt; Even though this is solely empirical evidence, it&amp;rsquo;s clear that moving off the standard ssh port reduces your server&amp;rsquo;s profile.&lt;/p&gt;
&lt;p&gt;If it&amp;rsquo;s more difficult to scan for your ssh server, your chances of being attacked with an ssh server exploit are reduced. A determined attacker can still find the port if they know your server&amp;rsquo;s IP address via another means (perhaps via a website you host) and they can launch attacks once they find it. Paranoid server administrators might want to check into &lt;a href="https://wiki.archlinux.org/index.php/Port_Knocking"&gt;port knocking&lt;/a&gt; to reduce that probability even further.&lt;/p&gt;
&lt;p&gt;Remembering the non-standard ssh port can be annoying, but if you have a standard set of workstations that you use for access your servers, just utilize your &lt;code&gt;~/.ssh/config&lt;/code&gt; file to specify certain ports for certain servers. For example:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Host *.mycompany.com
 Port 4321

Host nonstandard.mypersonalstuff.com
 Port 2345

Host *.mypersonalstuff.com
 Port 5432
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you run into SELinux problems with a non-standard ssh port, there are &lt;a href="https://major.io/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/"&gt;plenty of guides on this topic.&lt;/a&gt;. The &lt;code&gt;setroubleshoot-server&lt;/code&gt; package helps out with this as well.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# semanage port -a -t ssh_port_t -p tcp 4321
# semanage port -l | grep ssh
ssh_port_t tcp 4321,22
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here is my list of ssh lockdown practices when I build a new server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update the ssh server package and ensure that automatic updates are configured&lt;/li&gt;
&lt;li&gt;Enable SELinux and allow a non-standard ssh port&lt;/li&gt;
&lt;li&gt;Add my ssh public key to the server&lt;/li&gt;
&lt;li&gt;Disable password logins for ssh&lt;/li&gt;
&lt;li&gt;Adjust my &lt;code&gt;AllowUsers&lt;/code&gt; setting in sshd_config to only allow my user&lt;/li&gt;
&lt;li&gt;Disable root logins&lt;/li&gt;
&lt;li&gt;For servers with sensitive data, I install &lt;a href="http://www.fail2ban.org/"&gt;fail2ban&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>virt-manager won’t release the mouse when using ssh forwarding from OS X</title><link>https://major.io/p/virt-manager-wont-release-the-mouse-when-using-ssh-forwarding-from-os-x/</link><pubDate>Wed, 20 Mar 2013 05:26:56 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/virt-manager-wont-release-the-mouse-when-using-ssh-forwarding-from-os-x/</guid><description>&lt;p&gt;The latest versions of &lt;a href="http://virt-manager.org/"&gt;virt-manager&lt;/a&gt; don&amp;rsquo;t release the mouse pointer when you&amp;rsquo;re doing X forwarding to a machine running OS X. This can lead to a rather frustrating user experience since your mouse pointer is totally stuck in the window. Although this didn&amp;rsquo;t affect me with CentOS 6 hosts, Fedora 18 hosts were a problem.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a &lt;a href="http://blog.loftninjas.org/2010/11/17/virt-manager-keymaps-on-os-x/"&gt;relatively elegant fix from btm.geek&lt;/a&gt; that solved it for me. On your Mac, exit X11/Xquartz and create an &lt;code&gt;~/.Xmodmap&lt;/code&gt; file containing this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;clear Mod1
keycode 66 = Alt_L
keycode 69 = Alt_R
add Mod1 = Alt_L
add Mod1 = Alt_R
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start X11/Xquartz once more and virt-manager should release your mouse pointer if you hold the left control key and left option at the same time.&lt;/p&gt;</description></item><item><title>Late night virtualization frustration with kvm</title><link>https://major.io/p/late-night-virtualization-frustration-with-kvm/</link><pubDate>Wed, 20 Mar 2013 05:07:21 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/late-night-virtualization-frustration-with-kvm/</guid><description>&lt;p&gt;I dragged out an old &lt;a href="http://global.aopen.com/products_detail.aspx?Auno=3047"&gt;Aopen MP57-D&lt;/a&gt; tonight that was just sitting in the closet and decided to load up kvm on Fedora 18. I soon found myself staring at a very brief error message upon bootup:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;kvm: disabled by bios
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After a reboot, the BIOS screen was up and I saw that Virtualization and VT-d were both enabled. Trusted execution (TXT) was disabled, so I enabled it for kicks and rebooted. Now I had two errors:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;kvm: disable TXT in the BIOS or activate TXT before enabling KVM
kvm: disabled by bios
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Time for another trip to the BIOS. I disabled TXT, rebooted, and I was &lt;em&gt;back to the same error where I first started&lt;/em&gt;. A quick check of &lt;code&gt;/proc/cpuinfo&lt;/code&gt; showed that I had the right processor extensions. Even the output of &lt;code&gt;lshw&lt;/code&gt; showed that I should be ready to go. Some digging in Google led me to a &lt;a href="http://reidablog.blogspot.com/2008/06/with-correct-bios-settings-enabled-on.html"&gt;blog post for a fix on Dell Optiplex hardware&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The fix was to do this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Within the BIOS, &lt;strong&gt;disable&lt;/strong&gt; virtualization, VT-d, and TXT&lt;/li&gt;
&lt;li&gt;Save the BIOS configuration, reboot, and &lt;strong&gt;pull power to the computer at grub&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Within the BIOS, &lt;strong&gt;enable&lt;/strong&gt; virtualization and VT-d but leave TXT disabled&lt;/li&gt;
&lt;li&gt;Save the BIOS configuration, reboot, and &lt;strong&gt;pull power to the computer at grub&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Boot up the computer normally&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Although it seems a bit archaic, this actually fixed my problem and set me on my way.&lt;/p&gt;</description></item><item><title>SELinux, Xen, and block devices in Fedora 17</title><link>https://major.io/p/selinux-xen-and-block-devices-in-fedora-17/</link><pubDate>Tue, 10 Jul 2012 05:05:33 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/selinux-xen-and-block-devices-in-fedora-17/</guid><description>&lt;p&gt;If you try to run Xen without libvirt on Fedora 17 with SELinux in enforcing mode, you&amp;rsquo;ll be butting heads with SELinux in no time. You&amp;rsquo;ll probably be staring at something like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# xm create -c fedora17
Using config file &amp;#34;/etc/xen/fedora17&amp;#34;.
Error: Disk isn&amp;#39;t accessible
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you have &lt;code&gt;setroubleshoot&lt;/code&gt; and &lt;code&gt;setroubleshoot-server&lt;/code&gt; installed, you should have a friendly message in /var/log/messages telling you the source of the problem:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;setroubleshoot: SELinux is preventing /usr/bin/python2.7 from read access on the blk_file dm-1.
For complete SELinux messages. run sealert -l 4d890105-d9a4-4b3e-a674-ba7e952942dc
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The Xen daemon (the python process mentioned in the SELinux denial) is running with a context type of &lt;code&gt;xend_t&lt;/code&gt; but the block device I&amp;rsquo;m trying to use for the VM has &lt;code&gt;fixed_disk_device_t&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# ps axZ | grep xend
system_u:system_r:xend_t:s0 953 ? SLl 0:40 /usr/bin/python /usr/sbin/xend
# ls -alZ /dev/dm-1
brw-rw----. root disk system_u:object_r:fixed_disk_device_t:s0 /dev/dm-1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;SELinux isn&amp;rsquo;t going to allow this to work. However, even if we fix this, SELinux will balk about three additional issues and we&amp;rsquo;ll need to adjust the contexts on every new fixed block device we make. To get over the hump, change the context type on your block device to &lt;code&gt;xen_image_t&lt;/code&gt; and re-run the &lt;code&gt;xm create&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# chcon -t xen_image_t /dev/dm-1
# ls -alZ /dev/dm-1
brw-rw----. root disk system_u:object_r:xen_image_t:s0 /dev/dm-1
# xm create -c fedora17
Using config file &amp;#34;/etc/xen/fedora17&amp;#34;.
Error: out of pty devices
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;ll find three new denials in /var/log/messages:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;setroubleshoot: SELinux is preventing /usr/bin/python2.7 from read access on the file group.
For complete SELinux messages. run sealert -l b1392df4-dda4-4b82-914c-1e20c62fc898
setroubleshoot: SELinux is preventing /usr/bin/python2.7 from setattr access on the chr_file 1.
For complete SELinux messages. run sealert -l 3e09edc3-aeb7-49f5-96e1-d8148afda48f
setroubleshoot: SELinux is preventing /usr/bin/python2.7 from execute access on the file pt_chown.
For complete SELinux messages. run sealert -l 86395f09-5f33-4f66-8d02-519b61e54139
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As much as it pains me to suggest it, you can create a custom module to allow all four of these operations by xend:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# grep xend /var/log/audit/audit.log | audit2allow -M custom_xen
WARNING: Policy would be downgraded from version 27 to 26.
******************** IMPORTANT ***********************
To make this policy package active, execute:

semodule -i custom_xen.pp

# semodule -i custom_xen.pp
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You should now be able to start your VM without any complaints from SELinux. I&amp;rsquo;ll reiterate that this isn&amp;rsquo;t ideal, but it&amp;rsquo;s the best balance of security and convenience that I&amp;rsquo;ve found so far.&lt;/p&gt;</description></item><item><title>Installing XenServer 6.0.2 on an AOpen MP57</title><link>https://major.io/p/installing-xenserver-6-0-2-on-an-aopen-mp57/</link><pubDate>Mon, 12 Mar 2012 17:00:56 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/installing-xenserver-6-0-2-on-an-aopen-mp57/</guid><description>&lt;p&gt;&lt;a href="https://major.io/wp-content/uploads/2012/03/BBM-APN-MP57D.jpg"&gt;&lt;img src="https://major.io/wp-content/uploads/2012/03/BBM-APN-MP57D.jpg" alt="AOpen MP57" title="AOpen MP57" width="200" height="200" class="alignright size-full wp-image-3165" srcset="https://major.io/wp-content/uploads/2012/03/BBM-APN-MP57D.jpg 300w, https://major.io/wp-content/uploads/2012/03/BBM-APN-MP57D-150x150.jpg 150w" sizes="(max-width: 200px) 100vw, 200px" /&gt;&lt;/a&gt;Getting XenServer installed on some unusual platforms takes a bit of work and the &lt;a href="http://global.aopen.com/products_detail.aspx?Auno=3047"&gt;AOpen MP57&lt;/a&gt; is a challenging platform for a XenServer 6.0.2 installation.&lt;/p&gt;
&lt;p&gt;My MP57 box came with the i57QMx-vP motherboard. If yours came with something else, this post may or may not work for you.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll need the &lt;a href="https://www.citrix.com/lang/English/lp/lp_1688615.asp"&gt;XenServer 6 installation ISO&lt;/a&gt; burned to a CD to get started. Boot the CD in your MP57 and wait for the initial boot screen to appear. Type &lt;strong&gt;safe&lt;/strong&gt; at the prompt and press enter. Go through the normal installation steps and reboot.&lt;/p&gt;
&lt;p&gt;After the reboot, you&amp;rsquo;ll notice that there&amp;rsquo;s no video output for dom0. Hop on another nearby computer and ssh to your XenServer installation using the root user and the password that you set during the installation process. Open up &lt;code&gt;/boot/extlinux.conf&lt;/code&gt; in your favorite text editor and make sure the &lt;code&gt;label xe&lt;/code&gt; section looks like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;label xe
 # XenServer
 kernel mboot.c32
 append /boot/xen.gz mem=1024G dom0_max_vcpus=4 dom0_mem=752M lowmem_emergency_pool=1M crashkernel=64M@32M acpi=off console=vga --- /boot/vmlinuz-2.6-xen root=LABEL=root-aouozuoo ro xencons=hvc console=hvc0 console=tty0 vga=785 --- /boot/initrd-2.6-xen.img
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;console=vga&lt;/code&gt; adjustment ensures that the dom0 console is piped to the vga output and &lt;code&gt;acpi=off&lt;/code&gt; fixes the lockup that will occur when the vga output is sent to your display. I also removed &lt;code&gt;splash&lt;/code&gt; and &lt;code&gt;quiet&lt;/code&gt; from the kernel line so that I could see all of the boot messages in detail.&lt;/p&gt;</description></item><item><title>Preparing for Red Hat Exams</title><link>https://major.io/p/preparing-for-red-hat-exams/</link><pubDate>Tue, 28 Feb 2012 21:35:28 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/preparing-for-red-hat-exams/</guid><description>&lt;p&gt;&lt;em style="color: grey;"&gt;I originally wrote this post for the &lt;a href="http://www.rackspace.com/blog/preparing-for-red-hat-exams/"&gt;Rackspace Blog&lt;/a&gt; but I&amp;rsquo;ve posted it here just in case anyone following my blog&amp;rsquo;s feed finds it useful. Feel free to share your feedback!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Getting yourself ready for any type of examination is usually a stressful experience that involves procrastination and some late nights leading up to the test. Every time I take one, I always say to myself, “I’m really going to get ahead of this next time and study early. This last minute stuff is terrible.” But I always forget all of this as the next exam rolls around.&lt;/p&gt;
&lt;p&gt;Quick note: As you read through the remainder of the post, you may wonder why some of it is a bit vague. Every Red Hat test taker is under a NDA to prevent disclosure of test information that may reduce the security of the exam itself. Penalties start with losing credit for the exams previously taken and they can escalate up to legal action. I hope you’ll understand why I’m not able to go into details about certain portions of the Red Hat examinations.&lt;/p&gt;
&lt;p&gt;I’ve taken seven Red Hat exams already: two for the RHCE and five for the RHCA. These tests certainly aren’t easy, but there are some good guidelines and tips you can use to make your studying efforts less stressful and more productive. Without further ado, here are my recommendations for prospective Red Hat examinees:&lt;/p&gt;
&lt;h4 id="build-a-flexible-study-environment"&gt;Build a flexible study environment&lt;/h4&gt;
&lt;p&gt;This is critical. You’ll need some spare servers or some available virtual machines to practice the objectives on each exam. However, don’t feel like you need to spend the money on a Red Hat subscription to get your studying done. Most of the test objectives on the majority of exams can be completed with very similar Linux distributions, like Scientific Linux or CentOS. Look for a version of the distribution that is closest to what you’ll be tested on at exam time. Your study environment should meet some basic criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You should be able to quickly build and tear down servers or virtual machines&lt;/li&gt;
&lt;li&gt;Keep the latency to your environment low to avoid getting frustrated&lt;/li&gt;
&lt;li&gt;Use applications like VirtualBox, VMWare Fusion/Workstation to practice on your own computer&lt;/li&gt;
&lt;li&gt;Consider using VMs from cloud providers if you’re under a time crunch&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some exams may require some bare-metal access to the server itself (especially &lt;a href="https://www.redhat.com/courses/ex442_red_hat_enterprise_system_monitoring_and_performance_tuning_expertise_exam/"&gt;EX442&lt;/a&gt;), so keep that in mind when you’re looking for a good practice environment. You may need some specific network or storage setups for some exams (as with &lt;a href="https://www.redhat.com/courses/ex436_red_hat_enterprise_clustering_and_storage_management_expertise_exam/"&gt;EX436&lt;/a&gt;). If you’re not sure what you need, be sure to ask your instructor or someone else you know who has taken the exam already.&lt;/p&gt;
&lt;h4 id="prioritize-doing-over-reading"&gt;Prioritize doing over reading&lt;/h4&gt;
&lt;p&gt;The Red Hat exams are all hands-on, practical exams. You won’t find any essays or multiple-choice questions in these exams. Although the materials from Red Hat are full of good information, reading this information can only get you so far. You need to practice setting up the services on your own to be fully prepared for the test. If you’re not pressed for time, reading through the book can give you some details about the lab sequences, which you might miss by solely reading through labs themselves.&lt;/p&gt;
&lt;h4 id="research-the-why-not-the-what-to-remember"&gt;Research the why, not the what, to remember&lt;/h4&gt;
&lt;p&gt;This is especially important for the RHCA exam track. You may find that there is a ton of material to cover for the exam and that it’s difficult to remember each command to bring a certain service online or to repair a problem. Instead of thinking through the problem as “first, I do this, then I do this”, try to understand why each step is important in the first place.&lt;/p&gt;
&lt;p&gt;Here’s a good example. I’ll be the first one to admit that Kerberos drives me crazy. I’ve even &lt;a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/"&gt;written posts&lt;/a&gt; about it. The commands seemed really archaic, the daemons didn’t make sense, and the lack of readline support in the Kerberos tools made me want to throw my computer out the window (come on, MIT!). I put my class materials aside, went to Google in a browser, and started researching Kerberos.&lt;/p&gt;
&lt;p&gt;I read some of MIT’s documentation, ventured over to Wikipedia, and poked at some of the documentation within the Kerberos RPM packages. After a while, I began to realize how it all fit together. “Okay,” I thought to myself, “I need principals in a keytab to do these things, but I need to have a database for the admin stuff first.” Suddenly, the order of things in my head wasn’t just memorized any longer. The process of operations seemed to make logical sense because I fully understood how the pieces of a Kerberos infrastructure fit together.&lt;/p&gt;
&lt;p&gt;If you start to get discouraged, take a break and learn more about why you’re doing what you’re doing. Once it becomes second nature, working through the problems on the exam becomes much easier.&lt;/p&gt;
&lt;h4 id="lean-on-your-available-resources"&gt;Lean on your available resources&lt;/h4&gt;
&lt;p&gt;Don’t forget that there are other knowledgeable folks available to talk to when you get bogged down. Lean on other RHCE’s, RHCA’s, or experienced Linux users to get the answers or explanations you need. If you already have a Red Hat certification, head over to the &lt;a href="https://certforums.redhat.com/login.php"&gt;Red Hat Certification Forums&lt;/a&gt; and meet up with other examinees that are discussing test preparation.&lt;/p&gt;
&lt;p&gt;Also, you’ll find some knowledgeable (but sometimes snarky or quirky) people on IRC who are eager to point you in the right direction. Try the #rhel, #centos, or #fedora channels if you’re struggling through the configuration of a certain service. Many Linux users may roll their eyes about it, but Twitter is also a pretty good way to reach out to people who have a lot of Linux experience.&lt;/p&gt;
&lt;h4 id="summary"&gt;Summary&lt;/h4&gt;
&lt;p&gt;Remember to lean on the knowledge of others, get hands-on with the test objectives and do your research when you’re frustrated. The exams from Red Hat are generally difficult and cover a lot of material, but with the right amount of preparation and determination you can pass the exams and get the certifications you want.&lt;/p&gt;</description></item><item><title>Xen 4.1 on Fedora 15 with Linux 3.0</title><link>https://major.io/p/xen-4-1-on-fedora-15-with-linux-3-0/</link><pubDate>Sat, 06 Aug 2011 04:34:06 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/xen-4-1-on-fedora-15-with-linux-3-0/</guid><description>&lt;p&gt;If you haven&amp;rsquo;t noticed already, &lt;a href="http://blog.xen.org/index.php/2011/06/02/xen-celebrates-full-dom0-and-domu-support-in-linux-3-0/"&gt;full Xen dom0 support&lt;/a&gt; was added in the &lt;a href="http://kernelnewbies.org/Linux_3.0"&gt;Linux 3.0 kernel&lt;/a&gt;. This means there&amp;rsquo;s no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for &lt;a href="http://wiki.xensource.com/xenwiki/Dom0"&gt;dom0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Something else you might not have noticed is that the Fedora kernel team has &lt;a href="https://admin.fedoraproject.org/updates/kernel-2.6.40-4.fc15"&gt;quietly slipped Linux 3.0&lt;/a&gt; into Fedora 15&amp;rsquo;s update channels in disguise. Click that link, scroll down, and you&amp;rsquo;ll see &lt;em&gt;“Rebase to 3.0. Version reports as 2.6.40 for compatibility with older userspace.”&lt;/em&gt; Although I&amp;rsquo;m not a fan of calling something what it isn&amp;rsquo;t (2.6.40 doesn&amp;rsquo;t exist on kernel.org), I can understand some of the reasoning behind the choice.&lt;/p&gt;
&lt;p&gt;This change makes the Xen installation on Fedora 15 pretty trivial. To get started, update your kernel to the latest if you&amp;rsquo;re not already on Fedora&amp;rsquo;s 2.6.40 kernels:&lt;/p&gt;
&lt;pre lang="html"&gt;yum -y upgrade kernel&lt;/pre&gt;
&lt;p&gt;We need three more packages (quite a few dependencies will roll in with them):&lt;/p&gt;
&lt;pre lang="html"&gt;yum -y install xen libvirt python-virtinst&lt;/pre&gt;
&lt;p&gt;The xen package reels in the hypervisor itself along with libraries and command line tools (like xl and xm). Libvirt gives us easy access to VM management with the &lt;code&gt;virsh&lt;/code&gt; command and python-virtinst gives us the handy &lt;code&gt;virt-install&lt;/code&gt; command to make OS installations easy.&lt;/p&gt;
&lt;p&gt;Once those packages are installed, we need to make some adjustments in your grub configuration. Open &lt;code&gt;/boot/grub/menu.lst&lt;/code&gt; in your text editor of choice and add something like this at the bottom:&lt;/p&gt;
&lt;pre lang="html"&gt;title Fedora + Xen (2.6.40-4.fc15.x86_64)
 root (hd0,1)
	kernel /boot/xen.gz
 module /boot/vmlinuz-2.6.40-4.fc15.x86_64 ro root=/dev/sda1
 module /boot/initramfs-2.6.40-4.fc15.x86_64.img
&lt;/pre&gt;
&lt;p&gt;Ensure that the &lt;code&gt;root (hd0,1)&lt;/code&gt; is applicable to your system (adjust it if it isn&amp;rsquo;t). Also, check the kernel version to ensure it matches your installed kernel and adjust the &lt;code&gt;root=&lt;/code&gt; portion to match your root volume. Flip the &lt;code&gt;default&lt;/code&gt; line to a value which will boot your new grub entry and ensure the timeout is set to a reasonable number if you need to temporarily switch back to your original grub entry at boot time. (Hey, we all make mistakes.)&lt;/p&gt;
&lt;p&gt;I take one extra precaution and change the &lt;code&gt;UPDATEDEFAULT=yes&lt;/code&gt; line to &lt;code&gt;no&lt;/code&gt; in &lt;code&gt;/etc/sysconfig/kernel&lt;/code&gt;. This ensures that future kernel updates don&amp;rsquo;t trample the entry you&amp;rsquo;ve just made. Keep in mind that you&amp;rsquo;ll need to manually update your grub configuration when you do kernel upgrades later.&lt;/p&gt;
&lt;p&gt;Cross your fingers and reboot. If your system doesn&amp;rsquo;t reboot properly, reboot it again and choose your old kernel from the grub menu. Double-check your configuration for fat-fingering and give it another try. If your system boots and pings but you have no output via a monitor, don&amp;rsquo;t fret. There&amp;rsquo;s a &lt;a href="http://marc.info/?l=linux-kernel&amp;amp;m=131169794026271&amp;amp;w=2"&gt;patch&lt;/a&gt; for the problem which &lt;a href="http://marc.info/?l=linux-kernel&amp;amp;m=131169794026271&amp;amp;w=2"&gt;should appear soon&lt;/a&gt; in Linux 3.0. The impatient can snag a kernel source RPM, add the patch file, and &lt;a href="http://fedoraproject.org/wiki/Building_a_custom_kernel"&gt;build a local kernel&lt;/a&gt; (or you can &lt;a href="http://majorhayden.com/RPMS/kernel-3.0.0-1.mhayden.fc16/"&gt;download my local build&lt;/a&gt; from when I did it).&lt;/p&gt;
&lt;p&gt;Log in and verify that you booted into the dom0:&lt;/p&gt;
&lt;pre lang="html"&gt;[root@xenbox ~]# xm dmesg | head -n 5
 __ __ _ _ _ _ ____ __ _ ____
 \ \/ /___ _ __ | || | / | / | |___ \ / _| ___/ | ___|
 \ // _ \ '_ \ | || |_ | | | |__ __) | | |_ / __| |___ \
 / \ __/ | | | |__ _|| |_| |__/ __/ _| _| (__| |___) |
 /_/\_\___|_| |_| |_|(_)_(_)_| |_____(_)_| \___|_|____/
&lt;/pre&gt;
&lt;p&gt;Once you&amp;rsquo;re done with that, make sure libvirtd is running:&lt;/p&gt;
&lt;pre lang="html"&gt;/etc/init.d/libvirtd start; chkconfig libvirtd on&lt;/pre&gt;
&lt;p&gt;Try installing a VM:&lt;/p&gt;
&lt;pre lang="html"&gt;virt-install \
 --paravirt \
 --name=testvm \
 --ram=512 \
 --vcpus=4 \
 --file /dev/vmstorage/testvm \
 --graphics vnc,port=5905 --noautoconsole \
 --autostart --noreboot \
 --location=http://mirrors.kernel.org/debian/dists/squeeze/main/installer-amd64/
&lt;/pre&gt;
&lt;p&gt;You should have a VM installation underway pretty quickly and it will be visible via port 5905 on the local host. Enjoy the power and freedom of your brand new &lt;a href="http://en.wikipedia.org/wiki/Hypervisor#Classification"&gt;type 1 hypervisor&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Installing Xen 4 on Fedora 13</title><link>https://major.io/p/installing-xen-4-on-fedora-13/</link><pubDate>Fri, 10 Sep 2010 13:56:49 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/installing-xen-4-on-fedora-13/</guid><description>&lt;p&gt;Installing Xen can be a bit of a challenge for a beginner and it&amp;rsquo;s made especially difficult by distribution vendors who aren&amp;rsquo;t eager to include it in their current releases. I certainly don&amp;rsquo;t blame the distribution vendors for omitting it; the code to support Xen&amp;rsquo;s privileged domain isn&amp;rsquo;t currently in upstream kernels.&lt;/p&gt;
&lt;p&gt;However, &lt;a href="http://www.xen.org/community/spotlight/pasi.html"&gt;Pasi Kärkkäinen&lt;/a&gt; has written a &lt;a href="http://wiki.xensource.com/xenwiki/Fedora13Xen4Tutorial"&gt;detailed walkthrough&lt;/a&gt; about how to get Xen 4 running on Fedora 13. Although there are quite a few steps involved, it&amp;rsquo;s worked well for me so far.&lt;/p&gt;</description></item><item><title>Legacy tty1 and block device support for Xen guests with pvops kernels</title><link>https://major.io/p/legacy-tty1-and-block-device-support-for-xen-guests-with-pvops-kernels/</link><pubDate>Fri, 14 May 2010 13:24:34 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/legacy-tty1-and-block-device-support-for-xen-guests-with-pvops-kernels/</guid><description>&lt;p&gt;The discussions about the &lt;a href="http://wiki.xensource.com/xenwiki/XenParavirtOps"&gt;paravirt_ops&lt;/a&gt;, or &amp;ldquo;pvops&amp;rdquo;, support in upstream kernels at &lt;a href="http://www.xen.org/xensummit/xensummit_spring_2010.html"&gt;Xen Summit 2010&lt;/a&gt; last month really piqued my interest.&lt;/p&gt;
&lt;p&gt;Quite a few distribution maintainers have gone to great lengths to keep Xen domU support in their kernels and it&amp;rsquo;s been an uphill battle. Some kernels, such as Ubuntu&amp;rsquo;s &lt;a href="http://packages.ubuntu.com/lucid/linux-ec2"&gt;linux-ec2&lt;/a&gt; kernels, have patches from 2.6.18 dragged forward into 2.6.32 and even 2.6.33. It certainly can&amp;rsquo;t be enjoyable to keep dragging those patches forward into new kernel trees.&lt;/p&gt;
&lt;p&gt;The paravirt_ops support for Xen guests was added in 2.6.23 and continues to be included and improved in the latest kernel trees. However, there are two significant problems with these new kernels if you&amp;rsquo;re trying to work with legacy environments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the console is on &lt;code&gt;hvc0&lt;/code&gt;, not &lt;code&gt;tty1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;block devices are now &lt;code&gt;/dev/xvdX&lt;/code&gt; rather than &lt;code&gt;/dev/sdX&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only have a few guests, these changes are generally pretty easy. Switching the console just requires some changes to your inittab or upstart configurations. Changing the block device names requires changes to the guest&amp;rsquo;s Xen configuration file and &lt;code&gt;/etc/fstab&lt;/code&gt; within the guest itself.&lt;/p&gt;
&lt;p&gt;Considering the &lt;a href="http://www.rackspacecloud.com/cloud_hosting_products/servers"&gt;amount of environments&lt;/a&gt; I work with daily at Rackspace, changing the guest configuration is definitely not an option. I needed a way to keep the console and block devices unchanged so that our customers could have a consistent experience on our infrastructure.&lt;/p&gt;
&lt;p&gt;Luckily, &lt;a href="http://blog.warma.dk/"&gt;Soren Hansen&lt;/a&gt; offered to pitch in and a solution became apparent. Through some &lt;a href="http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00712.html"&gt;relatively small patches&lt;/a&gt;, the legacy console and block device support was available in the latest 2.6.32 version (2.6.32.12 as of this post&amp;rsquo;s writing).&lt;/p&gt;
&lt;p&gt;So far, I&amp;rsquo;ve tested x86_64 and i386 versions of 2.6.32.12 with the console and block device patches. It&amp;rsquo;s gone through its paces on Xen 3.0.3, 3.1.2, 3.3.0 and 3.4.2. All revisions of Fedora, CentOS, Ubuntu, Debian, Gentoo and Arch made within the last two years are working well with the new kernels.&lt;/p&gt;</description></item></channel></rss>