- Details
- Category: Xen Howtos
I this tutorial we'll set up a Xen domU specifically for Zimbra because it likes to take over an entire machine. We'll also set up authenticated mail sending via gmails smtp servers and configure our router to forward requests to the appropriate domU. Lastly we'll use Apache on another machine (virtual or not) to proxy web connections to our DomU.
You will want to follow the Create a Centos virtual machine on Xen tutorial before continuing with these instructions. Once you have created your Xen Virtual Machine running CentOS5 proceed with this tutorial.
Preparing for installation
Before you install Zimbra you want to set the network settings and hostname. I would advise you to set a static IP address for the Virtual Machine as well as setting the hostname to something unique. If this Virtual Machine is behind a NAT you'll get errors about the DNS name not being able to be resolved. We can edit the /etc/hosts to get rid of those.
/etc/hosts
192.168.1.102 mail.soundlinuxtraining.com
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=mail.soundlinuxtraining.com
Edit system network settings - set IP address, Netmask etc.. and set the current hostname
system-config-network
hostname mail.soundlinuxtraining.com
service network restart
Shut down Sendmail to avoid conflicts on port 25
service sendmail stop
chkconfig sendmail off
Before installing Zimbra we'll install some of it's dependencies.
yum install fetchmail gmp compat-libstdc++-296 compat-libstdc++-33 libtool-ltdl
Installing Zimbra
We need to download Zimbra in order to install it.
- Details
- Category: Xen Howtos
A lot of this tutorial was stolen from the CentOS wiki - http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. I've shortened it by quite a bit to make it easier. I assume you know this already but you will need to be logged in as root or have root privileges in order to execute this tutorial.
Creating an Image
The first step is to create an image that will hold the domU virtual disk. Since this can just be a file filled with zeros, our usual friend dd comes in handy. The following command will create a /srv/xen/centos5.img file of 11GB, although the actual data blocks are allocated in a lazy fashion meaning that the disk image doesn't actually take up the whole 11GB until you fill it up. This is referred to as a sparse file.
dd if=/dev/zero of=/srv/xen/centos5.img oflag=direct bs=1M seek=10240 count=1
Preparing the Xen configuration file for installation
Xen uses one configuration file per domain. The configuration for the domain will be slightly different during the installation, because we have to provide installation kernels, and possibly some boot parameters. Here we download the installation kernel, ramdisk and xen config file.
- Details
- Category: Site News
In the past couple of months I've been trying out many Joomla! components, modules and plugins in order to make my site better. Problem is some of the components don't work together and I end up with broken links, debug code or error messages. People have complained and I have listened. Since I have my own server I've put up a virtual host and installed Joomla! on it as a sandbox. From now on I'll test all code on the sandbox until I think it's right and then roll it out on grantmcwilliams.com. It would be a lot easier if the components just did everything I wanted them to do (wouldn't that be nice!) but they don't. What's worse is the modules that I have to hack away on to make do what I want. There's no place on a production website for beta code so that too will be done in the sandbox.
I'll be moving the entire site off a dual Athlon MP 2600 server to a new dual dual core Xeon (that would be four 3 Ghz 64bit cores) rack server in the near future. PHP/MySQL/Apache and the OS will also be upgraded from CentOS 4.4 to CentOS 5.2 so everything will running in a confined SELinux domain. The RAID drives will be replaced by 1TB Samsung F1 drives on a 3ware 9550 PCI-X controller and RAM will be tripled so I'll be caching everything. I just need to complete the wiring and make sure it has adequate cooling before I move it. I have everything now but the TB drives which may wait until I'm back from holiday. I may move to FiOS as well which would get me a 15Mb/sec synchronous connection. Expect major speed increases from grantmcwilliams.com in the near future.
Also when I get back I'll be putting in a major effort coding the appropriate pieces of software for Joomla! that I need. Blogging/tagging needs to be better, the photo gallery needs a lot and the cookbook needs rewrote. Much to do...
Grant
- Details
- Category: Joomla!
The start of something great
- akocomment
- Bookmarks
- Jootags
- weblog ping
- article calender
- Details
- Category: Nokia Tablet
If you want to reflash your brand new Nokia n800/n810, follow the steps below:
- On the n800/n810 run the Backup/Restore app and backup all your data to a flash card
- On a Linux PC download the Linux flasher-3.0
- In the same directory download the latest firmware image. As of June 26th, 2008 it's Diablo:
- Make sure the battery of your n800/n810 is fully charged.
- Unplug the charger and switch off the Nokia n800/n810.
- Connect the tablet to your computer via USB without turning it on
- On the Linux PC execute as root:
./flasher-3.0 -F RX-34_DIABLO_4.2008.23-14_PR_COMBINED_MR0_ARM.bin -f -R
- It should display: "Suitable USB device not found, waiting" in the terminal window
- While holding the "home" button (the bottom one with the house on it), plug in the charger or push the power button.
- You should see the upgrade status on the n800/n810 after which it reboots automatically -- you're done now!
You might find that if you've stored the firmware and the flasher on a remote network filesystem you might get a permission denied message. If this happens just move both to a local filesystem until you're done flashing. Once you've written the firmware you'll want to configure networking and check for updates.
- Connect to a wireless network (may need to reconfigure network security)
- Start Application Manager - Settings -> Application Manager
- Enable Extras catalog - Menu -> Tools -> Application Catalog
- Insert flash card with recent backup
- Start Backup/Restore - System -> Backup/Restore
- Choose most recent backup and select the Restore button
- Select data to restore, make sure Application list is checked
- It will reboot when done
- Details
- Category: Site News
Some of you that have bookmarked a page or an RSS feed may have noticed that some things are being moved around so let me explain what's going on for now.
Search Engine Friendly
I've been wanting more Search Engine Friendly URLs. Here's an example. The first url is the replacement for the second - much nicer eh?
- http://www.grantmcwilliams.com/tech/programming/php
- http://grantmcwilliamso.com/index.php?option=com_content&task=category§ionid=9&id=68&Itemid=330
Not only that but I've been wanting much nicer blogging so I can have articles appear to be in more than one category without more work for me. For instance if I have an article that talks about Qemu and Xen I want it in both categories so people watching my RSS feed on Qemu will get articles that may have been under the Xen category before. Ideally someone could subscribe to a Virtualization RSS feed and get all posts in all Virtualization categories, ie. Xen, KVM, Vbox and Qemu. The problem is that Joomla! has a very limiting category system that only has two levels (Section and category) and an article can only belong to one category in one section. Dedicated blogging software like Wordpress handles this fine but doesn't integrate very well with Joomla! although I used it for about a year in the past. There is very little in the way of Joomla! blogging components but one looked very promising - MyBlog. It's a commercial component for about $45 that makes very nice looking blog posts, has RSS feeds and has tags so I can have an article be in many categories. However, it's mission statement reads something like this - "want to have all the positives and negatives of Wordpress in a Joomla! component". If I have a list of howtos then I have to keep them in the Joomla! category system in order to do a category list and tags don't work or I let MyBlog handle them but I can't have a category list at all and the format is very different.
If there's one complaint I have with Joomla! sites it's lack of consistancy. You'll see an article with all kinds of random urls and blocks of icons at the bottom which seem to change depending on where you are on the site. I want to avoid this if possible.
What Joomla Blogging should be like
I want this site to be so simple to navigate and use that anyone can use it. That means that the header of an article should have the
- Title
- poster (usually me),
- date
- tags
- gravitar (although not that important)
It should also give the option to
- make pdf
- Subscribe to RSS feed
The last thing is the footer of the article should have
- Read More button
- Comment link
- Social Bookmarking link.
I may be going down a track that I hadn't intended but all of the code for what I want is available now but it's not integrated so I'm thinking that if I took what was there, put it together into a unified project and made it work than we'd have a really good free blogging component.Following is my current list of what I'm playing with.
- Bookmarks
- JooTag
- Akocomment (or similar)
- gravitar
- JT Auto ping
If all of this code was wrapped up in one package I'd have just about everything I want in one component. I've been looking at the code for JooTag and I think it should be the starting point. It already has tagging buttons for the editor and will list tags under the article header. I need to add a nicer CSS to it, fix some linking bugs, make sure it works with the standard RSS feed links, and get it to either work with my JomComment or integrate a comment component into it. I don't think the gravitar support will be that hard and the Bookmarks module will be easy to merge into the JooTag footer.
Anyway so there's a lot of work going on here and I don't have a lot of time. If I don't get it done I may just deal with standard Joomla! categories because it's easy to roll things over to a tagging system later.
- Details
- Category: Photography Blog
So I'm going to be in Thailand for 3 weeks this summer and I've really been wanting to grab more video while I'm on holiday so I've combined these two things and decided I'd like to record video in less forgiving environments - namely in the rain and underwater. To do this I have several choices - get a waterproof case for my digital still camera that does video, get one of the three waterproof digital cameras on the market. I read all the reviews and I just bought a Sanyo Xacti E1.
Here are the specs:
The new waterproof SANYO Xacti E1 captures stunning digital video and beautiful 6MP photos...on land and underwater!
- Waterproof digital camcorder
- 6 Megapixel still photos
- 5x Optical zoom
- 2.5-Inch LCD display
- Up to 1hr. 20min. digital video per 1GB memory card
Practically four cameras in one, the Xacti E1 will become your camera for every picture and every video, everywhere! Take still photos and video above water as well as still photos and video underwater.
Amazing image quality is what you'll get with the Xacti E1. Its advanced 6.37-megapixel CCD image sensor allows you to capture stunning still images and high-quality digital videos with full-range stereo sound (even underwater!)
Easily share your photos and video. The Xacti E1 incorporates the highly advanced AVC/H.264 video compression, giving you better video quality with a reduced file sizes.
So it takes 6 Mpixel stills and records TV quality video. Most still cameras do both of those things so you're probably wondering how I justified spending $399 instead of $30 on a waterproof baggy for it. I have a few reasons for putting out the cash 1) h.264... What can I say the videos are great quality (not perfect) and take up 1/10 the space of my mjpeg videos 2) Stereo sound. I know the sound quality isn't going to be steller but at least it's stereo something that the digital still cameras can't do. 3) who wan'ts a bulky waterproof case around their point and shoot that makes it so large they can't get it in their pocket or a camera in a bag? The Xacti will still be small.
I guess in the past I've made compromises in order to save money and regretted it. I'll let you know what I think of it when it shows up. I should have it by Friday.
- Details
- Category: Creative Writing
Water. It's what's to drink. Water is used to replenish the body, to bathe in and to clean with. It's also something to wash your car with or splash about on a hot day. Water does what water does, it's the liquid that defines the term but on a much simpler level it's just a mixture of hydrogen and oxygen and even though tremendously useful is nothing more. Water is inanimate, not living, just a substance - or so I believed before that day – the day I went to sea.
The day in reference was the day I went to sea, the day that would change forever my views of our most abundant resource. Before that day my vision of water was that of a relatively insignificant element of our environment that occupied rivers and lakes and could always be sized up in a single glance. Even almighty Lake Michigan felt like as if it had an opposite shore even if it wasn't always visible. I was warned by those more experienced than I to take motion sickness a day before leaving the security of land. I of course viewed this as an overreaction because I was one of those people who could read a book in the back of a car on a winding hilly road with forest shadows splattering my page without incident. I figured that either way my breakfast was going to stay where I put it so there was no harm lost. Either because of this action or in spite of it I did well that day.
We met the boat before the sun peaked it's head from under the proverbial sheets of darkness. The boat pulled away from the pier and the water was a bit rough but overall my impression was that the voraciousness of the sea was overrated. Just as that thought had passed from my mind we rounded the breakers and the ocean's snarling face appeared! The hull or our 45 feet boat reared in the air and then crashed down upon the first of many waves. The ocean pushed us about like a raging river. Undeterred the captain headed directly into the waves hopefully aware of what he was doing and accompanying each wave rudely invading the deck was a 20 foot spray of water.
The prospective fishermen, myself included were huddled in the stern of the boat in view of our past but uncertain of our future. Following in our wake were some smaller cabin cruisers of about 30 ft. They were the kind you see "well to do" folks taking pleasure cruises on lakes with - the sort that sleep three or four comfortably below deck with little room left to squirm. Even inside our wake they were struggling to keep up and one by one they were unable to fight the opposing forces and turned back toward land until finally we were alone.
Land itself shrunk to the point where we could only see it when cresting a swell and then it too was no longer visible leaving us surrounded by an unfathomable expanse of water. Alone at sea I thought, how disturbing. The swells were 30 foot hills that we had to climb and once we got to the top the boat raced down the other side only for the diesel motor to spew a dark cloud of smoke into the air as the vessel strained to climb the next. Not completely alone, there were other boats, how many I don't know because they were impossible to count as you couldn't actually see any more than a few at a time. The swells were large enough that when at the bottom you could only see water beneath and next you. Even the early morning sun would disappear but as the boat would clamor to the top of a swell your vision would open up to miles of water and anything in it would appear before you. It seemed you could see the whole world but in fact only the other boats that had risen to the top as well were visible. Countless others were making their way down the swells or climbing out and for all practical purposes didn't exist, at least for a few moments at a time. The old adage about a tree falling in the forest with no one to hear it came to mind. If you're in the sea and nobody knows do you really exist?
When we got to our destination the boat appeared to stop. It's really impossible to know if you're moving on the ocean because the illusion of the current moving beneath you betrays your sense of motion. When the boat is not under power it appears as if it were still moving because the water under it is flowing by and in fact the vessel may be standing still or not - there's no real way to tell. I think that we were probably going with it toward the shore but at a slower pace. That's only a theory because I couldn't prove it if I had to. I also don't know for sure if the direction we were moving in really was toward the shore come to think of it. On the way out I tried to stay oriented as to the direction of land with the idea that it would calm my fears but after a few minutes things started to get turned around. Once you've lost your point of reference in the land you only have two things to keep you centered, the direction of the water and the position of the sun. After about 15 minutes the two of them no longer agreed and without a third witness I no longer knew the way to the safety of good old Terre Firma.
Things in the ocean are not measured on the same scale as things on land, a lesson I learned that day. The creatures themselves grow without the same physical limitations of space that restrict our familiar land animals. Blue whales dwarf anything existing on land including the largest dinosaurs from the prehistoric age. Even fish barely worthy of saving are fifty pounds. Coming from a place where a 10 inch trout was reason enough to go to town and boast at the local pub I didn't know what to think. The scale is so out of proportion that you lose your point of reference. Someone hauled in a giant King Salmon and the crew didn't even bat an eyelash. It was at that time the largest fish I'd ever seen but in comparison to a Blue Marlin or a Sturgeon it must have seemed like a minnow to the experienced fisherman.
After moving to several new locations for reasons only the captain knew since they were indiscernible to us we headed back toward land or or what we hoped was land and not toward being a statistic. Twenty fishermen lost at sea on a perfectly calm day was not what I wanted to see in the papers when I returned, if I returned. Perhaps being lost to a great battle with a giant sea monster that threatened peaceful life as we know it would have been more appropriate. But try as we might the sea monsters didn't come out to play.
The ride back was calmer and more serene. It was then that I realized something about the sea - it was alive. I'm not referencing the parasites that live off it like the crustaceans and fish or even the humans riding upon it's surface but the sea itself. In my little experience I had learned the sea could be angry at us and thrash us about when we came unto it uninvited, I saw it cross it's arms and sulk when we proceeded for hours with unwavering determination. I saw it happy, almost playful and accepting of us when it tossed us about as if we were a small toy. I swear I could hear giggles of audible glee emanate from it as it rocked us and watched the smiles come over our faces. Now on our return trip I saw something else in the sea, something I never knew was possible. The sea turned toward us and offered us it's hand. We'd gained it's respect and in turn it offered us safe passage home. I saw an animacy in the sea that day, I saw a living thing with personality. On the journey home the sea cuddled us like a small child, protecting us from the dangers that lie in wait. With each rolling wave we were gently carried over the crest and put down so very delicately to avoid harm. A close friend of the Sea from the beginning of time had appeared and was bathing us in it's warm rays of light - as if by association we'd gained another friend, the Sun. The ancients saw something in us that they admired but I'm not really certain what it was - in relation to them I felt like I barely existed - insignificant to the indescribable degree - barely more than nothing at all. How incredibly humbling..
As the sea carried us I stood on the bow and watched it rise up and heave us forward, powerfully carrying us on it's back like a mighty stead carrying a knight toward his destiny. Something had changed about it - it was no longer water, the stuff you drink, splash about in and satisfy your plants thirst with but rather one large entity, thick and powerful. It didn't seem thin and frail like water from the tap, it didn't splash or slosh but rather flowed slowly forward like it was heavier than liquid gold - it was massive and muscular to say the least and very much overwhelming. Although it's power on this earth is unequaled and with one crashing blow can wreak massive destruction it also has a tender side, a humane side. The sea is a very personal being with mood swings not unlike our own. During the first half of this journey I couldn't wait to return to the unmovable security of land but as it came into view it seemed, well, disappointing, so inanimate and lacking energy or feeling - in a word - lifeless. The place I'd always clung to was simply nothing but dirt and rock with little to give short of a place to stand - meaningless in comparison to the vibrant energy and power of the sea. As I stepped off the boat I turned to the sea and with regret and a tear in my eye I bid it farewell.
The following year I returned to the same location anxious to be reunited with my new friend but something was different. I came carrying arrogance and pride and neglected to take my medicine until the night before. The next day was spent either leaning over the side of the boat giving offerings to the sea or hiding in the galley. Myself and the sea I'd previously met never crossed paths and this time unlike the last I looked forward to land with great anticipation. I left the shore humbled and sad, saying nothing of my disappointment and have to this very day never returned. On occasion I wave from the security of land but the sea rightfully pays me no attention.
Grant McWilliams
- Details
- Category: Virtualization Blog
To convert a QEMU qcow format disk to VirtualBox vdi format you need to have Qemu installed. Qemu has tools to help convert disk formats.
grant@workstation:~$ qemu-img convert hda-qcow.img -O raw hda.imggrant@workstation:~$ VBoxManage convertdd hda.img hda.vdi
VirtualBox Command Line Management Interface Version 1.6.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
Converting VDI: from DD image file="hda.img" to file="hda.vdi"...
Creating fixed image with size 1024966656 bytes (978MB)...
This will convert a QEMU qcow format disk image to VirtualBox vdi format.
- Details
- Category: Virtualization Blog
The problem with Virtualization systems is none of them want to standardize on one particular disk format. Actually they all do, they want their format to be the standard.
- VMware has VMDK
- QEMU has qcow and qcow2
- UML has cow
- Parallels has HDD
- VirtualPC uses VHD
- VirtualBox has VDI
- Xen uses raw disk images
To make matters more confusing VirtualBox has some support for VMDK, Commercial Xen supports VHD, the open source Xen supports qcow2 and Qemu can convert between many formats. So what I'm doing about this is putting up a series of Howtos in the Tech -> Virtualization areas on how to convert and use various disk formats in different Virtualization systems. To start with I just put together the following two Howtos.