<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kvm on the bin</title><link>https://thebin.net/tags/kvm/</link><description>Recent content in Kvm on the bin</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 27 Oct 2014 00:00:00 +0000</lastBuildDate><atom:link href="https://thebin.net/tags/kvm/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux KVM: Bridging a Bond on CentOS 6.5</title><link>https://thebin.net/2014/10/linux-kvm-bridging-a-bond-on-centos-6-5/</link><pubDate>Mon, 27 Oct 2014 00:00:00 +0000</pubDate><guid>https://thebin.net/2014/10/linux-kvm-bridging-a-bond-on-centos-6-5/</guid><description>&lt;p&gt;Today we are going to hop back into the KVM fray, and take a  look at using CentOS as a hypervisor., and configuring very resilient network connections to support our guests.  Of course these instructions should be valid on Red Hat Linux and Oracle Linux as well, though there is a little more to be done around getting access to the repos on those distributions…&lt;/p&gt;&#10;&lt;h2 id="enable-bonding"&gt;Enable Bonding&lt;/h2&gt;&#10;&lt;p&gt;I am assuming this is a first build for you, so this step might not be applicable, but it won’t hurt anything.&lt;/p&gt;</description></item><item><title>Linux KVM: Ubuntu 12.10 with Openvswitch</title><link>https://thebin.net/2012/10/linux-kvm-ubuntu-12-10-with-openvswitch/</link><pubDate>Wed, 24 Oct 2012 00:00:00 +0000</pubDate><guid>https://thebin.net/2012/10/linux-kvm-ubuntu-12-10-with-openvswitch/</guid><description>&lt;p&gt;Today I am revisiting my previous post on Openvswitch on Ubuntu 12.04.  Things have changed since then.  Previously Openvswitch was relatively new and as such the userland tools (with libvirt being the one I use) didn’t support it yet, so while you could have used Openvswitch by executing the kvm processes for each VM manually.  Since this was a predictable problem the Openvswitch guys created a brcompat module, which would take the place of the bridge_utils functionality and expose Openvswitch bridges as legacy bridges.  This allowed the existing userland which already had the legacy bridge functionality builtin to continue to operate the same way.  Anyways as of libvirt 0.9.11 the native Openvswitch functionality is present and supported.  As such I am updating my documentation to include this alternate and preferred method of operation.&lt;/p&gt;</description></item><item><title>Linux-KVM: Ubuntu 12.04 with Openvswitch</title><link>https://thebin.net/2012/03/linux-kvm-ubuntu-12-04-with-openvswitch/</link><pubDate>Mon, 26 Mar 2012 00:00:00 +0000</pubDate><guid>https://thebin.net/2012/03/linux-kvm-ubuntu-12-04-with-openvswitch/</guid><description>&lt;h2 id="update-october-29-2012"&gt;UPDATE: October 29, 2012&lt;/h2&gt;&#10;&lt;p&gt;This article doesn’t work on Ubuntu 12.10, to use Ubuntu 12.10 please refer to my new article &lt;a href="http://blog.allanglesit.com/2012/10/linux-kvm-ubuntu-12-10-with-openvswitch/"&gt;here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Openvswitch is a better way of managing your virtual networking stacks for KVM and Xen.  This can be used instead of the bridge-utils package, and has the ability to use VLANs, LACP, QoS, sFlow, and others.  In this article we will be using Ubuntu 12.04 (beta1) to configure Openvswitch to hand out networking interfaces to KVM guests.&lt;/p&gt;</description></item><item><title>KVM Guests: Graceful Shutdown</title><link>https://thebin.net/2012/02/kvm-guests-graceful-shutdown/</link><pubDate>Mon, 06 Feb 2012 00:00:00 +0000</pubDate><guid>https://thebin.net/2012/02/kvm-guests-graceful-shutdown/</guid><description>&lt;p&gt;So a fairly trivial (but critical) aspect of using KVM is of course performing graceful shutdowns of your domains, without having to reach inside of the guest to perform the shutdown.  Now when it comes to turning off your guests you have two ways of proceeding (with virsh)…&lt;/p&gt;&#10;&lt;div class="codeblock" data-lang="bash"&gt;&#10; &lt;div class="codeblock__bar"&gt;&#10; &lt;span class="codeblock__lang"&gt;bash&lt;/span&gt;&#10; &lt;button type="button" class="codeblock__copy" aria-label="Copy code"&gt;&#10; &lt;span class="codeblock__copy-label"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;virsh destroy vmname&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Which is a HARD power off of your guest.  This is the same as pulling the power cord from the wall, nothing is shutdown, but the noise stops just the same.  This method can result in data corruption if writes are interrupted.&lt;/p&gt;</description></item><item><title>Linux-KVM: Converting Raw Disk Images to LVM Logical Volumes Redux</title><link>https://thebin.net/2011/11/linux-kvm-converting-raw-disk-images-to-lvm-logical-volumes-redux/</link><pubDate>Mon, 07 Nov 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/11/linux-kvm-converting-raw-disk-images-to-lvm-logical-volumes-redux/</guid><description>&lt;p&gt;This really is an update to my previous article “&lt;a href="http://blog.allanglesit.com/2011/03/linux-kvm-converting-raw-disk-images-to-lvm-logical-volumes/"&gt;Linux-KVM: Converting Raw Disk Images to LVM Logical Volumes&lt;/a&gt;“, but the process is significantly different and thus requires more explaining than a simple inline update would do it justice.  Now the big flaw with my first article was that by using dd on the hypervisor level, we are opening ourselves up to unintentional data loss due to incompetence or even a very competent slip of the finger.&lt;/p&gt;</description></item><item><title>Linux-KVM Management: Live Migration Without Shared Storage</title><link>https://thebin.net/2011/08/linux-kvm-management-live-migration-without-shared-storage/</link><pubDate>Tue, 16 Aug 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/08/linux-kvm-management-live-migration-without-shared-storage/</guid><description>&lt;p&gt;Everyday I learn something new about Linux-KVM, this is why I love this platform.  Today we are going to talk about Live Migration.  The kicker?  Shared storage not required.  Now please keep in mind that just because shared storage is not required, doesn’t mean there is not a benefit to it.  Shared storage will accelerate this process, since the data will not have to move.  However virtualization is all about flexibility and so is Linux for that matter, so why shouldn’t we be able to make the choice?  That said this process is not documented by the libvirt team, as such it sounds like an “undocumented” feature.  Please use this at your own risk, and for heaven’s sake please test and understand thoroughly before using this in production.&lt;/p&gt;</description></item><item><title>Linux-KVM Management: Offline Migration</title><link>https://thebin.net/2011/08/linux-kvm-management-offline-migration/</link><pubDate>Mon, 08 Aug 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/08/linux-kvm-management-offline-migration/</guid><description>&lt;p&gt;When you compare Linux-KVM to Hyper-V or VMWare your initial results will indicate that Linux-KVM is lacking when it comes to management tools, and basic functionality.  You would be correct, however you would also be incorrect.  You see with Linux-KVM we can leverage the underlying power of the Linux userland, and with this frankly all things are possible.  Here is one of the basic bits of management functionality which can be attained with a little bit of bash scripting knowledge.  I started by writing a VM backup script, then a VM export script, and of course a VM import script.  Eventually I ended up with a full-blown end-to-end VM migration script.&lt;/p&gt;</description></item><item><title>Linux-KVM: Migrating Hyper-V VHD Images to KVM</title><link>https://thebin.net/2011/03/linux-kvm-migrating-hyper-v-vhd-images-to-kvm/</link><pubDate>Wed, 23 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/linux-kvm-migrating-hyper-v-vhd-images-to-kvm/</guid><description>&lt;p&gt;I have always been a big fan of Hyper-V, and was actually a Virtualization MVP 2 years in a row.  However recently I haven’t been able to get past the really poor support for Linux on the Hyper-V platform.  We run a large number of hypervisors in our international sales offices (15+) and have a need to run both Linux and Windows on them.  This has necessitated our switch to Linux-KVM as their Windows support is far better than Hyper-V’s Linux support.  As such with an upcoming trip planned to our European offices I have been planning exactly how our migration will look, of course the first iteration of this plan consisted of me deploying replacement VMs on the KVM stack then migrating to the VMs individually.  Though this plan was lengthy and cumbersome it would work.&lt;/p&gt;</description></item><item><title>KVM Guests: Install VirtIO Drivers for Windows Guests</title><link>https://thebin.net/2011/03/kvm-guests-install-virtio-drivers-for-windows-guests/</link><pubDate>Tue, 22 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/kvm-guests-install-virtio-drivers-for-windows-guests/</guid><description>&lt;p&gt;Windows guests on the KVM hypervisors can get a very large kick in the pants when it comes to performance if you install the drivers necessary to leverage the VirtIO bus.  So first here are the necessary download links so that you can download the drivers.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.iso"&gt;http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.iso&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/"&gt;http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Inside of the ISO we will find four directories Balloon, NetKVM, vioserial, and viostor.  We are only concerned with viostor and NetKVM, for the storage and networking drivers.  Vioserial is a serial interface which essentially lifts the single serial device limitation within KVM, and Balloon is a balloon memory driver I personally do not find this necessary due to the efficacy of the Kernel Samepage Merging (KSM) which is essentially memory deduplication.&lt;/p&gt;</description></item><item><title>Linux-KVM: Managing KVM Guests Using Virt-Manager on Windows</title><link>https://thebin.net/2011/03/linux-kvm-managing-kvm-guests-using-virt-manager-on-windows/</link><pubDate>Mon, 21 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/linux-kvm-managing-kvm-guests-using-virt-manager-on-windows/</guid><description>&lt;p&gt;When I first started using KVM, I was quite disappointed with the graphical management abilities of KVM.  Basically if you want to manage via the command line KVM is a fantasical dream world where anything is possible and it is all “musical sunshine” and “double rainbows” but if you want the ability to manage graphically it was a world which was very one sided in that if you wanted the ability to graphically manage your VMs then you had to use Linux.  Or so I thought…&lt;/p&gt;</description></item><item><title>Linux-KVM: Managing Disk Images</title><link>https://thebin.net/2011/03/linux-kvm-managing-disk-images/</link><pubDate>Wed, 16 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/linux-kvm-managing-disk-images/</guid><description>&lt;p&gt;Disk images have long been the traditional form of storage for virtualized environments, they are essentially containers in the form of a file on the host’s file system.  These files can be either fully allocated or sparsely allocated at time of disk creation, a fully allocated 20GB disk image will take up 20GB of storage on the host file system, a sparsely allocated 20GB disk image will only take up as much storage on the host file system as has actually been written inside of the disk, so if you have a newly created sparse file the file will be just a few KB in size.&lt;/p&gt;</description></item><item><title>KVM Guests: Manipulating Libvirt XML for Guest Creation</title><link>https://thebin.net/2011/03/kvm-guests-manipulating-libvirt-xml-for-guest-creation/</link><pubDate>Tue, 15 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/kvm-guests-manipulating-libvirt-xml-for-guest-creation/</guid><description>&lt;p&gt;Today we are going to discuss using the underlying XML which libvirt uses to define a VM to either create VMs or to make simple changes.  This method has the advantage of more control over what you are creating, although it is more manual.  Now first off, when you use virt-install, virt-manager, or another tool which uses libvirt under the covers an XML file is created for every VM that you define, libvirt stores these in  /etc/libvirt/qemu/ and names them vmname.xml.&lt;/p&gt;</description></item><item><title>KVM Guests: Using Virt-Install to Install VMs from a CD or ISO Image</title><link>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-install-vms-from-a-cd-or-iso-imag/</link><pubDate>Mon, 14 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-install-vms-from-a-cd-or-iso-imag/</guid><description>&lt;p&gt;In my previous article &lt;a href="http://blog.allanglesit.com/2011/03/kvm-guests-using-virt-install-to-import-an-existing-disk-image/"&gt;KVM Guests: Using Virt-Install to Import an Existing Disk Image&lt;/a&gt; we discussed how to use virt-install to import an existing disk image, which already has an OS installed into it.  Additionally in &lt;a href="http://blog.allanglesit.com/2011/03/kvm-guests-using-virt-install-to-install-debian-and-ubuntu-guests/"&gt;KVM Guests: Using Virt-Install to Install Debian and Ubuntu Guests&lt;/a&gt; I documented how to initiate an install directly off of the apt mirror of your choice for Debian and Ubuntu Guests using virt-install.  In this article we will use virt-install to create a guest and begin the installation using a CD or ISO image for installation media.&lt;/p&gt;</description></item><item><title>Linux-KVM: Taking Advantage of Memory Deduplication</title><link>https://thebin.net/2011/03/linux-kvm-taking-advantage-of-memory-deduplication/</link><pubDate>Thu, 10 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/linux-kvm-taking-advantage-of-memory-deduplication/</guid><description>&lt;p&gt;Kernel Samepage Merging (KSM) is essentially active memory deduplication.  What does this means for our KVM guests?  Basically the more similar guests we have running, the more of a memory footprint they share, which means less memory they actually hold.  These free pages can then be reutilized by the host to provide improved i/o through some of the caching that KVM does or by an increased capacity for other guests.&lt;/p&gt;</description></item><item><title>Linux-KVM: Converting Raw Disk Images to LVM Logical Volumes</title><link>https://thebin.net/2011/03/linux-kvm-converting-raw-disk-images-to-lvm-logical-volumes/</link><pubDate>Wed, 09 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/linux-kvm-converting-raw-disk-images-to-lvm-logical-volumes/</guid><description>&lt;p&gt;Linux Logical Volume Manager provides a better method for managing your disks in the home and even more so in the datacenter.  I briefly outlined some of the benefits afforded us by LVM2 in a previous article &lt;a href="http://blog.allanglesit.com/2011/03/linux-lvm2-flexible-local-storage-management/"&gt;Linux LVM2: Flexible Local Storage Management&lt;/a&gt;.  In this article I will provide you with some very simple steps and scenarios to migrate your existing KVM VMs to LVM2 Logical Volumes.&lt;/p&gt;&#10;&lt;p&gt;In this article I am going to make an assumption that your disk images are raw disk images and that you are not using qcow2, vhd, vdi, vmdk or any other disk image format.  Additionally this process should work for a physical or RAID device as well, though I have not verified that.&lt;/p&gt;</description></item><item><title>KVM Guests: Using Virt-Install to Import an Existing Disk Image</title><link>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-import-an-existing-disk-image/</link><pubDate>Tue, 08 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-import-an-existing-disk-image/</guid><description>&lt;p&gt;In my previous article &lt;a href="http://blog.allanglesit.com/2011/03/kvm-guests-using-virt-install-to-install-debian-and-ubuntu-guests/"&gt;KVM Guests: Using Virt-Install to Install Debian and Ubuntu Guests&lt;/a&gt; we identified how we can use the virt-install command to create a KVM VM and instead of using an iso or physical cd for the install media we can instead use a boot image from an apt mirror via http.  Now obviously this does not harness the true power of the virt-install command.  Today we will discuss how we can take an existing disk image and import it as a VM with the appropriate devices, this would most commonly be done with sysprepped Windows images, to speed up deployment. Though these instructions will easily work with any OS.&lt;/p&gt;</description></item><item><title>KVM Guests: Using Virt-Install to Install Debian and Ubuntu Guests</title><link>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-install-debian-and-ubuntu-guests/</link><pubDate>Wed, 02 Mar 2011 00:00:00 +0000</pubDate><guid>https://thebin.net/2011/03/kvm-guests-using-virt-install-to-install-debian-and-ubuntu-guests/</guid><description>&lt;p&gt;I like to be able to spin up a VM without looking for CD media so for a while now I have been using ISO images for all of my installs directly, however I found my self scurrying around “digitally” looking for the correct iso in much the same way I used to scurry about looking for physical CDs, except I was not physically moving.  So anyways the time was wasted either way, I figured it is time that I find a better (read: lazier) way to do this.  So the idea is that since the apt package manager contains all the packages and files needed to install and upgrade a system, we ought to be able to find a way to initiate the install over the wire.&lt;/p&gt;</description></item></channel></rss>