Monday, August 16, 2010

Along Comes Windows 7 and the troubles too!

Along comes Windows 7 and the most prevalent question i hear is: How many drivers are not working on it? How many applications have problem running on it. Well the regular questions like, how long does it take to boot and Does it hang as often as Vista are still the most often asked questions. I was more interested in the first two questions.

Many people bought/sold applications which used to run on previous installments of Windows. Those applications might not be working on Windows 7. If it is a very famous application, the developers will be working around the clock to fix it. What if someone ordered a custom application for their office need and it doesn't work any more? What if vendor asks new license fee to make it work for Windows 7? I get it those are a lot of questions. There is a not so well -know application called VMware ThinApp .  (They have a 60 day trial available at :http://www.vmware.com/products/thinapp/). They have a simple and elegant way to convert applications that run on old versions of windows to thin virtual applications and make them run on Windows 7.

The main use of this tool is to save the amount of time it takes to develop and test that application for Windows 7. This would be a very big deal in leading technology companies. For companies which ordered a custom app from a vendor, need not pay that company again to make that app run on Windows 7. Using this anyone can make that application run on Windows 7 and hence save some money too. Other advantage of this tool is that you can install applications on USB stick and then carry it along with you. Via this method one can run it on any machine.

I used this to convert the MG-Soft MIB Browser tool to a thin app. This tool (the particular version i had at hand) was not installing on Windows 7. In less than 10 minutes i was able to make it work on Windows 7. Anyone who needs some help in making applications run on Windows 7 should try this.
As usual please leave a comment if this helps.

Monday, July 26, 2010

The Other Uses of Virtualization

The other uses of Virtualization.

Everyone agrees that virtualization is very useful for running corporate data centers as it not only reduce energy consumption but also helps scale the applications in an efficient way.
Disaster recovery and High Availability are others reason everyone use virtualization. Furthermore cloud/distributed computing is best use of virtualization. This post is not about the above applications. There are a lot of posts and white papers on the web to talk about the applications of virtualization in the above areas. This post is about the other uses of virtualization : standardizing development environments, helping kick start new team members with their development environment , restoring our workspaces in case we mess it up
and perhaps the best use is in scaling up our test automation and/or stress/load testing efforts just before major releases.

Every project has a set of tools which needs to be installed and configured in a particular way before a developer starts contributing to the project. Many times it takes a day or two for a new hire to join a company and setup all the needed tools. In some projects all the steps are documented and in some other projects these steps are not documented. The new hires would just have to figure out by asking others or by just trying a couple of ways before arriving on the best practices for that project. As we all know, many developers do not like documenting and fail to do it many times :). If we use a virtual machine(VM) as part of our development environment and install and configure all our tools on the VM, it will save a lot of time
and frustration for new team members. This will also ensure that everyone is following the best practices. All without even a single line of the dreaded documentation!

To illustrate this lets take the example of a web development project. Many people use eclipse for doing web development. Every time a new plugin is released or some new frameworks are out the developers are eager to try them. During those times, they end up updating eclipse or doing some other environment changes. Sometimes this has side effects, i.e. out main project stops working :(. To revert all the changes they just did will again cost them some time. It happened to me also number of times. In case we use a virtual machine as our development environment, if anything goes wrong we will stop the current VM(well after checking in all the code needed) and then just boot the baseline copy virtual machine and we will be all set.
If we are using ESXi we can take a snapshot and do our experiments. If anything bad happens in the experiments we can just go back to the snapshot.This logic can be applied to a large variety of projects ranging from embedded systems to enterprise applications.

Another very good use of virtualization is in testing. Before every major release (we can extend the logic to every release ) we have run a lot of tests. If a company uses test automation and has tests which would take 7-8 days to run the entire suite then by using virtualization we can just create 7-8 copies of the testing virtual machine. Then run all the tests in parallel in just one day. After our tests are run, we can shutdown all the unnecessary testing VMs(virtual machines). Doing this would save us a lot of money i.e. both the cost of buying new hardware
and of maintaining it. For instance in one my recent project, we used selenium, testng and Java to do test automation. We had installed all the tools we needed to develop and run the test cases on a virtual machine. Our test suite currently takes approximately 24 hours to run. We used 3 virtual machines to run the tests overnight. This helped us save a lot of time.

Another use of virtualization is during stress testing, soak testing and load testing. To test any appliance/web appliance or a website, we need a lot of stress testing. Most of the times this is just one time thing, just before the main release. We try to simulate real life scenarios using a large number of simultaneous client connections to our server. For a bank website we probably have to simulate more than a couple of thousand request at any given point of time. We can use the power of virtualization to scale up our stress/load/soak testing. Once we are done, we can shutdown all those test virtual machines. In this economy reducing cost while doing thorough testing is definitely going to impress your boss.

As we are done with the uses, now i would like to talk about some virtualization tools i used and like. All of them are free and are by VMware. Googling the names will give a lot of tutorials so i am skipping that for now.

VMware Player: It runs on windows and linux. Using this we can run virtual machines on our desktop. i.e. We can boot in windows and then boot a Virtual Machine of Linux using VMware Player. Once upon a time everyone used dual boots with windows and linux, now we need not do that anymore(oh- thats yet another use of virtualization) In this case the windows OS has the full control of hardware and passes it to other OSes which are running in the VM.

VMware ESXi (vSphere Hypervisor) : This is a more efficient way to run VMs. If you need better performance this is the tool which needs to be installed. In this case the VMware OS(ESXi) has the full control of hardware and then passes it to the installed OS inside the virtual machine.

VMware Standalone Converter: This is used to convert the virtual machines one format to other. All the VMware tools do not use same format. This is used to convert VMs from one format to other.

VMware vCenter Converter: This is used to convert physical machines to virtual machines.(doesn't work with all the target operating system though)

VMware vSphere Client: This is used to connect to ESXi or vCenter.

Here is a link for the full set of tools from VMware: http://www.vmware.com/support/

VMware is the only vendor in virtualization, but it is the most popular one. Other VM major vendors are:
Citrix Systems XenServer: http://www.citrix.com/English/ps2/products/product.asp?contentID=683148
Sun Virtual Box : http://www.virtualbox.org/
Microsoft Hyper-V : http://www.microsoft.com/virtualization/en/us/default.aspx
Open Source xen: http://www.xen.org/


In summary, i think that the uses of virtualization are way beyond its current applications. Scaling and risk mitigation would still be the major uses but nevertheless
the other uses are also important. All the articles on the web just talk about how virtualization is useful for saving money for companies, its uses for a developer and tester have been ignored. Also using virtualization we can do things which we probably never did before. Ex:- Scale a load test to a very large number.


Bottom line: Virtualize, Scale and Go Green!


Disclosure: I currently own the stock of VMware and Citrix.