Virtual Servers

From MissionTechWiki

Contents

[hide]

Virtual servers

With the availability of virtual server software such as VMWare Server for free, consolidating servers, especially test or small application servers, is now easily available to missions on a tight budget.

Other Virtual Server systems

Microsoft now offers Virtual Server 2005 (and Virtual PC 2007 too) for free, so there are many choices for virtualization now. See http://www.microsoft.com/windowsserversystem/virtualserver/default.mspx and http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

Virtual Box is an open source virtualisation system for Linux, Windows and Macintosh hosts. The GPLed version may not be quite as stable as the commercial product.

Xen is an open-source hypervisor that enables increased server utilization and server consolidation by enabling multiple operating system images to simultaneously run on a single physical server. Xen provides resource guarantees to virtual servers to ensure that application layer SLAs are met, including CPU, memory and I/O guarantees.

Parallels - virtualisation for MACs.

Linux servers

One way to move an existing Linux server into a virtual machine is to use Knoppix, the bootable CD-based Linux distribution. This can be done as follows:

1. Prepare the server to be virtualised - delete unwanted files, purge logs as much as possible - the less to convert the better.

2. Fill the unused disk space on each partition with zeros e.g. dd if=/dev/zero of=bigfile;sync;rm -f bigfile

3. Write down the partitioning information (in sectors) for each disk (via fdisk)

4. Create the virtual machine with disks the same as the source server - make sure that you get SCSI and IDE choices right.

5. Boot the VM with Knoppix. Partition the disks identically to the source server.

6. Set the root password and start sshd

7. On the source server, in Knoppix, do a bit-level copy of each partition to the VM, e.g. dd if=/dev/hda1 | gzip -c | ssh -e none root@vm_server_ip_address 'gunzip -c | dd of=/dev/hda1'

8. On the VM reinstall your boot loader. E.g. for grub do this: mount /dev/hda1 /mnt grub-install --root-directory=/mnt /dev/hda


9. Shut down the VM, then defragment and shrink the disk image using standard VMWare tools

10. Test the VM, then test it again, and finally do some more testing.

(You may need to edit the /etc/iftab file as it no longer has a physical network card. Change the line for eth0 to this: eth0 driver pcnet32 arp 1 ) Some tips: I recommend doing this over a LAN. If there is a lot of data on the source server then be prepared for a lot of network traffic over an extended time. Run fsck on all partitions as soon as possible after copying.

Windows servers

Use the VMWare converter tool, or do the folowing...

It should also be possible to do this for Windows servers as well. This process just uses Knoppix at both ends to do a bit-level copy of the disk partitions, so it ought to be OS independent.

To fill the unused disk space with zeros prior to coping you can use a tool like Eraser with a custom wipe pattern of only zeros.

To reinstall the boot sector, MS KB article 314058, "Description of the Windows XP Recovery Console", shows the FIXBOOT and FIXMBR commands, one of which will do the job.

For Win9x use "fdisk /mbr"

The only problem I can think of would be the HAL. I know that in some cases it is impossible to move an NT (i.e. WinNT, Win2k, XP, Win2k3) hard disk to a new chassis if the motherboard would require a different HAL (having spent half a night once trying to do just that with a Win2k server migration.)

Notes from ICCM 2007

These notes were submitted to the ICCM email list by gp.

Karl Gingrich did a couple of Basics workshops on virtualization -- I don't know if his notes got posted to the ICCM web site.

Types of Virtualization

Karl approached virtualization as something that falls into three categories (if I remember correctly)

1) Web-based apps, such as Google Office, Salesforce, etc.

2) Virtual sessions, such as Windows Terminal Server

3) Local virtualization, such as VMWare.

I won't try to expand those further, I'm just noting the background.

Running Windows on a Linux system

In your particular circumstance, a Linux user wanting to run a Windows-only application (without having to boot the machine into Windows), there's more than one way to go about doing things.

Emulator - Wine

One way is with virtualization that's a Linux application. Essentially it's system emulation. The typical way of going about this one is Wine (yet another recursive UNIX acronym "Wine Is Not an Emulator").

There's a lot of things that you can do with Wine, although its reliability seems to vary by application. A lot comes down to what applications (and versions) that Wine's maintainers have really tested thoroughly against. My understanding is that a lot of the Wine maintainers are gamers, and as a result, Windows games seem to do best under Wine.

It would not surprise me that Quicken works adequately, given wideness of usage, although the most recent release may be a little rougher than previous releases.

On the other hand, I'm not sure I would expect completely smooth performance of something such as TurboTax, where the new version hits the streets during the Christmas season, and then an update is released as soon as the year is closed, and the final version of tax law is completely set for the year.

I've tinkered with Wine just a little bit, installing e-Sword, and a couple of Windows utilities, but I've only got far enough to prove to myself that it's possible, but not a thorough shake-down of performance and reliability.

The nice thing about Wine is that it's free, and it should be in the update channels of virtually any common Linux distro. Thus, it's something that you can check fairly quickly, without any money spent.

Using a Virtual Machine

The other approach would be installing a virtual machine, and there's a number of options there, as well. The best-known option is VMWare, but there's moves for direct kernel support for virtualization in Linux (using Xen), and if I remember correctly from Karl's presentation, there's a couple more ways to do virtualization from a Linux platform.

I haven't seen Xen, but I know that both Red Hat and SuSE (especially SuSE) are both pushing Xen fairly hard in their enterprise products. I know that about a year ago, there was some public dispute between Red Hat and SuSE, and if I remember correctly, a lot was that Red Hat seemed to think that SuSE was pushing forward too quickly on implementation.

I'm assuming that whatever is possible with Xen is available in the current releases of both Fedora Core and Open SuSE.

VMWare

The tool I'm most familiar with is VMWare. I've used VMWare Workstation for several years, running from a Windows host. However, from the beginning, VMWare supports both Windows and Linux hosts. As far as I'm aware, the freeware VMWare server runs on both, and from there, you can pretty much run any OS that VMWare supports, as a client.

As far as I'm aware, the main difference between VMWare Server and VMWare workstation is that the Server has driver support for peripherals, and that there's less support for a virtualized file system, that allows clients to write directly to the host's filesystem, without having to go through networking protocols (e.g., setup of either Samba or NFS to do file-sharing).

One potential "gotcha" in doing VMWare with Linux is in which distributions are officially supported by VMWare. They currently do Red Hat Enterprise, SuSE (both SLES and SLED, I think), TurboLinux, Mandriva, and Ubuntu, as well as FreeBSD, Solaris X86 and NetWare.

VMWare does not support Fedora Core, OpenSuSE, Debian, or CentOS, even though those distributions are variants of distributions that VMWare does support. If there's support conflicts, the place where there's most likely to be problems will be in driver support.

I should note that I've had no problems with either Fedora Core or Debian virtual machines, although in each case, I've been doing server emulations, without using a GUI.

One additional option for VMWare is VMWare Player (also free), where you can download full pre-built systems. I haven't looked at this, but I know that it's there.

Because of licensing issues, I'm guessing that most of the machines available for VMWare player are going to be Linux-based.

As for running Quicken on a Linux box, I would try Wine first, to see if you can get it to work the way you need. Among other things, it means that you don't have to have a Windows license to run it.

Virtualization and MS Vista

If you want to go virtualization with VMWare, it's worth doing VMWare player. However, on the Windows side, I'd encourage you to do Windows XP (or even 2000), rather than Vista. Besides the fact that Vista makes a lot more demands on your hardware, a complication with Vista is that Vista's licensing is written in such a way that Vista Home (both Basic and Premium) are not allowed to be run as virtual machines. Apparently, Microsoft considers virtualization to be a business application, and expects copies of Vista running as virtual machines (presumably, preferring Microsoft's own virtualization tool) to be running mostly Vista Business or Vista Enterprise.

Hardware Requirements

Speaking of hardware demand -- if you're running virtualization, it does require more hardware than a stand-alone desktop machine, especially RAM, and to a lesser extent disk space. Since a virtual machine is a full computer, it pretty much needs all the resources it would have if it was running by itself.

Thus, if you're running Windows XP, and you would normally put XP on a machine with 512 MB of RAM, you want to make sure you can allocate that much RAM to a virtual machine. In my setups, since I sometimes have several virtual machines running simultaneously, I tend to under-allocate memory, and one effect that I sometimes see is sluggish performance on my virtual machines. Performance does seem to improve if I allocate more RAM to the virtual machine.

Summary

From my own experience, I have to say that virtualization is a wonderful thing, and I continue to be amazed at the numbers of ways that virtualization can be used.

Right now, the growth in virtualization tends to be in the server area, and a lot of the attention is being focused on the idea of hardware consolidation, as well as the flexibility of moving virtual machines from one machine to another quickly. Those are all great applications.

For me, I've found virtualization useful in testing configurations (e.g, try something, and if I don't like the results, discard, and return to a saved snapshot), network simulation (e.g., several clients and a server running simultaneously), and the ability to do parallel work. On the latter point, several years ago, I had setups of Win 95, 98, ME, NT 4, and Windows 2000, and in user support, when a user told me what version of Windows he was running, I could fire up a virtual machine with that version of Windows, and then walk the user through, knowing I was seeing the same version, rather than having to translate through the similarities and differences between the user's version, and what I was running on my own desktop.

 

Original page: http://www.missiontech.info/wiki/Virtual_Servers
from the MissionTech Wiki created by the International Conference on Computers and Missions

Faith (for Content):