Got Wills

Tag: os

Virtual Machine Additions for Linux on OpenSuse 10.2

by phil on Mar.21, 2007, under Development

Update: Since Microsoft has removed the scripted install from the VMA for Linux package, I’ll make the one I used when writing this article available. Keep in mind that Microsoft claims that the new RPM’s are compatible with Suse 10, so you may want to try those first. Virtual Machine Additions for Linux

This started as a simple project of keeping the time on my server correct. This would not only ensure that the post times were accurate, but also, I would be able to tell when people were reading my blog and such. NTP wouldn’t work, it might work once, but soon the clock was way off again. I found the reason to be that some algorythm for detecting lost ticks causes NTP to make the clock run much faster on the virtual machine than it should. I also found another NTP-ish utility that polled the chosen NTP server every couple of minutes, or so. This looked promising, but they noted that you should own the NTP server that you are polling as this will generate a lot of traffic.

After searching for hours I found that Microsoft had a beta Virtual Machine Additions for Linux. This is just what I was looking for… it includes time synchronization, not to mention the better hardware virtualization, offline shutdown, and the heartbeat (sort of a status monitor). Suse 10.2 wasn’t in the list of supported operating systems, but Suse 10.0 was… how different could they be, right? Yea, right. Further confusing the issue, the readme file states, “The Additions installation is guarenteed to work only on target systems where no manual changes have been performed to the system configuration after installation of the virtual machine.” Well, I was making manual changes within an hour of installing the virtual machine. Just another obstacle, if it were easy, everyone would have suse 10.2 running their web server from a virtual machine :) .

Well, I got onto the Virtual Server configuration page and told it to install virtual machine additions (after upgrading to Virtual Server 2005 R2 Service Pack 1 Beta and running the msi file that came for VMA for linux… of course). Now don’t get me wrong… I had no delusions that it would be as easy as checking a little box in a browser page, and right I was.

Well that little checkbox is pretty stupid… there must be very little logic behind it, since it was fairly obvious that Virtual Server knew I wasn’t running Windows as my guest OS, it still loaded the Windows VMAdditions iso in the virtual drive. Of course, I had to figure out how to mount the CD-Rom before I found that out. Did I mention, I’m still a newbie with linux, sure I can get around the command line some, but with most things, I am clueless. I added the necessary line to my fstab and mounted it… all as root… of course. However, I had left my limited account logged in and on the mount point. This wasn’t a big deal until I found out that simply inserting the correct iso would not give me access to it. So naturally, I try to umount… it fails. After trying unmount for about an hour, unsuccessfully. I am giving up for now. Wait a minute, after exiting the root login, I found the problem I noted above. So, I cd home, su and try again… SUCCESS! I have access to 5 or 6 rpm’s and a shell script. I instinctively try to run the shell script, but don’t have execute permissions, so I move it to the hard disk and set the permissions. Okay, now I’m ready to try again.

Well, I got a kernel error, hmph. Okay, that’s to be expected… afterall, I’m not using a supported version of linux. I tried the rpm and got excited when it didn’t show any errors, this excitement was quickly followed by disappointment when I checked the log and found the same error. Well, the error said I may not have my kernel source, so I say to myself, “Self, if you were the kernel source, how would you like to be installed?” Why, Yast… of course. After a quick little yast2 -i kernel-source, I had the source files. Great, but the error remains.

Okay, okay, there was also a reference to a file in the error message, /lib/modules/2.6.18.2-34-default/build/MAKEFILE. Well, let’s see what’s there. Just a single file existed in the build directory… and it wasn’t called MAKEFILE, so began my search of the web, which continued for days. I was trying all kinds of things that various sites said to try. In most of the forums that I saw suggestions, the person having trouble did eventually get it to work, but they were also using supported distributions of linux. Needless to say, their suggestions only helped by helping me to eliminate possible problem/solution scenarios.

I was just about ready to give up and had already started researching other ways to help my server keep time, when I decided to look around and try to find the MAKEFILE myself. It took a ls -laF in the /lib/modules/2.6.18.2-34-default directory for me to realize that the build directory is just a symbolic link… wait, I’m not looking in the right place. So I skip on over to /usr/src/linux-2.6.18.2-34-obj/i386/default (where the link was pointing).

Well, there’s nothing of note here. So I start checking the parent directories and lo and behold, in /usr/src there is another linux source directory, 2.6.18.8-0.1-obj. So, I look and sure enough, there is an i386/default, as well… and it has a MAKEFILE. WOOHOO! Hold on now, don’t get too excited, we still need to find a way to make the install script look here for it.

Altering the script is out… it’s CRC’d and MD5′d, and I don’t know enough about it to take the checks out, or even update them to be correct. Oh yea, it’s a symbolic link… I can make a new one. Well, after mv build build1, I needed to create the symbolic link, something I’ve never done before. I tried different commands for an hour before I finally came up with ln -T /usr/src/linux-2.6.18.8-0.1-obj/i386/default -s /lib/modules/`uname -r`/build. Nice, I got a symbolic link. So, I cross my fingers and run the install script… SUCCESS. Now, there are still a lot of warnings in the log file, but it installed. A simple /etc/init.d/vmadd start verified it.

In Yast, once again. I navigated to the System Menu, then to System Service (runlevel). In there I was able to see 5 services that started with vmadd. The start at runlevel for all of them is set to 3 and 5… looks good, except vmadd-scsi, which I don’t need, so I unchecked the 3 and 5. Then, I proceeded to start each of the other services. As soon as I had, I saw the Virtual Server admin screen change to accomodate for the installation. I quit yast and issued the date command… IT’S RIGHT, the time and date are right on. WOOHOO!

So, while it wasn’t easy, it is certainly very possible, even for a linux beginner like myself. I’ll give as full of a list of commands to get it working as I can. Just click the link if you don’t see the code section below. (continue reading…)

2 Comments :, , , , , more...

Up and Blogging on Suse 10.2 via Virtual Server

by phil on Jan.16, 2007, under Software

Well, I got it all working, well mostly. The blog is now hosted on my virtual Suse 10.2 server. The only issue that I’m still having is getting the colors of my header correct, it doesn’t seem to take any adjustments I make. I probably just need ImageMajik or something like it. I’ll check it when I get a few minutes.

I only dedicated 128 MB RAM to the server and it seems to be doing fine (thank you textmode). Instead of Apache, I’m now using LiteSpeed as my Web server. It’s supposed to work a lot better with Ruby on Rails. While there were a few stumbling blocks along the way, it was a lot easier than I thought it would be and as I suspected I would, I’ve learned a lot since I started this little project two five days ago (I actually finished 3 days ago and have been trying to write this post since then).

Server Installation

I made it through the Virtual Server 2005 R2 installation without incident, and was soon able to boot to a virtual system that wanted a system boot disk. Next I downloaded the Internet installation of Suse 10.2, afterall, I was only installing textmode and didn’t think I would need the whole installation DVD for that. Later I found out that I could have downloaded CD 1 and it would have been a lot easier… furthermore, I would have completely avoided my first pitfall, no swap partition, which resulted in an impass. After googling it a few times, I decided to use Partition Magic to setup a swap partition for the installation to use. Finally, it was installed successfully, on to the software installs.

Software Installation

I found a nice tutorial on howto forge for setting up The Perfect OpenSuse 10.2. This tutorial was invaluable in getting my virtual system ready to host. I had already installed the OS so I skipped ahead to page 5. Now, this tutorial uses Apache and I wanted to use LiteSpeed for my Web server, so that’s one step I skipped. I also didn’t want ISPConfig as I’m only setting up this host for my own personal use… for now. Also, my ISP blocks traffic on port 25, and I like my Google Apps for your Domain, so I didn’t bother with setting up Postfix or POP3/Imap related material. I also skipped the BIND9 install since I don’t have a static public IP address. Besides, I’m happy with EveryDNS.net.

I used wget to download LiteSpeed and the included installer worked very well. I found later, when trying to make my blog work that the included build of PHP wouldn’t work for me. A forum post led me to a howto that detailed building and installing a custom built PHP for LiteSpeed. A couple of things to note:

Be sure to install libxml2-devel:

yast2 -i libxml2-devel

Be sure to include the mySQL client library that came with mySQL (my mySQL base install was in /var/lib/mysql):

./configure '--prefix=/php5' '--with-litespeed' '--with-config-file-path=../conf' '--with-mysql=path_to_mysql_base_install'

Transferring the Blog

I ran into yet another speed bump when trying to access my database from the Windows machine. I remembered to open the port on the firewall and could access it from the server, but I couldn’t get into it from the host system using the root login and the password I had set. After a bit of googling, I found that mySQL is setup to only allow local access to root, so I proceded to allow access from my host machine using the instructions I found on Hard Hat Hosting. It worked perfectly, I now had access to my mySQL installation and was able to use SQLyog to synchronize my database on the Windows system with the database on the Linux system. I made the name and everything else the same so that I wouldn’t have to tweak my config files.

I uploaded the blog files using sftp to a subdirectory of the LiteSpeed server install and used chmod to set them all to read/execute for everyone except me, well actually root.

Setting Up the Virtual Host

I used the nifty LiteSpeed configuration page to add a virtual host. I ended up using the PHP_SuEXEC template and instantiating the member virtual host. I was then able to setup a new listener to direct requests to the correct virtual host. I simply restarted the service by clicking the “Apply Changes” link in the top left corner and voila. My blog is up and running.

Leave a Comment :, , more...

Microsoft Virtual Server 2005 R2

by phil on Jan.11, 2007, under Software

Let me just say, WOW. I am impressed with the web interface and complete web control of Virtual Server 2005. It’s not at all what I was expecting (something like Virtual PC). I’m installing SUSE 10.2 on it right now. I plan to setup my Web server on the virtual server and get my blog and any Rails apps I would like to host, like SimpleTicket (which I will be blogging as soon as I get a working copy going).

Virtualization is the way the IT industry is moving and I can see why. It’s not only cheaper to upgrade a system and install another (Virtual) OS on it, but it’s not any harder either… I might go so far as to say it was easier. I didn’t even need to burn my ISO file to a disc. Just load the ISO into Virtual Server and your ready to boot to it.

Link to Microsoft Virtual Server 2005 R2

Leave a Comment :, , more...

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...