<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for penguin42</title>
    <link>http://www.advogato.org/person/penguin42/</link>
    <description>Advogato blog for penguin42</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Wed, 22 May 2013 08:26:17 GMT</pubDate>
    <item>
      <pubDate>Sun, 23 May 2010 17:45:31 GMT</pubDate>
      <title>23 May 2010</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=10</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=10</guid>
      <description>Fun with Ubuntu Lucid, KVM and iSCSI&#xD;
&lt;hr&gt;&#xD;
&#xD;
&lt;p&gt; (Note: I wrote this after doing this install and haven't &#xD;
walked through it and checked it, so there maybe thinkos)&#xD;
&#xD;
&lt;p&gt; I run Ubuntu Lucid on my desktop and wanted to play about &#xD;
with server stuff, and I've already got the KVM setup &#xD;
running with other guests running in it.&#xD;
&#xD;
&lt;p&gt; Here I show how I've set up a pair of Ubuntu Lucid server &#xD;
KVM guests, where one iSCSI serves the root to the other, &#xD;
with iSCSI booting using gPXE.&#xD;
&#xD;
&lt;p&gt; I won't claim this is efficient, but it's been interesting &#xD;
to setup - bits of&#xD;
this setup are probably useful in other scenarious, e.g. I &#xD;
think you should&#xD;
be able to iSCSI boot a KVM guest off an external SAN.  &#xD;
There may even&#xD;
be more sane ways of doing this insane combination!&#xD;
&#xD;
&lt;p&gt; &lt;b&gt;1) The base&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; For my base system I have Ubuntu Lucid (64bit) in my case on &#xD;
an i7-860&#xD;
with 8GB of RAM.  On it I have the kvm, qemu-common, qemu-&#xD;
kvm and kvm-pxe packages installed, together with libvirt-&#xD;
bin, libvirt0 and virt-manager.&#xD;
&#xD;
&lt;p&gt; I've got some of my disc space in a LVM volume group.&#xD;
&#xD;
&lt;p&gt; I configured the dhcp range for the default network in KVM &#xD;
downto only part&#xD;
of the range and setup a netboot like this&#xD;
( /var/lib/libvirt/network/default.xml )&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
&#xD;
&lt;p&gt; &amp;lt;network&amp;gt;&#xD;
  &amp;lt;name&amp;gt;default&amp;lt;/name&amp;gt;&#xD;
  &amp;lt;uuid&amp;gt;e72880a1-3159-cb84-4314-ee938ebb954b&amp;lt;/uuid&amp;gt;&#xD;
  &amp;lt;forward mode='nat'/&amp;gt;&#xD;
  &amp;lt;bridge name='virbr0' stp='on' delay='0' /&amp;gt;&#xD;
  &amp;lt;ip address='192.168.122.1' netmask='255.255.255.0'&amp;gt;&#xD;
    &amp;lt;tftp root='/var/lib/libvirt/tftp' /&amp;gt;&#xD;
    &amp;lt;dhcp&amp;gt;&#xD;
      &amp;lt;range start='192.168.122.2' end='192.168.122.127' /&amp;gt;&#xD;
      &amp;lt;host mac='52:54:00:41:73:fb' name='client1' &#xD;
ip='192.168.122.130' /&amp;gt;&#xD;
      &amp;lt;bootp file='netboot' /&amp;gt;&#xD;
    &amp;lt;/dhcp&amp;gt;&#xD;
  &amp;lt;/ip&amp;gt;&#xD;
&amp;lt;/network&amp;gt;&#xD;
&#xD;
&lt;p&gt; &lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; NOTE: To restart the libvirt dhcp server to use the config &#xD;
file you'll need to:&#xD;
&lt;pre&gt;&#xD;
   stop libvirt-bin&#xD;
   killall dnsmasq&#xD;
   ifconfig virbr0 down&#xD;
   brctl delbr&#xD;
   start libvirt-bin&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Create /var/lib/libvirt/tftp&#xD;
&#xD;
&lt;p&gt; &lt;br&gt;&#xD;
&lt;b&gt;2) The server guest&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; I used lvm to create an logical volume called server1a &#xD;
(which is now /dev/main/server1a on the host), and then &#xD;
created a guest  using virt-manager and gave it that volume &#xD;
as a virtio disk. (The ability to  create a new lv within &#xD;
virt-manager doesn't seem to work for me).&#xD;
&#xD;
&lt;p&gt; I then booted this off a Lucid server CD and installed it, &#xD;
creating it's own LVM hierarchy on it's disk and giving it a &#xD;
fixed IP  (192.168.122.129). For convenience I then added an &#xD;
entry to the host machines  /etc/hosts to point to that.&#xD;
&#xD;
&lt;p&gt; Within the server guest I created a new logical volume to be &#xD;
the root disk of the client, so from within the server this &#xD;
is  /dev/server1/export.&#xD;
&#xD;
&lt;p&gt; We now have:&#xD;
&lt;pre&gt;&#xD;
   Host physical Disk (/dev/sda on the host)&#xD;
   fdisk partition for LVM (/dev/sda3 on the host)&#xD;
   LVM volume group (main on the host)&#xD;
   LVM logical volume for the server guest &#xD;
(/dev/main/server1a)&#xD;
&#xD;
&lt;p&gt;    Guest virtual Disk (/dev/vda on the server1 guest, &#xD;
/dev/main/server1a on host)&#xD;
   fdisk partition for LVM (/dev/vda5 on server1 guest)&#xD;
   LVM volume group (server1 on the server1 guest)&#xD;
   LVM logical volume for the client guest &#xD;
(/dev/server1/export)&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Now we can get iscsi serving going.  On the server1 guest I &#xD;
installed the iscsitarget package, made sure that &#xD;
/etc/default/iscsitarget  enabled it and wrote an &#xD;
/etc/ietd.conf with just the lines:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
Target iqn.2010-05.org.treblig:server1.export.a.b&#xD;
       Lun 0 Path=/dev/mapper/server1-export,Type=blockio&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; I then made sure this would run at boot by using&#xD;
&#xD;
&lt;p&gt; update-rc.d iscsitarget defaults&#xD;
&#xD;
&lt;p&gt; &lt;br&gt;&#xD;
&lt;b&gt;3) The client&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; I created another guest with virt-manager with no disk and &#xD;
booted it using&#xD;
the Lucid server disk.  Note that I have a fixed IP &#xD;
specified in the DHCP&#xD;
config for libvirt for the MAC address of the client.&#xD;
&#xD;
&lt;p&gt; When it realises it hasn't got a disk it should&#xD;
give you the option of using iscsi, and giving it the IP of &#xD;
the server&#xD;
it should then list the iscsi target name from the &#xD;
ietd.conf.&#xD;
&#xD;
&lt;p&gt; I then did a normal lucid server install, and then shut it &#xD;
down.&#xD;
&#xD;
&lt;p&gt; &lt;br&gt;&#xD;
&lt;b&gt;4) Booting the client&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; This is somewhat trickier than it should be; the PXE netboot &#xD;
ROM in Qemu/KVM on Lucid doesn't have iSCSI booting in it.   &#xD;
There are  various ways to fix this, you could PXE boot &#xD;
Grub2 and then the kernel/initrd  copied out of the&#xD;
client, but that wouldn't get updated by any kernel updates  &#xD;
in the client. You can also replace the ROM in the Qemu, but &#xD;
I didn't want to change any of the packaged stuff.&#xD;
&#xD;
&lt;p&gt; My solution was to chain boot a gPXE with iSCSI support; I &#xD;
went to :&#xD;
&#xD;
&lt;p&gt; &lt;a href="http://www.rom-o-matic.net/gpxe/gpxe-&#xD;
git/gpxe.git/contrib/rom-o-matic/build.php" &gt;rom-o-matic&lt;/a&gt;&#xD;
&#xD;
&lt;p&gt; and selected .kpxe format, virtio-net for the NIC type, TFTP &#xD;
download protocol, SANBOOT_PROTO_ISCSI, AUTOBOOT_CMD, &#xD;
SANBOOT_CMD  and most of the other defaults and then added &#xD;
the following embedded script:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
ifopen net0&#xD;
dhcp net0&#xD;
chain /${ip}&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; rom-o-matic gives back an image file that I copied into &#xD;
/var/lib/libvirt/tftp on the host as a file called netboot.  &#xD;
When the client netboots it will load this new instance of &#xD;
gPXE that will then try and load a file based on it's IP, in &#xD;
my case I've got a file called 192.168.122.130 in &#xD;
/var/lib/libvirt/tftp on the host with the following &#xD;
contents:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
#!gpxe&#xD;
sanboot iscsi:192.168.122.129::::iqn.2010-&#xD;
05.org.treblig:server1.export.a.b&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; where the first part is the IP of the iSCSI server &#xD;
partition, and the second part is the identifier from the &#xD;
ietd.conf on the server.&#xD;
&#xD;
&lt;p&gt; Remember to set the Boot Options on the client to Network.&#xD;
&#xD;
&lt;p&gt; Now when I boot the client VM I boot all the way into Lucid &#xD;
client!&#xD;
&#xD;
&lt;p&gt; The boot process of the client is:&#xD;
&lt;pre&gt;&#xD;
   DHCP, PXE boot, tftp fetch the new gPXE&#xD;
   DHCP, fetch the /192.168.122.130 script&#xD;
   iSCSI boot off the remote disk&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; &lt;br&gt;&#xD;
Notes:&#xD;
  On the client there is a lot of iscsi config in /etc, and &#xD;
/etc/iscsi in particular, if you move the server after &#xD;
installation you'll have to fix up all of that and then fix &#xD;
up the initramfs by regenerating it - it'll pick up the &#xD;
/etc/iscsi/iscsi.initramfs&#xD;
&lt;/hr&gt;</description>
    </item>
    <item>
      <pubDate>Sun, 18 Feb 2001 20:12:49 GMT</pubDate>
      <title>18 Feb 2001</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=9</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=9</guid>
      <description>Ho hum; fancied posting a diary. 

&lt;p&gt; Top one of the weekend; don't try and build a cross compiler
from Alpha to 68k using an old host compiler; egcs-1.1.2
screws up some floating point stuff - that took me ages to
find.

&lt;p&gt; Now I'm just stuck with binutils fighting when it tries to
link.

&lt;p&gt; Fighting autoconf and its mates trying to conditionally
remove the win32 support in xine so I cna build it on Alpha.
</description>
    </item>
    <item>
      <pubDate>Sun, 6 Aug 2000 20:22:23 GMT</pubDate>
      <title>6 Aug 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=8</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=8</guid>
      <description>Hacked up one of he LCD panels fully off an old VGA card -
working quite nicely; although the inverter circuit we
cobbled together is a bit touchy. (Anyone with ideas for a
nice, safe, stable, cheap inverter for cold cathode
backlights please tell me!).

&lt;p&gt; A kludge with SVGAtextmode gave me something almost right -
although I face the option of loosing about 2 pixels off
either edge (I can choose, but I always loose a couple of
pixels...).

&lt;p&gt; Fighting Linux/ARM on the old platforms;  these machines
have unreasonably large 32K pages (and not many of them)  -
there are some very odd things happening in some places.
(Like a divide by 0 I got last week in fork_init).</description>
    </item>
    <item>
      <pubDate>Sun, 16 Jul 2000 16:00:27 GMT</pubDate>
      <title>16 Jul 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=7</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=7</guid>
      <description>Interesting weekend; Thursday saw the arrival of 20 640x480
10.4" LCD panels (sans light inverters and VGA interface and
case).

&lt;p&gt; Before the ManLUG talk on Saturday I managed to get cabling
from Maplin and other bits off a friend.  Saturday
evening/Sunday morning was crimping duty - without a crimp
tool.  Hellishly small crimps.

&lt;p&gt; Early on Sunday I managed to get the panel running off a VGA
feature connector (with just one colour wired) - looks
promising.

&lt;p&gt; Now if only I could array them.....

&lt;p&gt; Spent the rest of time fighting trying to get a modern ARM
cross compiler going,</description>
    </item>
    <item>
      <pubDate>Sun, 11 Jun 2000 19:41:31 GMT</pubDate>
      <title>11 Jun 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=6</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=6</guid>
      <description>Spent Saturday fighting with my Sparc/IPX to try and install
RedHat 6.2 on it.  It already had 5.2 on another disc but
since that disc was getting iffy I wanted a clean install.

&lt;p&gt; Unfortunatly Disk Druid managed to create a partition with
duff entries which seemed to indicate that it was around
1000 times larger than it really was.  It took me some hours
to discover this, and thus explain why mke2fs was taking
many hours and consuming about 180M of RAM.

&lt;p&gt; I selected 'server install' - and then spent a while
fighting with RPM to get all the GNOME stuff in afterwards. 
Hmm GNOME is not that responsive on an IPX with 32MB of RAM.

&lt;p&gt; I left it building XFree 4 over night; 14 hours later and it
had built and I managed to get it not to start; ho hum -
another X bug reported.

&lt;p&gt; The interesting revelation of the day was bought to me by
Owen Taylor.  I had found that large selections just didn't
work for me on Gnome on my Alpha - this turned out to be a
brokedness in Gtk which was hitting a rather nasty 64 bit
brokedness in X. Yuch!
</description>
    </item>
    <item>
      <pubDate>Sun, 14 May 2000 13:03:12 GMT</pubDate>
      <title>14 May 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=5</guid>
      <description>Downloaded KDE 1.90 over Friday/Saturday night (wonders
of free net calls - even if it does drop the line every 2
hours,
something which a retry on wget doesn't mind about).

&lt;p&gt; Built; hit problems.   It works fine if you let KDE take
over your entire system by letting it start its window
manager etc, but not
if I just want to run some apps under Gnome - no keyboard
input.

&lt;p&gt; Having said that, running it in KDE domination mode seems to
work
fairly well.  Koffice is promising - I wrote a set of slides
in kpresenter and it only crashed a few times.
(The fact that it stores documents as gzip'd tars of XML
files is great when you have to go out and fix something it
screwed up).

&lt;p&gt; You can see the result at: www.treblig.org/talks/xfree4</description>
    </item>
    <item>
      <pubDate>Sun, 19 Mar 2000 21:29:49 GMT</pubDate>
      <title>19 Mar 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=4</guid>
      <description>Got about midday.

&lt;p&gt; Found the two X builds nor the EGCS that I had set building
over night (over morning?) had built.  And I hadn't slept
well either.
Bummer.
EGCS seems to complain about a problem with the definition
of RUSAGE something - and this seems to be kernel version
dependent.

&lt;p&gt; Got two different failure modes for X with DRI; either X
segs internally, or I get a kernel oops in the drm_release
code.  Great.

&lt;p&gt; Found a way to hang 2.3.99-pre2-5 - open the Gnome window
manager configuration.  Really odd - it seems pretty stable
other than that......

&lt;p&gt; After those hangs, it came to me that I should be using a
journalling fs; waiting for a 34GB drive to fsck is just
painful.</description>
    </item>
    <item>
      <pubDate>Sat, 18 Mar 2000 23:23:54 GMT</pubDate>
      <title>18 Mar 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=3</guid>
      <description>Went to ManLUG; had a good chat and listened/watched a talk
on the GIMP and a rather interesting talk from a nice man at
SuSE who was handing out lots of goodies (got a Tux/suse
tie/pin - now I just have to work out where to wear it since
I don't often wear ties).

&lt;p&gt; Built 2.3.99-pre2-5 on my Alpha and built the sourceforge
CVS'd DRI version of X.  X ain't happy running with DRI on
my Alpha. Hmm.

&lt;p&gt; Vaguely started thinking about an XFree 4 talk I'm going to
give in a couple of months - hmm.</description>
    </item>
    <item>
      <pubDate>Sun, 12 Mar 2000 20:03:17 GMT</pubDate>
      <title>12 Mar 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=2</guid>
      <description>Got up at about 12.30 - yawn.....

&lt;p&gt; Built XFree 4.0; works a treat on my Alpha with my Voodoo 3
card; although I know some people are having problems with
MGA and Permedia cards.  Built GLUT and GLU to go with it
and tried one or two examples; uploaded the builds to my ftp
site.

&lt;p&gt; Carried on my mods to Elvis for a Gnome front end; managed
to get page up/down/home/end working and found a way to get
a signal before a menu appears (thus hopefully enabling me
to do a buffers menu).  Added a 'goto line' dialog box.

&lt;p&gt; Failed to figure out how to trap the closure of dialog boxes
when they are closed by the window manager - hmm.

</description>
    </item>
    <item>
      <pubDate>Sat, 4 Mar 2000 20:28:45 GMT</pubDate>
      <title>4 Mar 2000</title>
      <link>http://www.advogato.org/person/penguin42/diary.html?start=1</link>
      <guid>http://www.advogato.org/person/penguin42/diary.html?start=1</guid>
      <description>Spent an hour battering pppd into auth'ing itself with BT
internet - finally got it to work.  Seems fast, but it has
the annoying 2 hour disconnect problem.

&lt;p&gt; Built 2.3.49 on my Alpha; this seems good - its fast and
hasn't screwed up my disc!

&lt;p&gt; Built Mozilla M14 - well it got a window up; but some parts
were unrendered leaving bits of the lower windows showing
through, and after a minute or two it fell to bits.  Ah
Mozilla.
</description>
    </item>
  </channel>
</rss>
