Archive for Tools

VMware Magic - Live conversion of a physical Linux machine to a virtual machine!

// August 12th, 2009 // No Comments » // Linux, Tools, Troublesolving, Ubuntu, VMWare

I can’t tell you how many times VMware has amazed me throughout the years. It (and others like Microsoft Virtual PC) has come a long way in the recent years due to the increasing popularity and demand of virtualization solutions. I use virtual machines every day. At home I have VMware Fusion on my Macs for the occasional excursion into Windows and at work we use it both on our servers and I personally use it on my desktop to try out new things like Win7. OK, enough of praise for virtual machines. You are probably already sold on them yourself!

I am in the process of reconfiguring my “server stack” at home. My primary server is a Linux (Ubuntu) machine that I’m going to do terrible things to. I’m going to install Windows Home Server (WHS) on it!? This is mostly for the very cool feature “Drive Extender” that let’s you combine a bunch of hard drives into a single partition and still have a acceptable level of redundancy. To my knowledge there is no other solution quite like it. RAID can be good in some instances, but I want to try WHS and Drive Extender. But since the Linux machine is my primary server running a lot of important stuff I need it to be available 24/7. I will also need it even if I decide to keep the WHS as my primary server since I don’t want to convert all my Linux stuff to Windows.

So I set out to see if there was anyway I could convert the physical Linux machine into a virtual machine, with no downtime on the Linux machine. Enter the very cool product “VMware Converter”! This is free software from VMware, and with it I should be able to convert my live running machine into a virtual ditto with no downtime! That almost sounded to good to be true, and for some parts it was! :-)

I started by installing VMware Converter on my Linux machine. This posed no problems at all. I fired it up and selected my Linux machine as the source and tweaked a few settings. But when I got to the “choose destination” part of the conversion I hit a brick wall. It turns out you need a VMware ESX server as the destination to be able to do a live conversion of a running Linux machine. You can’t do the conversion into VMware Server or just into a VMware image. I honestly don’t know the reasons for this. Perhaps VMware just want it to be a “enterprise” feature (and make you pony up some cash). Anyway, I was about to give up at this point. Then I discovered that there is a free version of ESX called ESXi. Since I had never tried to set up an ESX server, and it was free, I decided to give it a shot and try to install it. By the way, VMware ESX is a product that runs nativly on your hardware without any operating system. You can then run virtual machines on the ESX server.

To install ESX you need a separate server. I have lots of old computers lying around, so I choose one of them and tried to install ESXi. First problem was that ESXi only supports 64bit systems. So I had to download an older version that supported 32bit. It then quickly turns out that ESX needs at least 1 gig of RAM, and my old horse only had 0.5. So I picked another computer that had 3 gig of RAM. This was a DELL machine, and ESX started to whine about a BIOS setting called “CPUIDLimit”. Apparently it wanted me to change this setting, but the DELL BIOS hides it. 10 minutes of google and some headache solved that problem. Basically you need to halt the boot sequence of ESX and enter the parameter nocheckCPUIDLimit. After that, everything installed just fine. I now had my first ESX server up and running!

From here on it was a simple process! I just fired up VMware Converter, selected the running Linux machine as the source and the ESX server as the destination and everything went perfectly.

If you have yet to try the stuff described in this post I can really recommend diving into it! Best of luck and keep Google (or perhaps Bing?) close by and all should be well. :-)

Generating C# from an UML model with T4

// April 7th, 2009 // 1 Comment » // .Net, T4, Tools, UML

It would take quite a few blog entries to cover all that goes into the heading of this post. So I won’t do that :-). I’ll try to be short.

Code Generation with T4

Code Generation with T4

First some background though. I’m using a product called Enterprise Architect to do all my UML modeling. It is a decent product that is not too expensive. It has built in support for generating code in various languages, C# being one of them. Problem is the template language for the code generation sucks. Enter Visual Studio and T4! That would be T4 as in “Text Template Transformation Toolkit”, not the Terminator Salvation movie. Sorry to disappoint you there.

The short story is that T4 is a templating tool built right into Visual Studio! If you’re using VS 2008 you already have it installed. For more information and a great link resource, check out Scott Hanselman’s blog post about T4 (and also listen to his accompanying Hanselminutes podcast that covers the topic).

So basically I have created T4 templates that communicates with my UML model and generate all relevant classes and connections between them. Hopefully I will find the time to do a more complete writeup on these topics and also provide you with some code. Until then, all you need to know is that for me, T4 is a great tool!

Balsamiq Mockups!

// March 24th, 2009 // No Comments » // GUI, Tools

I just tried Balsamiq Mockups and I instantly loved it! It is a extremely fast way of creating a GUI mockup! It was actually faster than drawing on paper with a pencil. It has a very nice “sketchy” look to it:

Balsamiq Mockups Screenshot

Balsamiq Mockups Screenshot

I watched a few minutes of the intro movie and then tried it myself. It literally took me 10 minutes from I first heard of the product until I was using it effectively. I would say that is pretty amazing. I then went ahead and showed it to my colleagues, and they too were very impressed. We’re going to use it soon since we are in need of mockups for the new systems we’re developing.

If you have yet to discover this gem, I recommend you do as I did. Just watch the movie and then try it online. It is developed using Adobe Air and it runs very well directly in the browser. So what are you waiting for? Go there now!