Grant McWilliams

 
  • Increase font size
  • Default font size
  • Decrease font size

Install Xen 3.2.1 on CentOS 5 the easy way

Posted by: grant in Untagged  on

grant

I just did a howto on compiling Xen 3.2.1 for CentOS5 but then I found this kernel and Xen rpms that you can just download and install.

 

For x86_64

  1. wget http://www.halsign.com/files/TurboGate-HTools-1.2-rhel5-x86_64.tar
  2. tar -xvpf TurboGate-HTools-1.2-rhel5-x86_64.tar
  3. cd TurboGate-HTools-1.2-rhel5-x86_64/
  4. rpm -ivh *.rpm
  5. reboot and select new kernel at grub prompt

For i386

  1. wget http://www.halsign.com/files/TurboGate-HTools-1.2-rhel5-i386.tar
  2. tar -xvpf TurboGate-HTools-1.2-rhel5-i386.tar
  3. cd TurboGate-HTools-1.2-rhel5-i386/
  4. rpm -ivh *.rpm
  5. reboot and select new kernel at grub prompt

I haven't as of yet used this new kernel and Xen but it might make it a lot easier than compiling Xen 3.2.1 from scratch.

 

 


Recompile Xen 3.2.1 for CentOS 5

Posted by: grant in Untagged  on

grant

CentOS 5.2/RHEL 5.2 comes with a very highly modified Xen 3.03 which if I'm correct is in fact Xen 3.1 backported. If you wan to use the latest Xen 3.2.1 you need to update the hypervisor. This tutorial is for x86_64 because that's what I'm running on grantmcwilliams.com. If you want the 32 bit version modify the appropriate paths and file names.

  1. rpm -i http://bits.xensource.com/oss-xen/release/3.2.0/centos-5.1/xen-3.2.0-0xs.centos5.src.rpm 2> /dev/null
  2. cd /usr/src/redhat/SOURCES ; wget http://bits.xensource.com/oss-xen/release/3.2.1/xen-3.2.1.tar.gz
  3. vi ../SPECS/xen.spec
  4. - Change "Version: 3.2.0" to "Version 3.2.1"
  5. - Change "Source0: xen-3.2.0.tar.gz" to "Source0: xen-3.2.1.tar.gz"
  6. - Uncomment "# /usr/lib/xen/boot/hvmloader"
  7. yum -y install transfig texi2html tetex-latex gtk2-devel libaio-devel gnutls-devel
  8. cd /usr/src/redhat/SPECS ; rpmbuild -ba ./xen.spec
  9. Grab some coffee...


... after the rpms are built do this

  1. vi /etc/yum.conf and temporarily set "gpgcheck=0" to "gpgcheck=1" since RPMs aren't signed.
  2. cd /usr/src/redhat/RPMS/x86_64 ; yum -y install xen-3.2.1-0xs.x86_64.rpm xen-libs-3.2.1-0xs.x86_64.rpm xen-devel-3.2.1-0xs.x86_64.rpm
  3. vi /etc/yum.conf and set gpgcheck back to "gpgcheck=1".
  4. edit /boot/grub/grub.conf and switch all references of /boot/xen-3.1.. to /boot/xen-3.2..

Now you can reboot and enjoy your new Xen 3.2.1.

 

 


Convert raw disk images to vdi format

Posted by: grant in Untagged  on

grant

If you're moving from a real server installation to a VirtualBox virtualized configuration you may want to take your real physical disk and just turn it into a virtual disk. There are advantages to creating a new disk and rsyncing your OS into it but this tutorial will show you how to make an exact copy of it. Note the exact copy will be the same size as the real physical disk so make sure you have enough drive space. This is most useful for Operating System images with shared storage for data. I wouldn't advise anyone to make a 1TB copy of their new drive and turn it into a VDI file!

To get the image from the disk use the dd command.

  1. dd if=/dev/hda of=./hda.img
  2. VBoxManage convertdd hda.img hda.vdi
grant@workstation:~$ dd if=/dev/hda of=./hda.img
grant@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 make an exact copy of /dev/hda to the raw image file hda.img. Then VBoxManage will convert the raw disk hda.img to hda.vdi for use with VirtualBox.







Migration complete!

Posted by: grant in Untagged  on

grant
grantmcwilliams.com has been migrated to a Xen Virtual Machine on the new server rack. I'll still be working on finding what doesn't work properly in the next few days so the ride may be a bit bumpy but hopefully by Monday things will be back to normal. I'll post specs on the new server later with pictures.

Grantmcwilliams.com outage

Posted by: grant in Untagged  on

grant

It seems the recent heat wave has wreaked havoc on my web server so I've been experiencing outages on grantmcwilliams.com. A new server has been built with a billion fans (sounds like the boeing plant) and I'm moving all virtual hosts to it now. I figure I'l have it up in the next couple of days. A virtualized Zimbra server is already up and running and now I'm building the webserver.

Thanks for your patience,

Grant


Xen disk images vs LVM

Posted by: grant in Untagged  on

grant

In setting up a Xen virtualized web server with about 15 GB of static files I questioned the wisdom of using a disk image as apposed to LVM. I read a bunch of forums about which is better and it seems the disk images are easier to manage because you can just copy to make backups etc.. LVM you just can't move it and pop it up whereever you want but you have more flexibility in resizeing and backing them up within the host OS. However what I didn't find on the forums is performance tests. People theororized about the speed difference but it seems nobodies sat down and done some tests. It's my goal that after summer vacation to put together a performance whitepaper comparing all the virtual machine solutions. For now I'll just put up xen disk images against LVM.

So I created a 10 GB empty disk image using dd and I created a 10 GB LVM Logical volume and assigned both of them to the domU.


name = "centtest"
memory = "512"
disk = [ 'tap:aio:/srv/xen/centos5.img,xvda,w', 'tap:aio:/srv/xen/centtest.img,xvdb,w', 'phy:/dev/vgsys/lvtest,xvdc,w' ]
vif = [ 'bridge=xenbr0', ]
bootloader="/usr/bin/pygrub"
vcpus=1
on_reboot = 'restart'
on_crash = 'restart'











Create a Zimbra mail server on Xen

Posted by: grant in Untagged  on

grant

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.










Create a Centos 5 virtual machine on Xen

Posted by: grant in Untagged  on

grant

Out of all things bad comes something good. I built a Zimbra server on Centos in a Xen virtual machine and it was working perfect. I then went on to replace my Apache webserver with another Xen virtual machine and proceeded to wipe out my mailserver disk image. Since I have to start from scratch I might as well write a tutorial... A lot of this tutorial was stolen from the CentOS wiki - http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU.

I've modified a few things and made it a bit more streamlined. This is what I'll use as a base for all future Xen tutorials here.

 

Creating an Image

The first step is to create an image that will hold the domU virtual disk. Since this can just be a raw zero-filled file, our usual friend dd becomes handy. In this howto we will put images in /srv/xen. If you would like to allocate disk blocks as the file grows, you can create a file with a hole. The following command will create a /srv/xen/mailserver.img file of 11GB, although the actual data blocks are allocated in a lazy fashion:

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 a 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. You will need an domU installation initrd image and kernel. Depending on the machine architecture, both can be downloaded from:


Sandbox

Posted by: grant in Untagged  on

grant

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


Upgrade Nokia n800/n810 firmware to Diablo

Posted by: grant in Untagged  on

grant

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

 






  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  5 
  •  6 
  •  7 
  •  8 
  •  9 
  •  10 
  •  Next 
  •  End 
  • »
We have 3 guests online