Tuesday, January 27, 2009

Space simulator disappointment






Space simulator disappointment

I was planning out this years projects, and narrowed it down to a hydroponics setup and a flight/space sim cockpit.  For the simulator, I was going to use X-Wing Alliance so the kids could fly x-wings.  A friend at work is on the lookout for car seats, I have the computers already allocated, and plan on using roger wilco for comms (I like the mic clicks).  Now, X-Wing Alliance is an old game so I decided that I should test it out on current hardware.

It's just not going to work.  X-Wing is just too old to correctly render the graphics with 3D acceleration with current hardware (video card).  I'm going to see if maybe the X series of games has what I need.

Thursday, January 22, 2009

Bash Command Substitution











Bash Command Substitution (and double substitution)

In bash, you can do some interesting things like using the output of a command inside of another command.  Once common area I use this a lot is creating some kind of file with the host name in the file itself.  Let's say you are going to compare password files from a couple of different server or something.  You can copy the file and have it named uniquely in one command.  This is useful because you can use the one command on multiple ssh sessions.  It's just a simple paste action with the middle mouse. The command would look like this:

scp /etc/passwd someserver:/repo/`hostname`.passwd

Another case might be dates.  The same example as above but with the date command might look like this:

scp /etc/passwd someserver:/backups/`hostname`.`date +%Y%m%d`.passwd

Now you have dated copies of the file you want for each server.  The problem I had was that I needed to use the IP address of the server in the file name.  While...

scp /etc/passwd someserver:/backups/`host `hostname``.passwd

might make sense, it doesn't work.  The solution I found was to declare a variable at the begining of the command.  So the answer looks like...

foo=`hostname`; scp /etc/passwd someserver:/backups/`host $foo |awk '{print $4}';`.passwd

I thought I'd throw that out there if anyone else need a double command substitution in bash.


Thursday, January 15, 2009

Second look at VMWare Server 2











Second look at VMWare Server 2

I had a chance to take another look at VMWare Server 2 (Still GSX) and had a much better time with it.  In my opinion, this product is more like a demo product that just a free virtualization server though.  It used to be that there was really no difference between the server (GSX) and the workstation products, at least as far as use.  Now it's more like a free version of the ESX server.  It moved to having a web interface and feels much more like Virtual Infrastructure.  I created about 10 virtual servers with multiple network interfaces and started to play around.  The best thing about using it this time vs the last time I tried it, was now there is are boot options so you don't have to have lightning speed to boot from CDROM anymore.  You can configure that before you power on the virtual machine.  The dashboard was great, and I even liked the fact that I didn't need a client.  Using the web browser was just fine.

My experience was all aces right up until I wanted to use a physical device to add to my virtual file server.  The only options for disks are the file based options.  It's been a long time since v1, but I swear that physical devices were an option and now it's not.  That's when I realized that v2 is more to show off some of the things that VMWare can do and if I want to do the complicated things, then I would need to buy ESX.  So it's more like shareware, where if you want all the options enabled then you have to pay.  It's a fine business model, I just didn't know that going into it though.  I just had this feeling that if physical disks are not available, what other things are disabled in this version?

I tried solving my problem with using ISCSI to the host device.  At first, this was fine, but as I was transferring files to my virtual file server, the virtual machine crashed hard.  Not a big deal, I'll just reboot the system. -THIS- is the one thing that killed VMWare for me.  The reboot request is sent, and then stops at 95% complete.  I kept hitting the virtual power button to my virtual machine and it would not power off.  I ssh'd into the host server and kill off the offending process which finally cleared my pending task, but the process just hung out as a zombie process and I couldn't get the VM to power on.  I had to reboot the whole server which killed the Internet because my firewall is also a VM.  After the reboot, I tried it again and everything happened all over again.

Here why that's a deal breaker for me.  When using clustered servers, you (almost) need to have something called STONITH (Shoot The Other Node In The Head).  That is, you need a way to pretty much power cycle or power off a machine that's freaking out.  The most common is a remote control power strip where you can cycle the power right at the strip.  I figured that a cheap way of achieving this was to use virtual machines.  If you need to STONITH a node, you can send a command to the host to virtually power cycle it.  This works great for dealing with kernel panics or conditions where the server pretty much dead but is still holding on.

In the end I dumped the whole thing and rebuilt the host as a Xen dom0 running Gentoo.  I haven't tested the ISCSI yet, but I have access to physical disks now.  Also, STONITH is as simple as "xm destroy servername" which is easier than looking as some API docs.

Overall, VMWare Server 2 was outstanding.  It was really easy to use, and I had no real trouble installing the product.  I liked that it mimicked Virtual Infrastructure, and gave me a nice dashboard.  If you need basic virtualization or want to learn it, start here.  I simply had more complicated needs.