Sanjay Majumder and Sujay V Sarma
Consider this-your current mail server is so overloaded that it could crash
any moment, and therefore you need to provision for a new one as soon as
possible so that a part of the load can be transferred. You've even managed to
convince your management for a new server purchase, and have the requisite
budgets sanctioned for it. You managed to get a hardware server and the required
OS and application licenses as well. But the real action starts after you've
procured all this. You have to install the Operating System, apply all the
service packs, patches and updates to it, and ensure that it complies with all
your security policies. After this comes the task of installing the mail server
application with its patches and updates. Finally you're ready to transfer
part of the load from the overloaded mail server. This sort of a scenario is
pretty common for every IT manager, and in fact you'll notice that half of the
job consists of just installing and setting up the OS and the application. What
if you could completely get rid of these steps? What if you could straightaway
get to doing the application configuration? Sounds unreal? Well, that's what
the concept of virtual appliances aims to solve. In this story, we'll take you
through a detailed journey of this concept, its business benefits, how to deploy
it under various scenarios, how to create your own, and even a few examples of
virtual appliances that are available.
|
In fact, we've even given a few virtual appliances on this month's DVD
for you to check out. Feel free to play around with them. Without any further
delay, let's delve right into this concept.
What's a virtual appliance?
Don't confuse virtual appliances (VA) with hardware appliances. The latter are
basically preconfigured systems with hardware and software fully setup and ready
to use. Virtual appliances on the other hand come as images of applications that
are already preinstalled on their respective operating systems. This is
different from the traditional way of doing virtualization, wherein you first
install a virtualization application, and then create various virtual machines
on top of it. These are created by installing the necessary operating system on
it, followed by the application. In a virtual appliance, someone has already
created these virtual machines by optimizing the OS to run the application and
even stripping it of all unnecessary services. Moreover, these virtual machines
have been customized so that the moment you drop them on your virtualization
software, you straightaway get a wizard to configure them.
Virtual appliances are available for a variety of virtualization
applications, some of which include Xen, VMware, Bochs and Microsoft Virtual
Server among others.
VAs are downloadable images and are a package of multiple files. One is the
virtual machine configuration file; the other is the virtualized hard disk
image. The package may contain other files specific to the platform. The
configuration file provides the virtualization layer information about the
hardware configuration expected by the software environment within the virtual
system. Such information can also include the type of networking, memory size,
disk size, types of virtual PCI and other devices attached. Other settings also
provide clues about the kind of software environment or platform and this is
usually achieved by simply providing the name of the OS installed (like 'WinXP'
or 'RHEL').
Business benefits
The obvious benefit of having an application pre-installed on its operating
system as a single image is obvious. You do not need expensive resources to
install and configure the application. A virtual appliance could have the same
application available on various OSes, allowing you to choose the one you're
comfortable using. Moreover, it saves you the time and effort required to setup
and install the application. Simply drag and drop it on top of your
virtualization layer and it's up and running.
Better utilization of the hardware is another key business benefit of virtual
appliances, which of course, has been borrowed from the very concept of
virtualization. You can run multiple virtual appliances on the same hardware,
allowing you to utilize it better. This reduces the number of servers you need
in your data center, thereby saving you a lot of hardware and maintenance costs.
Lesser number of servers also translates into lesser power and cooling
requirements in the data center, further adding to your savings. Having more
virtual appliances than physical servers improves the manageability of your data
center. You can quickly bring up an application or shut it down when not
required. Of course, with all these benefits, you must not forget that while you
save costs in one place, you spend on another. You still have to pay for the
virtualization software, and if that's free or Open Source, then you have to
pay for consultation and support.
Where to get them?
You can download (and purchase) virtual appliances from various sources. Apart
from websites of virtualization vendors, there are directories like
VirtualAppliances.net which list available images.
Virtual appliances can also be created and customized according to your
requirements. One method to do this is to create a new virtual system under your
required virtualization environment, and customize this with the software you
require. Then you can place this image on a NAS or other storage system for
re-use. The second method is to capture an image of a preconfigured physical
system and use that as a virtual appliance. Later on in this story, we take you
through how to do this.
That said, when you have so many different virtual environments and so many
virtual appliances, how do you ensure that they meet some minimum set of
standards? And, what standards are there, if any for virtual appliances?
|
Standardization
The idea of standardizing the virtualization platform is to enable
virtualization interoperability. That is, it would be possible, for a system
created under (say) MS Virtual Server to be imported into or directly used in a
VMware deployment.
Like Steve Herrod, VP Technology Development at VMware says on his blog, “For
virtual appliances to achieve their full potential, openness in virtual
machine-related interfaces is critical. The real promise is 'any software on
any virtualization layer.' ” This can be achieved only if there are
standards that describe the machine's disk image format, how it communicates
with the virtualization layer and licensing of the systems including its
software.
Also, operating systems and software should detect that they are running
within a virtualization layer and accordingly adjust their resource demands,
utilization and performance. One approach is to modify the kernel when installed
within a virtual machine.
This technology is currently under hot debate, since it touches upon the area
of licensing. Currently, some operating systems run better under particular
virtualization environments, and there is no real equality in 'cross platform'
performance. In data center deployments, IT managers might want their existing
management software to recognize and leverage the capabilities of virtual
appliances that have been deployed. There is an industry initiated movement for
this to happen under the DMTF (Distributed Management Task Force) called the
SVPC (System Virtualization Provisioning and Clustering).
Issues
One of the biggest drawbacks of using VM based deployments on x86 hardware is
scarcity of support for 64-bit and multi-core or multi-CPU guest systems. For
instance, even if one has a 64-bit server as the host machine, the guests you
create will all be 32-bit. And, on multi processor/core systems a guest can see
and use only one core!
Another key issue is licensing of host and guest software and this includes
the OS. Experts feel that Windows as a platform for virtualization is being left
out, primarily because of Microsoft's stand on virtualization related
licenses.
Windows Vista ships with a micro-version of Virtual PC called Virtual PC
Express. This lets you run just a single VM and Microsoft licenses you to run
two copies of Vista-one as host and another within VPC Express as guest. But
when you upgrade to the full VPC and run more than one Windows guest, you need
separate Windows licenses for each VM. This affects users of Vista Enterprise or
Vista Ultimate.
Incidentally, those are available only to enterprise or MSDN subscribers
subscribing to Volume Licensing or Enterprise licensing. One needs to use kits
like the WAIK (Windows Automated Installation Kit) that OEMs and system
administrators use to mass deploy OSes to create virtual appliances with Windows
as the guest OS. This is because one cannot install the OS without entering the
product key during the installation phase. As a result, Open Source platforms
like Linux are gaining in terms of appliance availability.
Condor: This appliance lets you manage batch jobs such as scientific and financial computation | Music Player: This appliance lets you remotely play music from a server. Everything is controlled through a Web browser |
ComputeMode Grid Manager: Use this to transform your existing PC into cluster nodes. It's basically a lightweight cluster server | Bugzilla: Needs no explanation for developers. For others it is an Open Source bug tracking software available as an appliance |
Reflection: Create bootable VMware based disk images of your running Windows servers with this appliance. These can then be used for backup and disaster recovery. The process is called Virtual Disk Imaging | Nostalgia: Prince of Persia needs no introduction. It was one of the most popular DOS based games of its time. The Nostalgia appliance includes 9 such games that you can play when you need a break from your work |
Browser appliance: If you're afraid of security threats entering your PC when you browse the Internet, then use this Firefox appliance. Surf the Internet in an isolated environment |
Till the time a common standard emerges for virtual appliances, which will
allow any virtual machine to work on any virtualization platform, you'll have
to know how to configure various virtualization environments to run virtual
appliances. In this article, we'll tell you about hosting virtual appliances
on VMware, MS Virtual Server and Xen. There are tons of virtual appliances
available online and you can choose the one according to your needs. We've
even given lots of them on this month's PCQXtreme DVD.
Prerequisites
You need the following to run virtual appliances:
1. The right hardware: As we're talking about x86 architecture based
virtual appliances, you'll need an x86 server or servers, depending upon how
many virtual appliances you plan to deploy. Every virtual appliance has a basic
set of hardware requirements to run. These inlcude a certain amount of CPU
power, RAM, and storage space. Being a virtualized environment, you'll be
running multiple virtual appliances on a single server. So you have to sum up
the hardware requirements of all the virtual appliances and ensure that your
server has the resultant hardware specs. Plus of course, you have to keep some
of the hardware resources free for the base OS as well. For storage, you need
the requisite shared storage on the network, such as a NAS or a SAN.
On the VMware interface you can create a new machine, which will be further bundled into a virtual appliance |
2. The right operating system: This really depends upon which
virtualization software you plan to install. Currently, there are either Windows
or Linux based virtual appliances. These in turn depend upon which
virtualization platform is supported by the virtual appliance that you plan to
run.
3. The virtualization software: Like we said earlier, there are lots
of virtualization software that are available, ranging from those for the
desktop to those that can install on servers and even those that can handle a
complete data center. At the desktop, you have what's called VMware
Workstation (this is recommended only for testing and demos and not production
purposes) and Player, Microsoft's Virtual PC, and Xen. At the server level,
you have VMware's Server, which is again a free product, Microsoft Virtual
Server, and Xen 3.0. At the data center level, there's currently VMware
Infrastructure 3, which we reviewed in October last year. VMware Player can also
be used to run server class virtual appliances as well, although that's not
really recommended because it's only a product meant for testing and doing
demonstrations of
a virtual appliance. It can't be used for production class environment. Many
of them are in this month's DVD.
Hosting on VMware
We already mentioned all the virtualization products that are available from
VMware. If you'd just like to get a taste of virtual appliances and how they
work, then first try it out on VMware Player. This is available for both Linux
and Windows. You can download it from www.vmware.com/
download/player. We've also given it on this month's DVD. Install and run
the player and simply open a virtual appliance in it. Virtual appliances for the
Player are available either as VMX or VMC files. The player provides a 'Save
state' option. In this, if you close the player at any time, it will save the
virtual machine in its current state, and on restarting, it will start the
virtual machine from where you left. You don't have to worry about shutting
down the appliance properly. Once you're fully satisfied that your virtual
appliance is running fine, you can switchover to a commercial offering like the
VMware Infrastructure 3 or GSX Server.
Microsoft recently introduced virtual appliances for Exchange Server 2007, SQL Server 2005, etc that runs on Virtual Server 2005. These are time limited trials |
Hosting a virtual appliance on MS Virtual Server 2005
Microsoft also entered the virtual appliance race. At the time of writing this
article, Microsoft had virtual appliances for four of its products. These
include a combo of Microsoft Exchange 2007 and Live Communications Server; SQL
Server 2005 Enterprise Edition, Windows Server 2003 R2, and Internet Security
and Acceleration Server 2006. These are all evaluation copies, which will expire
after sometime, and can be downloaded from www.microsoft.com/technet/try/vhd/default.mspx.
There's also an Internet Explorer 6 Application Compatibility VPC image. You
can either run these images on Microsoft Virtual Server 2005 which is freely
downloadable from microsoft.com/virtualserver; or you can import them to VMware
Server and run them from there. Let's see how to do each. We downloaded
Microsoft Exchange 2007 virtual appliance. The appliance is divided into three
zip files, two are 700 MB each, and one is 8 MB. One of these has an .exe
extension. Run it and it will extract the entire VPC image from all the files.
To run it on Virtual Server 2005, just follow these steps:
- Go to C:\Documents and Settings\All Users\Documents\Shared Virtual
Machines\ and create a folder named “Exchange 2007” and copy the three
extracted files here. - Go to Virtual Server 2005's web-based management console and click on
Add Link given under the Virtual Machines section. This will open a new page
for adding new virtual machines. Here click on “know Configuration files”
and select the Exchange 2007 appliance VMC file (a configuration file of the
virtual machine). - On the same page, come to the 'fully qualified path to file' text box
and give the path of the virtual appliance's image. E.g. “C:\Documents
and Settings\AllUsers\Documents\Shared Virtual Machines\MS Exchange2007
Appliance\WS03R2EE_EXCH_LCS.vhd“.
Configuring the Exchange Appliance. The appliance works the same way as the application. All settings are saved and retained even if you change the virtualization host |
Finally click the add button. With this your Exchange Server 2007 with Live
Communication Server is ready too run. Just click on the Master Status link on
the Virtual Server's web page and you will find the new Exchange 2007 in the
list. Select the server and turn it on. You can access it remotely by installing
a client called Virtual Server 2005 client, which comes bundled with the Virtual
Server itself.
Before you can access the Exchange Server, you need to change its network
settings so that it becomes accessible on your network. To do this, you need to
go to the network properties of the virtual machine and give it a suitable IP
address and gateway. Now, just access the Exchange Server 2007 remotely. As it's
running on Windows Server 2003 R2, you can access it from Start>Program
Files>Microsoft Exchange 2007>Exchange Management Console. Outlook Web
Access is ready for access (http://virtual Appliance_IP/owa) out of the box for
the Admin
account.
The username and password for Admin access are given in the readme file,
which would have been extracted when you extracted the downloaded zip files. OWA
has an AJAX based interface. You can configure the server appliance just as you
would configure the real thing.
VPC image on VMware
Suppose you decided that you want to run the Exchange Virtual Appliance on a
VMware server instead of Virtual Server 2005. That's not a problem at all. You
can simply stop the appliance and import it into VMware. This will not affect
all your customizations and settings. To import, open the VMware Sever
Management console and click on the File Import option. Here select the VHD file
and click on the Open button. It will first import the virtual appliance image
into VMware format. During this process, it may appear that the machine has
hung, but don't worry. The import just takes a long time because the Exchange
Server appliance is pretty big. Once imported, you just need to start it by
clicking the Play button.
Wiki Appliance Server running on Xen 3.0. The latest FC6 has Xen built-in, you only need to select it during installation |
Xen
This runs multiple instances of UNIX flavored OSes inside a Xen virtual kernel.
Incidentally the latest Fedora Core 6 comes with a built-in, pre-configured XEN.
You simply need to select XEN and its required components during the FC6
installation process. Once your machine is ready, just copy the virtual
appliance tarball file to the Linux machine and extract files from it using the
tar —zxvf
same virtual appliance directory, where they were extracted. Now issue the
following command:
# xm create -c “Virtual appliance name”
In this command, 'virtual appliance name' will be replaced by the Xen
virtual image file (for example 'Va-postgresql' is the name of one such
virtual appliance).
Then you'll get Xen console. The VA's IP address will be printed there.
Using your Web browser, open Virtual Appliance Management console at https://
your_ip address: 8000/.
To build your own virtual appliance, which includes your applications,
databases and library files per-configured and ready, you need to create an
image of a virtual machine with a stripped down OS and your application, and
port that machine as a virtual appliance. In order to do this, you have two
options. Create an appliance on your virtual machine and then configure the
application and host it as an appliance. Or, you can use ready made tools for
the job. For instance, there's an application called rBuilder that creates one
for you. Here, we discuss both options in detail.
Build it on VMware
To build a virtual appliance for VMware, first get a copy of VMware Workstation
or VMware Server and install it on your machine. Then create a new virtual
machine (VM). Make sure that you configure the memory for the VM and reserve
enough disk space on the virtual disk. Create the VM in its own folder so that
the whole folder can be packaged later. After this, configure the virtual
machine with all the necessary devices that you need in your appliance. Make
sure that you set the network up in a way that is simple for your target users
to deploy. For example, configure the IP address of the virtual network
manually. Then install the guest operating system inside your new VM. We used
Fedora 6 minimum installation with MySQL and Apache.
Running a virtual appliance from VMware Player is as easy as opening a file |
Make sure to check OS licensing and redistribution requirements. Once your OS
is installed on the virtual machine with all the tools inside the new VM, you
need to configure the necessary services and applications required for your
appliance (your custom software, development tools, configuration tools,
documentation, Web servers, etc). We used a Coppermine Web based photo
management application in this virtual application. Then you need to tune your
guest OS and/or the VM. After this create a document of any special requirements
and settings for your virtual appliance and save it to a location where your VM
files (*.vmdk, *.vmx, etc) are saved. If you are using Linux and want to show
the user the appliance's basic settings and other info, you need to put the
text for it in/etc/rc.local file. Make sure that you unmount any installation
media or ISO files and remove any custom network settings (proxy servers, etc),
before 'finalizing' your appliance.
Finally pack up the folder that contains your VM files. Use ZIP, TAR, and/or
GZIP tool to compress your directory into a single ZIP file. Once you have built
your virtual appliance, you need to test it out on a different machine using
VMware Player, VMware Workstation or VMware Server. With that your virtual
appliance is ready. One thing you don't get in this virtual appliance is an
automatic Web based configuration wizard, which will guide a user through
configuring the application. After all, the real value of a virtual appliance
comes when you can configure everything on it remotely from a web browser.
rBuilder lets you create your own virtual appliance. It automatically creates a Web front end for your application |
Build it on rBuilder
This is an online application that allows you to build a virtual appliance in
three easy steps. The beauty of the process is that you don't have to bother
about the guest OS. It uses its own stripped down version of Linux (rlinux). All
you need to do is select the application that you want to add to the virtual
appliance. Finally, build the appliance in the form of ISO, VMware Image, Live
CD, etc. Let's see how to do it. Open a Web browser and go to http://rpath.com.
Here you will get a link for building virtual appliances online. Click on this
link and you will be asked for a user name and password. Authenticate yourself
on the site and you'll get a wizard to build a virtual appliance.
In the first setup you have to create a new group for your project. This
group will signify the name for your software appliance. From your project's
home page, click on Group Builder and complete the Web form with details of this
group. Then add packages to a group like adding ingredients for your appliance.
Use the Search text box at the top of the rBuilder Web interface to find
packages you want to include, and click 'Add to group' beside a package to
choose it for your appliance.
The 'Group Builder' on the right side of the page will show the packages
you have selected and provide links to use while you build the appliance. After
this click on 'Cook this Group' in Group Builder and you will see that
rBuilder assembles chosen packages in the group. When the group has finished
building the appliance, you are ready to create and manage builds to distribute
as your new software appliance. In order to create the final
distribution, click on 'Create a build' link of your appliance group into a
distributable software appliance. Then click on 'Manage Builds,' choose the
appliance group and a build type such as installable CD/DVD or VMware Player
image, and click on 'Create the new build.' Once the new appliance build is
created, go to 'Manage Releases' link and publish your newly built
appliance, making it available for download. Now you can download the virtual
appliance and use it on VMware, MS Virtual Server or a XEN virtual machine.
Sanjay Majumder and Sujay V Sarma