Archive for the ‘virtualization’ Category

xen filling up /var/ partition

Sunday, May 4th, 2008

So the other day I noticed my /var partition filled up in on my Dom0. One of the symtoms was not allowing me to start up any more DomU’s. So I tracked the disk usage to /var/lib/xen/save. There were files of each of my running dom u’s here which were the culprit.

Apparently, on a Debian system, upon a shutdown of the Dom0, Xen attempts to take a snapshot of the running DomU instead of issuing a shutdown command across all the DomU’s. This snapshot is stored in - you guessed it - /var/lib/xen/save - and is controlled by the XENDOMAINS_SAVE parameter in /etc/default/xendomains. In order to disable this future and always execute a shutdown of DomU’s during a shutdown of the Dom0, you can set XENDOMAINS_SAVE=”". The corresponding restore command is controlled by XENDOMAINS_RESTORE parameter. It is also safe to delete these files provided you have a newer instance of the DomU.

After realizing this I changed the path of where the running domains are stored to in case of a shutdown to a partition with sufficient space to hold the running instances. I also set the XENDOMAINS_RESTORE=true.

Thanks to the helpful individuals on the xen-users mailing lists for the info.

Xen - Disk based Dom-U Cloning

Thursday, February 28th, 2008

Heres a quick little script for automating the creation of Dom-U’s and there corresponding configuration files. Nothing to fancy, but it helps for users who may be unfamiliar with the process or just need to fire up a new Dom-U quickly without going thru an installation process.

This script assumes that when you first build a Dom-U either by d’bootstrapping or windows installation or whatever it may be, you shut the Dom-U down and move the “template” to /home/xen/templates and that your running Dom-U’s are running from /home/xen/domains . Lastly make sure the template configuration file has the <> strings so sed can replace them with your intended variables. This can be extended as you see fit, if you need to change values for networking, kernel, etc… Happy cloning.

./clone.sh

#!/bin/bash

function syntax {
           echo "Syntax: ./clone.sh source_image destination_image memory(mb)"
           echo " where source_image is the name of the directory in this folder                                                              "
           echo "  destination_image is the name of your new DomU "
           echo "  and memory(mb) is the ammount of memory you want to provision                                                              ."
           echo ""
           echo "Example: ./clone.sh debian_etch_x86 v-debian-etch-x 512"
           echo "Example: ./clone.sh winxp_pro_x86 v-winxp-pro-x 512"
}

if [ $1 ]; then
        if [ $2 ]; then
                if [ $3 ]; then
                        echo "Cloning Template $1 to DomU $2 with $3 MB of memor                                                              y."

                        echo "Copyig Disk Images... This will take a few minutes                                                              ..."
                        cp -R /home/xen/templates/$1 /home/xen/domains/$2

                        echo "Creating Configuration file."
                        sed 's/<domU>/'"$2"'/' /home/xen/templates/$1/$1.cfg > /                                                              home/xen/domains/$2/$2.cfg.tmp
                        sed 's/<domU-mem>/'"$3"'/' /home/xen/domains/$2/$2.cfg.t                                                              mp > /home/xen/domains/$2/$2.cfg
                        echo "Cleaning up temporary files..."
                        rm /home/xen/domains/$2/$2.cfg.tmp
                        rm /home/xen/domains/$2/$1.cfg
                        echo "All Done."
                else
                        syntax
                fi
        else
                syntax
        fi
else
        syntax
fi

./template.cfg

kernel = ‘/boot/vmlinuz-2.6.18-5-xen-vserver-amd64′
ramdisk = ‘/boot/initrd.img-2.6.18-5-xen-vserver-amd64′
memory = ‘<domU-mem>’
root = ‘/dev/sda1 ro’
disk = [ ‘file:/home/xen/domains/<domU>/disk.img,sda1,w’,
‘file:/home/xen/domains/<domU>/swap.img,sda2,w’ ]
name = ‘<domU>’
dhcp = ‘dhcp’
vif = [ ” ]
on_poweroff = ‘destroy’
on_reboot = ‘restart’
on_crash = ‘restart’

Recipients Reputation…

Monday, December 3rd, 2007

As an administrator who works for an email provider that processes millions of emails per day, new spam fighting techniques are always of interest to me. Tonight I came across this article on slashdot.

The technique is based on a patent-pending mathematical algorithm based on the readers reputation of receiving legitimate email to spam email as opposed to scanning the content of a message. The company Abaca Technology Corp. is claiming a 99% accuracy rating and backing it with a money back guarantee. The appliances are being targeted to small to mid size organizations however on their faq they do mention their technology is being utilized by large ISP’s.

The company provides several appliances. As an alternative to the appliance, they also offer virtual appliances for VMWare ESX which may be useful for larger organizations to scale the technology on beefier hardware.

I don’t see this as a magic bullet to the spam problem as the economic incentive is still there to spammers. But adding a new technology to a spam fighters arsenal is always welcome.

If only Mr. Kirsch would release this as an open-source technology instead of patenting the algorithm, besides he is already a multi millionare.

So what do I run…

Monday, November 26th, 2007

With that said… (see previous post)

I use Windows XP Pro as my desktop operating system of choice and haven’t seen the reason to make the move to Vista yet, although I will be investigating more in the near future with Windows Server 2008 looming around the corner. I find myself to be more efficient and comfortable, in a windows desktop environment than I do in either GNOME or KDE, although I feel right at home in a GNOME enviornment. Although Mac was probably the first OS I ever used, I grew up using W indows and it feels like home to me. However, I do tend to run unix-like virtual machines on top of my desktop to allow me some flexibility. Also, I run a dual booting, Windows XP/linux configuration on my laptops. Never know when your gonna need what. I like to keep my options open.

I have run a MacOSX laptop in the past but at the present I have not had the luxury.

On the server side of things, I run both Windows and Unix-Like, depending on the situation, client, customer, requirements, etc. On the Windows side I run Windows Server 2003, of course, in its different flavors. On the Unix-Like side my Linux OS of choice for production is Debian, however I am a linux hobbyist and have ran most major Linux flavors including Ubuntu, Slackware, Gentoo, Suse, and Redhat based operating systems at one point or another. My BSD of choice for servers is FreeBSD, but I use OpenBSD for the network infrastructure such as routers and firewalls.

Again, I have closed commenting on this page as to not insite a flame war. This is what I run.