Consolidating servers with VMware Server
Server consolidation is an important part of any virtualisation strategy. With the average server load around only 20 to 30%, there’s a lot of capacity in your clients’ existing servers that can be used to deliver additional functionality. Retiring obsolete servers can be an issue – with old, but still functional, applications there are often OS or hardware compatibility issues. Virtualisation helps there, as it means that applications and
OS can be isolated from the hardware, with sandboxed partitions running on a host operating system. Each sandbox gets a share of the CPU, and a protected memory partition. Each virtual machine’s capabilities can be dialled up and down depending on your clients’ needs – and if any one virtual machine crashes it can be restarted without affecting the rest of the running machines.
There is a downside – you’re now increasing your risk exposure to hardware failure, as any one hardware failure will now affect three or more servers, which can increase downtime.
The vmware tools
That’s one of the reasons moving to a virtual infrastructure requires a planned approach. VMware’s virtualisation products start with desktop tools, which you can use for testing and developing new server images; in an emergency you can even roll out application and role-specific server images to desktop hardware with them. The main desktop tool is VMware Workstation, along with the free Player for less complex applications. Re-imaging a drive with a base OS and a hypervisor, and then installing an appropriate pre-populated virtual hard disk, will simplify the process of managing device images. Simpler device images mean less patching, and less maintenance – and the latest virtualisation tools let you maintain differential images. These contain a base OS image which can be managed separately from the application-specific image components.
The Player is a surprisingly powerful tool. It lacks the virtual image creation features of Workstation, but it’s free and you can use it with images you make elsewhere. It’s useful for instantiating emergency installs of server images as well as for quickly deploying applications using the free library of what VMware calls ‘virtual appliances’. These are pre-configured virtual machines, often running task-specific versions of Linux or other free operating systems. It’s well worth keeping a copy of the VMware Player on a memory stick as a troubleshooting tool, along with a library of useful images for network and security diagnostics. With 16GB USB sticks very reasonably priced, you may be surprised by just how many images you can have in your pocket (and how much download time you’ll save when visiting clients).
While the ESXi hypervisor is now a free download, it may be overkill for a SME – unless your clients wish to invest in the complete range of VMware management tools. Even so, it’s possible to use the basic remote command line tools in ESXi to use it as a host for images you’ve created elsewhere. ESXi is tiny (only 32MB), and it gives your guest operating systems as near a bare-metal experience as possible, as there’s no need to install a host OS and to carry its additional overhead.
If your clients invest in VMware’s full Virtual Infrastructure platform (including the Virtual Center management tools) you’ll be able to use the full-featured ESX hypervisor. This contains a cut-down Linux operating system, which gives you more control and management capabilities. There’s quite a learning curve here, especially if you intend to use the built-in command line management tools. If you’ve got UNIX and Linux experience you should find the ESX command line relatively easy to learn, but it’s a much steeper curve for anyone only familiar with Windows Server.
Starting with vmware server
There’s another option; VMware’s other hypervisor, VMware Server, is similar to Microsoft’s Virtual Server, as it needs a host operating system to run. Like Virtual Server it’s free – so it’s a quick and easy route to basic server virtualisation and consolidation. Virtual machine images are compatible with ESX and ESXi, so your clients have an upgrade path to a full virtual infrastructure. VMware Server is a continuation of VMware’s previous enterprise hypervisor product line, GSX, and keeps all the enterprise and management features of its pay-for predecessor. In this case ‘free’ definitely doesn’t mean ‘less capable’. VMware treats VMware Server as a gateway to the rest of its product suite, and you can manage it with the Virtual Center management suite.
The biggest difference between ESX and VMware Server is the number of servers that can be consolidated onto a typical commodity server. VMware recommends that ESX can support up to eight servers (as it’s a thin, bare-metal hypervisor). VMware Server, as it needs a host OS, has additional overheads, and it is best suited for between two and four virtual servers. That’s more than enough for most small and medium businesses, as it allows you to bring a mail server, file and print, and a database, all together on one machine. VMware Server can also take advantage of the host OS drivers, making it suitable for a wider range of hardware than ESX. VMware doesn’t have to deliver any drivers – that’s up to Microsoft or your favourite Linux distribution.
VMware Server only supports Intel-based hardware, so you won’t be able to use it on AMD-based servers. You should also prepare any host hardware for virtualisation by enabling the hardware virtualisation services in the CPU from the BIOS, and install as much memory as possible – at least 1GB per virtual server. You may find the 64-bit version of VMware Server a good option, as this supports 64-bit guest OS virtual machines, as well as allowing access to as much memory as possible.
Installing and configuring vmware server
To set up a VMware Server installation, start with a fully patched Windows or Linux server. You’ll need a licence key from VMware before you start an install, so make sure that you’ve registered online. Once you’ve downloaded the software, run the installation wizard and fill in the licence key where requested. The installer will also ask to disable AutoPlay on CD-ROM drives. It’s important to do this, as any optical drives will be shared between all the virtual machines on your server. You’ll also need to define the HTTP and HTTPS port numbers used by VMware Server’s administration consoles. The software install includes the Apache Tomcat Java application server, along with Sun’s Java runtime.
Once it’s installed you can start to add virtual machines. You don’t need a CD-ROM or DVD to install an operating system in a new virtual machine, as VMware Server supports the ISO disk image format. It’ll speed up installs if you have a library of ISO images on a portable hard disk or flash drive.
To work with VMware Server, click on the VMware Server Home Page icon on the server desktop. You may get a security warning before you can connect to the server, because the Apache server has a self-issued certificate; click through this or set up an exception (depending on which browser you’re using). You need to log in using an Active Directory account that has administrative rights on the host server to access the VMware Server console. The console lets you work with more than one VMware Server host, and will show you the hardware specification of your server, along with CPU and memory usage details.
You can now add a new virtual machine to a VMware server. If you’ve got existing VMware images, copy them into the VMware Server datastore and load and run the .VMX file. Otherwise you’ll need to create a new virtual server from scratch. Begin by defining the server name and the guest OS type. This will help VMware Server use the appropriate configuration, and also will simplify loading VMware-specific hardware drivers (including a virtual graphics card). You can then define the amount of memory and number of server cores your virtual machine will use.
You can connect to an existing virtual hard disk (which may or may not have a virtual machine or data), or create a new one. New virtual hard disks can be given all the space they need in one go, or can be created as a series of 2GB files as extra storage is needed. Virtual disks can also be treated as IDE or SCSI drives, if applications need specific disk types. Network connections can also be defined, either as bridged or NAT connections. If you’re installing software you’ll need to set up a CD or DVD drive, which can either map the physical drive from your server, or can be an ISO image. If you choose an ISO image you can reset the drive to work with physical hardware once you’ve installed the software you need to use. Applications that need to work with USB hardware will run on VMware Server virtual machines as you can give them access to the host machine’s USB controller.
The Web console needs a plug-in installed before you can view running virtual machines, but once in place this allows you to manage and view virtual machines running on VMware Server anywhere in (and outside) a network. The console runs in a new window, and you can use it to see your virtual machines’ user interfaces, right down to setting up a server in console mode.
The virtual screen drivers used by VMware mean that you can let your virtual machines run in headless mode, dropping into the GUI any time you want to manage an application or service, or monitor something that you can’t control from the VMware Web console.
VMware Server is quick to set up, and easy to use – and easy to make part of a client’s network infrastructure. It doesn’t support
as many virtual servers as a thin hypervisor, but its mix of management tools and simple operation mean it’s an ideal tool to start exploring server consolidation. The fact that there’s a clear path to more enterprise-oriented virtualisation tools is also an important facet of the product, as it means it will grow with your client’s business,
not hold it back through lack of resources.
Sizing for server consolidation
One of the biggest questions facing anyone planning a server consolidation is simple: just how many virtual servers can fit on a single physical machine? There’s no straightforward answer – memory and disk requirements are of course important, but the biggest variable is CPU load. It’s important to monitor the servers you’re working with for some time before you start to calculate how to consolidate several machines. Tools like PlateSpin’s Recon can help you build a map of the hardware and software in use and can then monitor performance over several days to help determine loading and an appropriate server image placement. The tools are low cost – the system inventory version of Recon is free for up to 100 servers, and the full Project Planning version is only $2 per server per day of monitoring.
Treating consolidation management tools as a service works well for consultancy businesses, as it means you don’t need to invest in licences that may or may not be used on a project, and you can help your clients develop budgets for the process.
Once you’ve determined how many servers can be rolled into one, you can start the process of converting physical servers to virtual images. P2V (physical to virtual) conversions are a complex process, and one of the riskier parts of any server consolidation. Done right, they can save time and simplify the process of migrating and consolidating servers. Done wrong, you risk delivering a corrupt image with damaged data.
P2V or start from scratch?
It’s always easiest (and safest) to start from scratch, using VMware Workstation or a similar desktop virtualisation package to design and test a new server image. This approach allows you to start with one base server image, which can be configured with the latest OS version and all the appropriate patches and network information. This base image can then be used as the foundation for specific applications, letting you build virtual servers for Web servers, application servers and the like. All you need to do is make a copy of the base image, and then start installing the applications and services that the virtual server needs. You only need to install and patch the OS once. Once you’ve configured a library of images you can just patch them as required, simplifying maintenance.
Not every server can be built from scratch. Consolidation means working with existing software and data, and while it’s possible
to save a database and reload it on a new machine, there may be incompatibilities and support issues that make it necessary to image a live – and in many cases, running – server. Obsolete hardware and software are often so embedded in a business process that it can be nearly impossible to create a fresh virtual server to host an application and its data. That’s where image converters come in handy. These are applications which are able to take existing machines and convert them into a virtual image ready to run as a new virtual server.
You can use tools like PlateSpin’s Migrate to handle conversion and deployment to a new virtual infrastructure, but they can be overkill. One option is Vizioncore’s vConverter, which can also handle the actual migration to the new virtual infrastructure. You can use it through a GUI on a client machine to convert several servers at once, speeding up the transition process, and it can even work with running servers, using block-level transfers to handle databases and other transactional services. A basic image can be updated quickly to switch over live services to the new virtual server, and the same technique also means images can be kept up to date for disaster recovery.
The process of switching between a physical server and its new virtual image can be complex: vConverter’s cutover tools automate the process. First the tools make a P2V image, and then test that it operates correctly. Once it’s installed and running, the Vizioncore software synchronises the two systems, before switching to the new virtual image and shutting down applications on the old physical server. You can also use this technique to build clone images that can be stored and synced with live data sources when you need to deploy fresh server images.
Another advantage of this approach is that you can also use it to work with unmanaged hypervisors, so you can create and deploy server images on thin high-performance systems running VMware ESXi rather than VMware Server. If performance is a key consideration, then this approach can simplify operations (and also increase consolidation ratios as no host OS will be needed).
VMware vcenter converter: P2V for free
Many SME operations will find tools like vConverter overkill. The P2V vCenter Converter is a free download from the VMware Web site (once you’ve registered a username and password). Two versions are available: a standalone tool and a plug-in for the vCenter management platform.
You can use vCenter Converter to manage P2V conversions for Windows and Linux servers, as well as working with a range of virtual machine images created in other virtualisation packages, including Microsoft’s Virtual PC and Virtual Server. One of its more useful features is the ability to convert both backup and install images into virtual machines. So if you’re using Acronis True Image to make complete system backups of your clients’ systems, or Norton Ghost to create and manage install images, you can quickly convert the files you’ve already made into virtual machines; an approach that can save time and money.
The resulting images can be used with VMware’s desktop solutions as well as its server virtualisation products. Once you’ve run a conversion you can take your virtual machine images and install them on ESXi systems as well as on VMware Server – and you can even use them on Mac OS machines with VMware Fusion. There are two conversion options, ‘hot cloning’ and ‘cold cloning’.
Send in the clones
Hot cloning is the approach you’re most likely to use, as it lets you take an image of a running server, and has no hardware dependencies – it works directly with the OS you’re planning on turning into an image. Cold cloning is a more complex approach, and you’ll need to construct a boot CD for the machine you want to convert. This will contain a WinPE boot image, which runs the conversion tool. The default Converter BootCD supports most hardware, and you can download a utility from the VMware Web site to help add any additional drivers you’ll need for specific hardware (such as RAID storage drivers and network adapters). You can only use cold cloning if you’re working with a full vCenter implementation, as it’s only supported in the vCenter plug-in version of vCenter Converter.
vCenter Converter can be used to manage the P2V conversions of several machines at once, running a management console on a desktop PC. Specify the target server, the format of the resulting image, and the name of the virtual machine you’re creating, along with where you’re planning on saving the image. The resulting image is created using sector-level disk mapping, taking physical disks and converting them straight into VMware’s virtual disk format. The process will take a machine snapshot before migrating any data, which simplifies working with live machines – you can make more than one machine image over several days to ensure that you have as complete an image as possible before you finalise the P2V conversion.
The range of supported guest OS’s is impressive, with support for every Windows Server version from Windows 2000 onwards, along with Red Hat Enterprise Linux, SUSE, and Ubuntu. With businesses wanting to consolidate all types of server onto one single platform, you can use VMware’s suite for everything from an initial test install to a complete virtual infrastructure. !