LUG Community Blogs

Richard WM Jones: 20130418_145150.jpg

Planet GLLUG - Thu, 18/04/2013 - 13:55

The cabin has a double wall which will contain insulation. Shown here is the ring main for the four sets of sockets around the room.


Categories: LUG Community Blogs

Richard WM Jones: 20130417_170829.jpg

Planet GLLUG - Thu, 18/04/2013 - 12:17

This trench will take 1 armoured mains cable and 2 cat 7 network cables.


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Wed, 17/04/2013 - 13:31

Also (not shown) they dug a trench down the side of the garden for electrics and network cables. We’re going to run some hefty armoured cable, plus two or three cat 7 network cables, covered with bricks and warning tape, at a depth of 18″ (mandated by building regulations).


Categories: LUG Community Blogs

Richard WM Jones: office-3

Planet GLLUG - Tue, 16/04/2013 - 15:11

As some readers might know, I work from home, and have worked from home for about 12 years. However I’ve never had a proper dedicated office, just a corner of a second bedroom or a bit of space on a sofa. That’s about to change.

Tomorrow, work starts on constructing a real office in my garden.

Work already started (for me) about a month ago, when I took down a shed and jack-hammered a patio to bits:

Shifting the whole lot into two skips:

Resulting in this empty, mostly flat space (about 20′ wide and 16′ deep, damn you council for chopping that tree down at the back …):

To be continued …


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Tue, 16/04/2013 - 14:23

New in libguestfs ≥ 1.21.30 is the ability to use guestfish and some of the virt tools with remote disks.

Currently you can use remote disks over NBD, GlusterFS, Ceph, Sheepdog and (recently upstream) SSH.

For this example I’ll use SSH because it needs no setup, although this requires absolutely the latest qemu and libguestfs (both from git).

Since we don’t have libvirt support for ssh yet, so this only works with the direct backend:

$ export LIBGUESTFS_BACKEND=direct

I can use a ssh:// URI to add disks with guestfish, guestmount and most of the virt tools. For example:

$ virt-rescue -a ssh://localhost/tmp/f17x64.img [... lots of boot messages ...] Welcome to virt-rescue, the libguestfs rescue shell. Note: The contents of / are the rescue appliance. You have to mount the guest's partitions under /sysroot before you can examine them. ><rescue> mount /dev/vg_f17x64/lv_root /sysroot ><rescue> cat /sysroot/etc/redhat-release Fedora release 17 (Beefy Miracle)

Apart from being a tiny bit slower, it just works as if the disk was local:

$ virt-df -a ssh://localhost/tmp/f17x64.img Filesystem 1K-blocks Used Available Use% f17x64.img:/dev/sda1 487652 63738 398314 14% f17x64.img:/dev/vg_f17x64/lv_root 28316680 4285576 22586036 16% $ guestmount -a ssh://localhost/tmp/f17x64.img -i /tmp/mnt $ ls /tmp/mnt bin dev home lib64 media opt root sbin sys usr boot etc lib lost+found mnt proc run srv tmp var $ cat /tmp/mnt/etc/redhat-release Fedora release 17 (Beefy Miracle) $ guestunmount /tmp/mnt
Categories: LUG Community Blogs

Rev. Simon Rumble: Snorkelling photos

Planet GLLUG - Mon, 15/04/2013 - 22:41

I've been getting into snorkelling a bit recently. I've always enjoyed it but recently I bought some good quality gear, replacing the toy shop crap I've been using. It's another world with good equipment! It's not easy to get time, but so far I've snorkelled Jervis Bay, Bushrangers Bay, Clovelly and The Haven in Terrigal.

My son has been asking what it's like, so I bought the Kogan waterproof camera case for $19. Took it out last weekend for a spin at The Haven but the visibility was terrible. The camera case works a treat though, and I'm looking forward to using it some more. Need to work out a strap to attach it to my arm or something though.

See the full gallery on Posterous

Permalink | Leave a comment  »

Categories: LUG Community Blogs

Karanbir Singh: Vault.centos.org changes

Planet GLLUG - Thu, 11/04/2013 - 23:08

Hi,

In the last 45 days, Vault.centos.org's 2 public facing machines delivered just under 66 TiB of data. So while we try and spread this load a bit ( its growing at 25 - 35% month on month ), we've had to make a few changes.

Firstly, isos are no longer directly downloadable from vault.centos.org, you will need to go the torrent route if you want older, deprecated release isos

Secondly, we've turned off multi range requests ( httpd will still accept upto 5 range's, and then block after that )

Over the next few days, we are going to recycle some of the larger disk mirror.centos.org nodes into vault.centos.org; If someone wants to contribute to this effort, please come find us on irc.freenode.net in channel #centos-devel or #centos-mirror or tweet us @centos or email us the address mentioned at http://wiki.centos.org/Donate - but keep in mind that need machines with more than 1 TiB of usable space, and more than 300mbps of network capacity, and since we will consume that bandwidth high density hosting facilities with high contention on the links wont work.

- KB

Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Fri, 05/04/2013 - 20:56

The qemu ssh block device is now up to version 7 … although sadly not upstream yet.

Nevertheless by applying this patch to libguestfs you can use libguestfs to access remote disks over ssh:

$ export LIBGUESTFS_QEMU=~/d/qemu/qemu.wrapper $ export LIBGUESTFS_BACKEND=direct $ ./run ./fish/guestfish Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> add /tmp/f17x64.img readonly:true format:raw \ protocol:ssh server:onuma ><fs> run 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00 ><fs> inspect-os /dev/vg_f17x64/lv_root ><fs> inspect-get-product-name /dev/vg_f17x64/lv_root Fedora release 17 (Beefy Miracle) ><fs> list-filesystems /dev/sda1: ext4 /dev/vg_f17x64/lv_root: ext4 /dev/vg_f17x64/lv_swap: swap ><fs> mount /dev/vg_f17x64/lv_root / ><fs> cat /etc/redhat-release Fedora release 17 (Beefy Miracle)

Everything just works as if this were a local disk.

There are a couple of minor caveats (the major caveat being none of this is upstream): Firstly you have to have ssh-agent set up. Secondly the remote host must be in your known_hosts file (if not, do ssh remotehost first to add it).


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Thu, 04/04/2013 - 20:47

Although grub support in libguestfs is currently on hold because of an unfortunate situation, the latest libguestfs now supports SYSLINUX and EXTLINUX, which is (let’s be frank about this) a much simpler and more sane bootloader than grub/grub2.

In fact, you can make a bootable Linux guest real easily now. Here’s a script:

#!/usr/bin/perl # Copyright (C) 2013 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # This ambitious script creates a complete, bootable guest. use strict; use warnings; use Sys::Guestfs; my $disk = "syslinux-guest.img"; # Find prerequisites. my $mbr = "/usr/share/syslinux/mbr.bin"; unless (-f $mbr) { $mbr = "/usr/lib/syslinux/mbr.bin"; unless (-f $mbr) { die "$0: mbr.bin (from SYSLINUX) not found\n"; } } print "mbr: $mbr\n"; my $mbr_data; { local $/ = undef; open MBR, "$mbr" or die "$mbr: $!"; $mbr_data = <MBR>; } die "invalid mbr.bin" unless length ($mbr_data) == 440; my $kernel = `ls -1rv /boot/vmlinuz* | head -1`; chomp $kernel; unless ($kernel) { die "$0: kernel could not be found\n"; } print "kernel: $kernel\n"; print "writing to: $disk ...\n"; # Create the disk. unlink "$disk"; open DISK, ">$disk" or die "$disk: $!"; truncate DISK, 100*1024*1024; close DISK; my $g = Sys::Guestfs->new (); $g->add_drive ($disk, format => "raw"); $g->launch (); unless ($g->feature_available (["syslinux"])) { die "$0: 'syslinux' feature not available in this version of libguestfs\n"; } # Format the disk. $g->part_disk ("/dev/sda", "mbr"); $g->mkfs ("msdos", "/dev/sda1"); $g->mount ("/dev/sda1", "/"); # Install the kernel. $g->upload ($kernel, "/vmlinuz"); # Install the SYSLINUX configuration file. $g->write ("/syslinux.cfg", <<_END); DEFAULT linux LABEL linux SAY Booting the kernel from /vmlinuz KERNEL vmlinuz APPEND ro root=/dev/sda1 _END $g->umount_all (); # Install the bootloader. $g->pwrite_device ("/dev/sda", $mbr_data, 0); $g->syslinux ("/dev/sda1"); $g->part_set_bootable ("/dev/sda", 1, 1); # Finish off. $g->shutdown ();

After running the script, you can try booting the minimal “guest” (note it only contains a kernel, not any userspace):

$ qemu-kvm -hda syslinux-guest.img
Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Tue, 02/04/2013 - 15:40
Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Sun, 31/03/2013 - 17:35

I have no objection if you want to get up an hour earlier. I don’t even object if you think it makes the daylight longer / gives you more sunlight / or whatever silly reasoning you have. Just don’t make me do it too, ‘m kay?


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Sat, 30/03/2013 - 14:16

The video of Richard Harman’s talk is now online at YouTube. Interesting use of virtualization and tools to analyze malware (in Windows VMs).

Previously.


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Thu, 28/03/2013 - 19:43

Starting in libguestfs ≥ 1.21.23-2, bash tab completions of guestfish, guestmount and virt-* tools have been rewritten and greatly improved.

Note you will need to install the libguestfs-bash-completion package to enable this feature.

You can now tab complete all long options on most tools:

$ virt-df --[tab] --add --domain --human-readable --uuid --connect --format --inodes --verbose --csv --help --one-per-guest --version $ virt-resize --[tab] --align-first --help --no-extra-partition --alignment --ignore --ntfsresize-force --debug --lvexpand --output-format --debug-gc --lv-expand --quiet --delete --LVexpand --resize --dryrun --LV-expand --resize-force --dry-run --machine-readable --shrink --expand --no-copy-boot-loader --version --format --no-expand-content

Where appropriate, the -d option will now expand to the list of libvirt domains:

# virt-df -d [tab] archlinux20121201x64 f19rawhidex32 f18x64 f19rawhidex64

Finally, guestfish commands are expanded on the command line:

$ guestfish add /tmp/disk : run : list-[tab] list-9p list-events list-md-devices list-devices list-filesystems list-partitions list-disk-labels list-ldm-partitions list-dm-devices list-ldm-volumes

To make this less intrusive, so you can really use it daily, I left the default readline expansions enabled. This means that filenames and so on can continue to be used in every position on the command line, and should mean that bash completions won’t try to be cleverer than the user.

Libguestfs bash completions are also demand-loaded now, so that if you’re not using them, they don’t consume any resources in the shell.


Categories: LUG Community Blogs

Dean Wilson: Cisco Routers for the Desperate (2nd edition) - Short Review

Planet GLLUG - Mon, 25/03/2013 - 16:25
Reviewing the second edition of Cisco Routers for the Desperate was quite hard for me as I have very little to add to the Cisco Routers for the Desperate 1st edition review I posted a few years ago. After reading through this update pretty much all those comments still stand. It's an excellent, useful, well written book and the author still has a -distinct- written tone.

I enjoyed the book; I must have considering I bought the second edition! The material has been updated where needed and it's still lacking a section on ACLs so I'll stick to my score of 8/10 for people purchasing this book for the first time and look forward to another refresh in a couple of years time. If you already own the first edition then your choice is a little harder - this book is still an excellent stepping on point for the cost but don't expect much beyond a refresh on the same content.

Disclaimer: Part of my previous review is quoted in the marketing blurb at the front of the book. I did however pay for this book myself.

Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Sat, 23/03/2013 - 14:03

This is an excellent paper classifying bugs in Linux filesystems. The results seem to be generally applicable to bugs in open source kernel code.


Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Thu, 21/03/2013 - 14:12

I wrote a small patch (intro, patch) which adds a Secure Shell (ssh) block device to qemu. With this patch you could access a remote disk image or device by doing:

qemu -drive file=ssh://host/path/to/file,if=virtio,cache=none

QEMU ssh’es into “host” and opens /path/to/file. For the initial version of this patch you will need to set up ssh-agent access to the remote server.

The motivation behind this patch is to allow libguestfs to access remote disks using ssh the same way we already do with NBD. Secure Shell is ubiquitous, so for the majority of users libguestfs-over-qemu/ssh would let them use disks remotely with zero configuration.


Categories: LUG Community Blogs

Karanbir Singh: Announcing the CentOS Dojo at Antwerp 2013

Planet GLLUG - Wed, 20/03/2013 - 11:18

Hi,

The first ever CentOS Dojo, a one day training and socalising day dedicated to CentOS and how people use it, will be held at Antwerp, Belgium on the 8th of Apr.

You can see the great speaker lineup on the events page at : http://wiki.centos.org/Events/Dojo/Antwerp2013 - we have tried to cover all the major conversation areas around CentOS these days. Ranging from provisioning, management, app deployments, system and virtualisation tuning, virtual infrastructure and more.

Its going to be a great day, register up, and see you all there. And remember, there is an exclusive CentOS Dojo Tshirt for everyone who attends ( plus, there might be more goddies too ).

Jump directly to the registration page : http://centosdojoantwerp2013.eventbrite.com/

- KB

Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Mon, 18/03/2013 - 12:59

This script below lets you test changes while continuing to work on code. Let’s say that your test suite takes quite a while to run (hello, libguestfs). You can do:

$ test-change make check

The script copies the whole current directory into a temporary directory and runs the check in there. You still have to open a new terminal to run the tests, but the tests can go ahead while you continue working.

#!/bin/bash - # Copy current directory to a temporary, # then run the test command on that copy, # and report the results. # by Richard W.M. Jones <rjones@redhat.com> # # Usage (from current directory): # test-change command [args ...] # eg: # test-change make check echo "Copying original directory; wait a moment ..." d=`mktemp -d` trap "rm -rf $d" EXIT INT TERM QUIT cp -a . $d cd $d echo "Original directory copied, starting test." echo "You can carry on working now." sleep 1 # Run the test command. "$@"
Categories: LUG Community Blogs

davblog - Dave Cross: Liverpudlian MPs

Planet GLLUG - Sat, 16/03/2013 - 11:31

Back in the day, when I grew up on my Liverpool council estate every member of Liverpool City council was Conservative. The city had eight Conservative MPs.

This is Nadine Dorries writing on Conservative Home a couple of days ago. She should really learn that if she doesn’t check her facts, then someone else will. You’ll be shocked, I suspect, to hear that this information is less than completely true. To me, it looks like Liverpool never had more than six Tory MPs while Dorries was growing up there.

Dorries was born in 1957. So let’s look at the 1955 general election and see which MPs were elected in Liverpool then. Liverpool has nine MPs, six of which are Tory. None of the seats changed hands in 1959. In 1964, however, the Tories lost four seats, taking their total down to two. This number remained constant in 1966 and 1970. The Tories lost another seat in February 1974 and remained steady on only one seat in October. Finally, in 1979 (when Dorries is 22 – so I’m not sure it still counts as while she was growing up) the Tories doubled their number of seats to a rather unimpressive two.

So Liverpool never had more than six Tory MPs – al least not while Dorries was growing up there. But she thinks that she can just throw a fact into an article like that and people will just accept it’s true.

You should never trust a word that Dorries writes. She has frequently been proven wrong on details like this.

p.s. Tim Fenton has run this analysis too and has reached similar conclusions. And, surprise surprise, he finds that her claims about the council are nonsense too.

Related Posts:
Categories: LUG Community Blogs

Richard WM Jones: rich

Planet GLLUG - Sat, 16/03/2013 - 10:47

It’s always been possible, but clumsy, to access Network Block Device (NBD) disks from libguestfs, but starting in libguestfs 1.22 we hope to make this (and Gluster, Ceph and Sheepdog access) much simpler.

The first change is upstream in libguestfs 1.21.21. You can add an NBD disk directly.

To show this using guestfish, I’ll start an NBD server. This could be started on another machine, but to make things simple I’ll start this server on the same machine:

$ qemu-nbd f18x64.img -t

f18x64.img is the disk image that I want to export. The -t option makes the qemu-nbd server persistent (ie. it doesn’t just exit after serving the first client).

Now we can connect to this server using guestfish as follows:

$ guestfish Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> add-drive "" format:raw protocol:nbd server:localhost ><fs> run

The empty "" (quotes) are the export name. Since qemu-nbd doesn’t support export names, we can leave this empty. The main change is to specify the protocol (nbd) and the server that libguestfs should connect to (localhost, but a remote host would also work). I haven’t specified a port number here because both the client and server are using the standard NBD port (10809), but you could use server:localhost:NNN to use a different port number if needed.

Ordinary guestfish commands just work:

><fs> list-filesystems /dev/sda1: ext4 /dev/fedora/root: ext4 /dev/fedora/swap: swap ><fs> inspect-os /dev/fedora/root ><fs> inspect-get-product-name /dev/fedora/root Fedora release 18 (Spherical Cow)

The next steps are to:

  1. Add support for more technologies. At least: Gluster, Ceph, Sheepdog and iSCSI, since those are all supported by qemu so we can easily leverage that support in libguestfs.
  2. Change the guestfish -a option to make adding remote drives possible from the command line.

The obvious [but not yet implemented] way to change the -a option is to allow a URI to be specified. For example:

$ guestfish -a nbd://localhost/exportname

where the elements of the URI like protocol, transport, server, port number and export name translate naturally into parameters of the add-drive API.


Categories: LUG Community Blogs
Syndicate content