<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: virtualisation</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/virtualisation/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>A Probably Inaccurate History Of LibVirt, KVM and QEMU</title>
      <link>https://chrisjrob.com/2016/05/09/a-probably-inaccurate-history-of-libvirt-kvm-qemu/</link>
      <pubDate>Mon, 09 May 2016 17:38:31 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2016/05/09/a-probably-inaccurate-history-of-libvirt-kvm-qemu</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/kvm.png" align="right" alt="Featured Image">
         
         <p>A while ago I was explaining the difference between QEMU, KVM and LibVirt, 
and I ended up by emailing this nonsense.
I don’t claim it’s accurate, it certainly isn’t.
It’s probably not even funny.
Enjoy :).</p>

<p><em>In the beginning there was QEMU, but it was slow and the people grieved.</em>
<!--more--></p>

<p><em>Then KVM was forked from QEMU with a kernel module to use the CPU’s
virtualisation features to work much faster and there was much
rejoicing. Linus also rejoiced and welcomed KVM’s kernel module into
the mainline kernel.</em></p>

<p><em>But the people did not rejoice, as they were mostly using Sun’s
VirtualBox (also forked from QEMU).</em></p>

<p><em>QEMU awoke from its slumber and joined with KVM and their union caused
almost no rejoicing, in fact I am not convinced anyone really noticed.</em></p>

<p><em>But the System Administrators were still dissatisfied and complained
that there should be standardisation of commands across different
hypervisors. And thus LibVirt was born and the System Administrators
rejoiced.</em></p>

<p><em>Yet still the people used VirtualBox. But lo! The evil Oracle slew the
Sun and VirtualBox moved into darkness, and there was much gnashing of
teeth and wearing of sackcloth; although this was generally considered
a step forwards from the t-shirts that they usually wore.</em></p>

<p><em>But still the people could not use QEMU-KVM, without issuing complex
incantations, and so Virt-Manager was born and finally the people
rejoiced, with much clicking of mice.</em></p>

<p>The End.</p>

       ]]>
      </description>
    </item>
    
    <item>
      <title>Virtualization With KVM On A Debian Squeeze Server</title>
      <link>https://chrisjrob.com/2011/03/14/virtualization-with-kvm-on-a-debian-squeeze-server-howtoforge-linux-howtos-and-tutorials/</link>
      <pubDate>Mon, 14 Mar 2011 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2011/03/14/virtualization-with-kvm-on-a-debian-squeeze-server-howtoforge-linux-howtos-and-tutorials</guid>
      <description>
       <![CDATA[
         
         <p>A nice how-to for KVM and libvirt on Debian Squeeze:</p>

<ul>
  <li><a href="http://www.howtoforge.com/virtualization-with-kvm-on-a-debian-squeeze-server">Virtualization With KVM On A Debian Squeeze Server</a></li>
</ul>

<!--more-->

<p>I have used KVM, but never with libvirt.  I understand that libvirt is a
standard api for managing various virtualisation technologies, e.g. KVM,
QEMU, Xen and others, giving you a common way of managing your guests
regardless of the technology in use.</p>

<p>For more information please visit:</p>

<ul>
  <li><a href="http://www.howtoforge.com/virtualization-with-kvm-on-a-debian-squeeze-server">Virtualization With KVM On A Debian Squeeze Server</a></li>
</ul>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | OpenVZ Notes</title>
      <link>https://chrisjrob.com/2010/10/05/openvz-notes/</link>
      <pubDate>Tue, 05 Oct 2010 13:09:30 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/10/05/openvz-notes</guid>
      <description>
       <![CDATA[
         
         <h2 id="warning">Warning</h2>

<p>This is just an aide-memoire, please don’t try and follow it.</p>

<h2 id="creating-a-template">Creating a template</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># rm -f /etc/ssh/ssh_host_*
cat &lt;&lt; EOF &gt; /etc/rc2.d/S15ssh_gen_host_keys
#!/bin/bash
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ''
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
rm -f \$0
EOF
# chmod a+x /etc/rc2.d/S15ssh_gen_host_keys
</code></pre></div></div>

<!--more-->

<h2 id="tip-re-freenx-server">Tip re. freenx-server</h2>

<p>You will need to reconfigure the freenx-server:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo dpkg-reconfigure freenx-server
</code></pre></div></div>

<h2 id="updating-template">Updating template</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzctl enter XXX
$ sudo apt-get clean
$ exit
$ sudo vzctl set XXX --ipdel all --save
$ sudo vim /var/lib/vz/private/XXX/etc/resolv.conf
$ sudo rm -f /var/lib/vz/private/XXX/etc/hostname
$ sudo vzctl stop XXX
$ cd /var/lib/vz/private/XXX
$ tar --numeric-owner -zcf /var/lib/vz/template/cache/debian-5.0-i386-minimal.tar.gz .
</code></pre></div></div>

<h2 id="create-configuration-template-for-10-vms">Create configuration template for 10 vms</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzsplit -n 10 -f vps.tenth
</code></pre></div></div>

<h2 id="create-new-vm">Create new vm</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo vzctl create XXX --ostemplate debian-5.0-i386-minimal --config vps.basic
sudo vzctl create XXX --ostemplate debian-5.0-i386-kde --config vps.tenth
sudo vzctl start XXX
sudo vzctl set XXX --ipadd 192.168.0.XXX --save
sudo vzctl set XXX --nameserver 192.168.0.254 --save
sudo vzctl set XXX --onboot yes --save
sudo vzctl set XXX --hostname server-XXXXXX.example.co.uk --save
sudo vzctl set XXX --diskspace $(( 1048576*2 )):$(( 1153434*2 )) --save
sudo vzctl set XXX --diskspace 10G:11G --save
vzcfgvalidate /etc/vz/conf/XXX.conf
</code></pre></div></div>

<h2 id="other-tricks">Other tricks</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo vzctl start XXX
sudo vzctl exec XXX passwd
sudo vzctl exec XXX ps aux
sudo vzctl enter XXX
sudo vzctl stop XXX
</code></pre></div></div>

<h2 id="removing-a-vm">Removing a vm</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzctl destroy XXX
$ sudo rm /etc/vz/conf/XXX.conf.destroyed
</code></pre></div></div>

<h2 id="list-running-and-non-running">List running and non-running</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo vzlist -a
</code></pre></div></div>

<h2 id="memory-use">Memory use</h2>

<h3 id="check-memory-usage-for-guest-103">Check memory usage for guest 103</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzcalc -v 103
</code></pre></div></div>

<h3 id="set-minimum-memory-256-x-memory-wanted">Set minimum memory 256 x memory wanted</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzctl set vpsid --vmguarpages $((256 * 256)) --save
</code></pre></div></div>

<h3 id="set-maximum-memory-256-x-memory-wanted">Set maximum memory 256 x memory wanted</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo vzctl set vpsid --privvmpages $((256 * 1024)) --save
</code></pre></div></div>

<h2 id="references">References</h2>

<ul>
  <li>http://wiki.openvz.org/Debian_template_creation</li>
  <li>http://wiki.openvz.org/Resource_shortage</li>
  <li>http://www.linux.com/archive/feature/114214</li>
</ul>

       ]]>
      </description>
    </item>
    
    <item>
      <title>QEMU-KVM Black Screen</title>
      <link>https://chrisjrob.com/2010/09/28/qemu-kvm-black-screen/</link>
      <pubDate>Tue, 28 Sep 2010 00:00:03 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/09/28/qemu-kvm-black-screen</guid>
      <description>
       <![CDATA[
         
         <p>I upgraded one of our servers yesterday, including an upgrade from the Debian Stable kvm72 package, to the Debian Backports qemu-kvm version 0.12.4, whereon I could no longer start our Windows Server 2003 virtual machine.  As soon as the machine started, it locked up completely with just a black screen, and had to be terminated with a kill -9 signal.</p>

<!--more-->

<p>After a considerable time spent googling without any success, I decided to upgrade the Kernel from 2.6.26 to the backports 2.6.32 and normal operation was restored.  I mention this only in the hope that the next person who googles qemu-kvm black screen might be saved a considerable time searching for the solution!</p>

       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | VirtualBox Mismatch</title>
      <link>https://chrisjrob.com/2010/02/01/virtualbox-mismatch/</link>
      <pubDate>Mon, 01 Feb 2010 09:45:53 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/02/01/virtualbox-mismatch</guid>
      <description>
       <![CDATA[
         
         <p>I have been told that installing package <code class="language-plaintext highlighter-rouge">virtualbox-ose-dkms</code> solves all these problems.  I have installed and it reported that my modules were up-to-date, which is promising.  I shall try and remember to update this page later, but I thought I’d write this now in case I forget!!</p>

<h2 id="solving-virtualbox-mismatch">Solving VirtualBox Mismatch</h2>

<!--more-->

<p>If you install <code class="language-plaintext highlighter-rouge">virtualbox-ose</code> under Debian, along with <code class="language-plaintext highlighter-rouge">virtualbox-ose-modules-2.6</code>, there can be a mismatch between versions, which will prevent VirtualBox from running.  At the time of writing <code class="language-plaintext highlighter-rouge">virtualbox-ose</code> is at version 1.66 and <code class="language-plaintext highlighter-rouge">virtualbox-ose-modules-2.6</code> is at 1.62.</p>

<p>Unfortunately you need to build the kernel module yourself.</p>

<h3 id="step-1-determine-modules-package-name">Step 1: Determine modules package name</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ dpkg -l "virtualbox-ose-modules*" | grep ii
ii  virtualbox-ose-modules-2.6.30-2-amd64 3.0.12-dfsg-1+2.6.30-8squeeze1 VirtualBox modules for Linux (kernel 2.6.30-
</code></pre></div></div>

<p>Take a note of this package name for the next step.</p>

<h3 id="step-2-uninstall-the-debian-package">Step 2: Uninstall the Debian package</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get remove virtualbox-ose-modules-2.6.30-2-amd64
</code></pre></div></div>

<h3 id="step-3-install-virtualbox-source">Step 3: Install VirtualBox Source</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install virtualbox-ose-source
$ sudo module-assistant auto-install virtualbox-ose
</code></pre></div></div>

<p>This will produce a custom <code class="language-plaintext highlighter-rouge">virtualbox-ose-modules</code> package in <code class="language-plaintext highlighter-rouge">/usr/src</code>, which will then be used to install.</p>

<p><strong>Look out for error messages, if it states that a deb file already exists, remove it and try again.</strong></p>

<h3 id="step-4-load-kernel-driver">Step 4: Load Kernel Driver</h3>

<p><strong>This step was carried out automatically in the version that I have.</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo modprobe -r vboxdrv
$ sudo modprobe vboxdrv
</code></pre></div></div>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Create a Virtual Machine in KVM</title>
      <link>https://chrisjrob.com/2009/04/09/create-a-virtual-machine-in-kvm/</link>
      <pubDate>Thu, 09 Apr 2009 19:26:35 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/04/09/create-a-virtual-machine-in-kvm</guid>
      <description>
       <![CDATA[
         
         <h2 id="creating-a-disk-image-for-the-guest">Creating a disk image for the guest</h2>

<p>The following command will create a resizing 10G image in your current directory:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /usr/bin/qemu-img create -f qcow2 vdisk.img 10G
</code></pre></div></div>

<!--more-->

<h2 id="booting-from-cdrom">Booting from CDROM</h2>

<p>I struggled on our LTSP server to boot from CDROM, but found that I could boot easily from the downloaded IMG files (from Microsoft).</p>

<p>Boot from first CD image:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ kvm -no-acpi -m 512 -cdrom /home/username/vdisks/w2k3/iso/X13-04874.img -boot d -hda w2k3.img -k en-gb -smp 2
</code></pre></div></div>

<p>Boot from second CD image:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ kvm -no-acpi -m 512 -cdrom /home/username/vdisks/w2k3/iso/X13-04795.img -boot d -hda w2k3.img -k en-gb -smp 2
</code></pre></div></div>

<h2 id="references">References</h2>

<ul>
  <li>http://kvm.qumranet.com/kvmwiki/HOWTO</li>
  <li>http://www.debian-administration.org/articles/545</li>
</ul>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Build VirtualBox from Source</title>
      <link>https://chrisjrob.com/2009/03/21/build-virtualbox-from-source/</link>
      <pubDate>Sat, 21 Mar 2009 05:33:10 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/build-virtualbox-from-source</guid>
      <description>
       <![CDATA[
         
         <h2 id="download">Download</h2>

<p>Download Open Source Edition (OSE) from VirtualBox:</p>

<ul>
  <li>http://www.virtualbox.org/wiki/Downloads</li>
</ul>

<!--more-->

<h2 id="pre-requisites">Pre-requisites</h2>

<p>Install the following pre-requisites:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># apt-get install gcc g++ bcc iasl xsltproc xalan libxalan110-dev uuid-dev zlib1g-dev libidl-dev libsdl1.2-dev libxcursor-dev libqt3-headers libqt3-mt-dev libasound2-dev libstdc++5 libhal-dev
</code></pre></div></div>

<h2 id="compile">Compile</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># sudo su
# ./configure
# . env.sh  &lt;&lt; Note the space between the '.' and 'env'
# kmk all
</code></pre></div></div>

<h2 id="installation">Installation</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># cd out/linux.x86/release/bin/src
# make
# make install
# cd ..
</code></pre></div></div>

<h2 id="references">References</h2>

<p>This document has been copied from the following, which you should read as your primary source.</p>

<ul>
  <li>http://www.virtualbox.org/wiki/Linux%20build%20instructions</li>
</ul>

<p>I also found the following (suitably adapted for Debian) to be most useful:</p>

<ul>
  <li>http://www.howtoforge.com/virtualbox_ubuntu</li>
</ul>

<p>Although I could not get subversion working from behind our proxy server, the source for 1.5.2 was downloadable at the above site.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | VirtualBox</title>
      <link>https://chrisjrob.com/2009/03/21/virtualbox/</link>
      <pubDate>Sat, 21 Mar 2009 05:32:58 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/virtualbox</guid>
      <description>
       <![CDATA[
         
         <p><strong>The VirtualBox Open Source Edition is now in the Debian and Ubuntu repositories, so these instructions are largely redundant.</strong></p>

<h2 id="licensing">Licensing</h2>

<p>The full product is not open source, only free for personal and evaluation use. They do offer an open source version, but this requires compiling from source and does not include headless VRDP or automated set-up, nor USB support.</p>

<!--more-->

<h2 id="performance">Performance</h2>

<p>The good news is that VirtualBox is very fast indeed, and you can activate the CPU virtual threading to make it even faster.</p>

<h2 id="installing-the-full-product">Installing the Full Product</h2>

<p>So simple, in comparison to the alternatives.</p>

<ol>
  <li>Either download from http://www.virtualbox.org/wiki/Downloads or follow instructions to add to apt sources</li>
  <li>Install in the normal Debian way</li>
</ol>

<h2 id="creating-a-virtual-machine">Creating a virtual machine</h2>

<p>So intuitive, you can work it out for yourself.</p>

<p><strong>VirtualBox requires ISO files. If you have IMG files, they can simply be renamed</strong></p>

<p><strong>Don’t forget to turn on CPU virtual threading, if you have a suitable CPU</strong></p>

<h2 id="simple-networking">Simple networking</h2>

<p>See <a href="/2009/03/21/simple-networking-in-kvm/">Simple networking in KVM</a> for more information on this method.</p>

<p>Simply add the two scripts below to your .VirtualBox folder (or a place of your choosing) and in the VirtualBox GUI interface, edit the settings of your virtual machine and change the networking to host networking, give the interface the name “tap0” and add the scripts below in the relevant fields.</p>

<ul>
  <li>Host IP: 192.168.0.17</li>
  <li>TUN Interface IP: 192.168.0.18</li>
  <li>Guest Interface IP: 192.168.0.19</li>
</ul>

<h3 id="create-interface">Create interface</h3>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c"># vbox-ifup.sh</span>

<span class="c"># configure tun0 device (UML and newer versions of Qemu use tap0 here!)</span>
<span class="nb">sudo</span> /sbin/ifconfig tap0 192.168.0.18

<span class="c"># activate ip forwarding</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 1 &gt; /proc/sys/net/ipv4/ip_forward'</span>

<span class="c"># set up routing to the guest IP</span>
<span class="nb">sudo </span>route add <span class="nt">-host</span> 192.168.0.19 dev tap0

<span class="c"># activate ARP proxy to "spoof" arp address</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 1 &gt; /proc/sys/net/ipv4/conf/tap0/proxy_arp'</span>

<span class="c"># set "spoofed" arp address</span>
<span class="nb">sudo </span>arp <span class="nt">-Ds</span> 192.168.0.19 eth0 pub
</code></pre></div></div>

<h3 id="close-interface">Close interface</h3>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c"># vbox-ifdown.sh</span>

<span class="c"># delete "spoofed" arp address</span>
<span class="nb">sudo </span>arp <span class="nt">-d</span> 192.168.0.19

<span class="c"># deactivate ARP proxy to "spoof" arp address</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 0 &gt; /proc/sys/net/ipv4/conf/tap0/proxy_arp'</span>

<span class="c"># remove routing to the guest IP</span>
<span class="nb">sudo </span>route del <span class="nt">-host</span> 192.168.0.19 dev tap0

<span class="c"># deactivate ip forwarding</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 0 &gt; /proc/sys/net/ipv4/ip_forward'</span>

<span class="c"># remove tun0 device (UML and newer versions of Qemu use tap0 here!)</span>
<span class="nb">sudo</span> /sbin/ifconfig <span class="nv">$1</span> down
</code></pre></div></div>

<h2 id="references">References</h2>

<ul>
  <li><a href="https://help.ubuntu.com/community/VirtualBox#head-ac88c03223e773c78dbb46b4b13c109de1143a03">Build VirtualBox</a></li>
  <li><a href="http://ubuntuforums.org/archive/index.php/t-346185.html">Complete Host Networking</a></li>
  <li><a href="http://www.cendio.com/seamlessrdp/">Install SeamlessRDP</a></li>
  <li><a href="http://ubuntuforums.org/showthread.php?t=433359">Configure for seamless and headless operation</a></li>
  <li><a href="http://ubuntuforums.org/showthread.php?t=433359&amp;page=11">Fix for multiple windows</a>
    <ul>
      <li>http://ubuntuforums.org/showthread.php?t=224212</li>
      <li>http://www.fontis.com.au/rdesktop</li>
    </ul>
  </li>
  <li><a href="http://www.virtualbox.org/download/UserManual.pdf">VirtualBox Manual</a></li>
  <li><a href="http://sig9.com/articles/concurrent-remote-desktop">Concurrent Users</a>
    <ul>
      <li>http://concurrentremotesessions.netfirms.com/</li>
      <li>http://sala.pri.ee/terminal-server-patch/</li>
    </ul>
  </li>
</ul>

       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Simple networking in KVM</title>
      <link>https://chrisjrob.com/2009/03/21/simple-networking-in-kvm/</link>
      <pubDate>Sat, 21 Mar 2009 05:32:36 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/simple-networking-in-kvm</guid>
      <description>
       <![CDATA[
         
         <p>Most instructions on the web are suggesting setting up bridging and setting the interface to work in promiscuous mode; which I understand has security implications. I came across <a href="http://calamari.reverse-dns.net:980/cgi-bin/moin.cgi/QemuOnLinux">this website</a> which seemed to promise a simple alternative, by which instead of bridging the networks we just advertise the presence of the guest interface. It seems to work well as far as I can tell.</p>

<!--more-->

<h2 id="configuration">Configuration</h2>

<ul>
  <li>Host IP: 192.168.0.17</li>
  <li>TUN Interface IP: 192.168.0.18</li>
  <li>Guest Interface IP: 192.168.0.19</li>
</ul>

<p>I went into windows and provisioned the emulated ethernet interface with an IP address of 192.168.0.19; along with appropriate DNS settings and default gateway settings. I’ve also reserved the address 192.168.0.18 for use by the tunnel device.</p>

<p>My <code class="language-plaintext highlighter-rouge">/etc/qemu-ifup</code> looks like this:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c"># configure tun0 device (UML and newer versions of Qemu use tap0 here!)</span>
<span class="nb">sudo</span> /sbin/ifconfig <span class="nv">$1</span> 192.168.0.18

<span class="c"># activate ip forwarding</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 1 &gt; /proc/sys/net/ipv4/ip_forward'</span>

<span class="c"># set up routing to the guest IP</span>
<span class="nb">sudo </span>route add <span class="nt">-host</span> 192.168.0.19 dev tap0

<span class="c"># activate ARP proxy to "spoof" arp address</span>
<span class="nb">sudo </span>bash <span class="nt">-c</span> <span class="s1">'echo 1 &gt; /proc/sys/net/ipv4/conf/tap0/proxy_arp'</span>

<span class="c"># set "spoofed" arp address</span>
<span class="nb">sudo </span>arp <span class="nt">-Ds</span> 192.168.0.19 eth0 pub
</code></pre></div></div>

<p>Thats it… The bridging is done only for a single IP address by installing a proxy ARP.</p>

<h2 id="running">Running</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo kvm -hda w2k3.img -smp 2 -m 512 -no-acpi -k en-gb -net nic,model=rtl8139 -net tap,script=/etc/qemu-ifup -usb -usbdevice tablet -snapshot
</code></pre></div></div>

<ul>
  <li>Note that you must sudo the command, as root priority is required for the qemu-ifup script.</li>
  <li>Note also that for some reason under KVM you need to specify the qemu-ifup script, as it does not default to that. I suspect that it defaults to kvm-ifup, but I have not looked into this further.</li>
  <li>The USB switch is useful in that it enables the mouse to leave the virtual window, and also seems to synchronise the host/guest cursors, which was a problem on our installation.</li>
</ul>

<h2 id="references">References</h2>

<ul>
  <li><a href="http://fabrice.bellard.free.fr/qemu/">QEMU</a></li>
  <li><a href="http://calamari.reverse-dns.net:980/cgi-bin/moin.cgi/QemuOnLinux">QEMU Networking</a>
    <ul>
      <li><a href="http://www.cnpbagwell.com/QEMU/HomePage">QEMU Setup Hints</a></li>
    </ul>
  </li>
</ul>

       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Install KVM</title>
      <link>https://chrisjrob.com/2009/03/21/install-kvm/</link>
      <pubDate>Sat, 21 Mar 2009 05:32:12 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/install-kvm</guid>
      <description>
       <![CDATA[
         
         <h2 id="check-cpu-supports-kvm">Check CPU supports KVM</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># egrep '^flags.*(vmx|svm)' /proc/cpuinfo 
</code></pre></div></div>

<p>If nothing is displayed, then you do not have a CPU that supports KVM. If lines are output that include the text “vmx” then you have an Intel CPU that supports KVM, if “svm” then an AMD CPU that supports KVM.</p>

<!--more-->

<h2 id="check-kernel">Check Kernel</h2>

<p>In order to run KVM you must be running 2.6.20 or higher. You can check this by running the following command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># uname -r
2.6.26-1-686
</code></pre></div></div>

<h2 id="install-prerequisites">Install Prerequisites</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># aptitude install gcc-3.4 libsdl1.2-dev zlib1g-dev libasound2-dev linux-kernel-headers pkg-config libgnutls-dev
</code></pre></div></div>

<h2 id="install-kvm">Install KVM</h2>

<p><strong>Make sure that you have Backports installed if you are running Etch.</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># aptitude install kvm qemu
</code></pre></div></div>

<p><strong>You need QEMU in order to create disk images.</strong></p>

<h2 id="add-user-to-kvm">Add User to KVM</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># adduser $USER kvm
</code></pre></div></div>

<h2 id="load-kvm-modules">Load KVM Modules</h2>

<p>Decide whether you have an Intel or AMD CPU (see Step 1).</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># modprobe kvm
# modprobe kvm-intel or kvm-amd (depending on CPU type)
</code></pre></div></div>

<p>If this fails then try</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># dmesg | grep kvm
</code></pre></div></div>

<p>If it states “kvm disabled in BIOS” then you will need to boot into the BIOS and switch on VT support (probably under advanced processor options).</p>

<p>You can check that the modules are enabled by running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># lsmod | grep kvm
</code></pre></div></div>

<h2 id="set-kvm-modules-to-autoload">Set KVM modules to autoload</h2>

<p>Add the modules to /etc/modules to ensure that they load upon the next reboot.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># echo "kvm" &gt;&gt; /etc/modules
# echo "kvm-intel" &gt;&gt; /etc/modules
</code></pre></div></div>

<h2 id="references">References</h2>

<ul>
  <li><a href="http://kvm.qumranet.com/kvmwiki/HOWTO">KVM Wiki Howto</a></li>
  <li><a href="http://wiki.debian.org/KVM">KVM on Debian Wiki</a></li>
</ul>

       ]]>
      </description>
    </item>
    
    <item>
      <title>Linux | Windows Virtualisation</title>
      <link>https://chrisjrob.com/2009/03/21/windows-virtualisation/</link>
      <pubDate>Sat, 21 Mar 2009 05:31:50 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/windows-virtualisation</guid>
      <description>
       <![CDATA[
         
         <p>The area of virtualisation is one of rapid development and you should investigate more widely before making any decisions.</p>

<h2 id="options-for-windows-virtualisation">Options for Windows Virtualisation</h2>

<p>There are several options for Windows virtualisation, including:</p>

<ul>
  <li><a href="#qemu">QEMU</a></li>
  <li><a href="#xen">Xen</a></li>
  <li><a href="#virtualbox">VirtualBox</a></li>
  <li><a href="#vmware-server">VMWare Server</a></li>
</ul>

<!--more-->

<h3 id="qemu">QEMU</h3>

<p>A true open source virtualisation product, but one that runs slowly, often too slowly to be of use. Fortunately you can optimise QEMU by the installation of one of the following:</p>

<ul>
  <li>KQEMU</li>
  <li>KVM</li>
</ul>

<p>The former is not entirely open source, but is your main option if you have a Kernel less than 2.6.20.</p>

<h3 id="xen">XEN</h3>

<p>Is not an open source product, but is available free. It is considered to be very quick.</p>

<h3 id="virtualbox">VirtualBox</h3>

<p>InnoTek offer two versions of their VirtualBox product:</p>

<ul>
  <li><em>Full Product</em> - free for Personal and reasonable Evaluation</li>
  <li><em>OSE (Open Source Edition)</em> - free but requires compiling from source and comes without Guest Additions and without Headless VRDP. The latter seems unimportant, given that Windows has an RDP server already, but it is the only way of running VirtualBox headlessly AFAIK.</li>
</ul>

<p>I have tested on Debian with great success and the following are the links I used:</p>

<ul>
  <li><a href="https://help.ubuntu.com/community/VirtualBox#head-ac88c03223e773c78dbb46b4b13c109de1143a03">Build VirtualBox</a></li>
  <li><a href="http://ubuntuforums.org/archive/index.php/t-346185.html">Complete Host Networking</a></li>
  <li><a href="http://www.cendio.com/seamlessrdp/">Install SeamlessRDP</a></li>
  <li><a href="http://ubuntuforums.org/showthread.php?t=433359">Configure for seamless and headless operation</a></li>
  <li><a href="http://ubuntuforums.org/showthread.php?t=433359&amp;page=11">Fix for multiple windows</a>
    <ul>
      <li>http://ubuntuforums.org/showthread.php?t=224212</li>
      <li>https://www.fontis.com.au/rdesktop</li>
    </ul>
  </li>
  <li><a href="http://www.virtualbox.org/download/UserManual.pdf">VirtualBox Manual</a></li>
  <li><a href="http://sig9.com/articles/concurrent-remote-desktop">Concurrent Users</a>
    <ul>
      <li>http://concurrentremotesessions.netfirms.com/</li>
      <li>http://sala.pri.ee/terminal-server-patch/</li>
    </ul>
  </li>
</ul>

<h3 id="vmware-server">VMWare Server</h3>

<p>Free but not open source. Requires compiling from source. Excellent reliability, supported product. The author has not tested this product.</p>

       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
