Welcome to WindowsAdvice Sign in | Join | Help

Building Servers the Virtual Way

 

Part II – Setting Up Virtual Machines

 

In Part I, I covered virtualization and introduced Virtual Server 2005.  In this part we will discuss setting up Virtual Machines.

 

Once Virtual Server is installed, it is time to start adding Virtual Machines.  You first need to open up the Virtual Server Administration Website.  You can do this by clicking on the Start button and finding Microsoft Virtual Server -> Virtual Server Administration Website under Program Files or All Programs depending on your operating system.  Once you have the Administration Website open, click on Create under Virtual Machines in the left menu.

 

Choose a name for the Virtual Machine (VM).  This will also be the name of the .vmc file that is created.  By default, the file will be placed in a folder with the same name in the path that is specified in Server Properties -> Search paths.  If you would like to create it in a different location, you need to supply the full path when setting the name.  One thing to note is that the name can be changed at any time by editing the configuration of the VM and clicking on General properties. 

 

You next need to set the amount of memory that will be allocated to the VM.  Virtual Machines default to 128 MB, but you may want to make this a higher number depending on the operating system you are installing.  One thing to note is that the memory is ‘subtracted’ from the host computer’s physical memory.

 

You then need to attach a virtual disk.  You can use an existing virtual disk, but right now we will create a new virtual disk.  Virtual Server defaults to a 16 GB disk but you can set your own size.  You are also given a maximum virtual disk size, but in reality the largest size the virtual disk can be is 2 TB (2000 GB).  Note that the virtual disk will be created in the same directory as the .vmc file with the same name.  If you chose to create the virtual disk at the same time as creating the Virtual Machine, it will be a dynamically expanding virtual disk.  If you would like to create one of the other disk types, you need to create the virtual disk first and attach it in this location as an existing virtual disk. 

 

This is a good time to mention the various disk types.  You can choose which disk type will best meet your needs.  There are four virtual disk types:  dynamically expanding, fixed size, differencing, and linked.

  • Dynamically expanding - The size of the virtual hard disk expands as data is written to it.  A dynamically expanding virtual disk can be converted to a fixed-size disk.
  • Fixed size - The size of the virtual hard disk is fixed at the size you specified when creating the disk. A fixed size virtual disk can be converted to a dynamically expanding disk.
  • Differencing - A differencing virtual hard disk is a virtual hard disk that is associated with another virtual hard disk.  The differencing disk only stores a record of all the changes made to the associated disk.  The associated disk is not altered in any way. 
  • Linked - The virtual hard disk is linked to a physical hard disk on the physical computer. You can convert the physical hard disk to a fixed-size virtual hard disk or a dynamically expanding virtual hard disk.

 

Now you have the basic container configuration for a Virtual Machine.  In order for it to run, however, it needs an operating system installed.  My preference is to install an operating system by attaching an ISO to the CD drive of the Virtual Machine.  To do this, hover over the new Virtual Machine that you just created, and select Edit configuration from the menu that pops up.  Scroll down to CD/DVD and click on that.  Select the Known image files radio button and enter the full path to the ISO image of your installation CD; then select OK.  You can also insert the media into the physical drive and ensure that the CD/DVD for the Virtual Machine is using the host drive.

 

Now you can start the Virtual Machine.  To do so, click on the thumbnail image of the screenshot in the Virtual Server Administration Website.  You can also hover over the name of the VM and select Turn on from the drop down menu.  It will start from the CD drive and go through Windows setup.  Once Windows setup is complete it will boot into Windows.  If you have a DHCP server on your network, an IP address will be assigned to the network card of the VM.  If you don’t have a DHCP server on your network, you will need to assign an IP address to the VM network card from the subnet of your network.

 

Once your network settings are complete, open Internet Explorer and verify that you can connect to the Internet.  As always you should next run Windows update to ensure that you have all the critical patches installed for the operating system.

 

The steps above are the fool-proof way of setting the configuration information for a Virtual Machine.  The .vmc file that was created is actually nothing more than a standard XML file.  This means that you can open up the file and edit configuration information for the VM directly.  The Administration Website only allows you to perform certain functions when the VM is running.  With this in mind you should only edit the .vmc file when the Virtual Machine is not running.

 

In part III we will discuss the administration of Virtual Machines.  This will include optimizing performance and compacting the virtual hard disks.

 

Sponsor

Part I – Introduction to Virtualization

Improvements in technology and increased competition continue to force hardware prices to drop.  However with the recent trend in downsizing and a focus on the bottom line many Information Technology budgets have also dropped.  Everybody is looking for ways to make their money stretch farther.  A great solution to this is virtualization, a key technology that allows you to get more for your money.

Virtualization is a technology that subdivides the resources of modern computers.  Modern computers are sufficiently powerful enough to allow multiple smaller servers to run on a single physical machine.  There are a few challenges that must be overcome for successful virtualization.  First and foremost, the multiple smaller servers must be isolated from one another so that issues with one server don’t affect the other servers.  Secondly, multiple operating systems must be supported.  Last but not least, performance overhead introduced by virtualization should be small.

A great solution to this is Microsoft Virtual Server 2005.  It successfully addresses all three challenges.  This product allows you to run multiple self contained operation systems on a single physical server simultaneously.  Each of these instances is known as a Virtual Machine.  The total number of Virtual Machines that can run simultaneously varies greatly depending on the resources of the physical server but there is a maximum of 64 Virtual Machines per Virtual Server.  The physical server is commonly referred to as the host. 

There are currently two different editions of Virtual Server 2005:  Standard Edition and Enterprise Edition.  The only difference between the editions is that the Standard Edition supports up to four processors on the host and the Enterprise Edition supports up to thirty two processors on the host.  A consideration needs to be made regarding the host operating system when planning the total processors and memory.  Windows Server 2003 Standard Edition supports up to 4 GB of RAM and 2 processors, Enterprise Edition supports up to 32 GB of RAM and 8 processors, and Datacenter Edition supports up to 64 GB of RAM and a minimum of 8 to 32 processors. 

Some of the key benefits of virtualization include running testing and production applications in the same physical server, hosting legacy applications, and consolidating multiple servers.  Prior to virtualization these tasks required numerous physical machines, increasing overhead and therefore the Total Cost of Ownership (TCO).

Virtual Server 2005 has a comprehensive Component Object Model Application Program Interface (COM API) that allows you to have extensive control of the Virtual Machines through scripting.   And of course since it is based on COM you can use a variety of languages to accomplish this.  Virtual Server also has events that can be used to trigger scripts to run.

Management is easily accomplished through an administration web interface.  Virtual Machines also offer full Active Directory integration.  If you are using Microsoft Operations Manager 2005 there is a management pack available for Virtual Server for enhanced management features.

Virtual Server 2005 can be installed on all editions of Windows Server 2003 including Small Business Server 2003 Standard and Enterprise Editions.  It can also be installed on Windows XP Professional for non production use.  Note that Virtual Server 2005 doesn’t run on any version of Windows 2000.  The Virtual Machines can run nearly all x86-based server operating systems, however, Microsoft Product and Support Services (PSS) only supports all versions of Windows Server 2003, Windows Server 2000, and Windows NT 4.0 with Service Pack 6a.

The installation is quite simple and straightforward.  You can have Virtual Server up and running in just minutes by executing the installation package and following the prompts.  Here are some configuration settings to be aware of in regards to the host server: 

  • Disable the offload features on the host Network Interface Card (NIC)
    • Leaving this enabled often shows up as an attempted Denial of Service (DOS) attack and leads to decreased network performance
  • Virtual Server does not support teamed NICS
  • Disable CPU hyperthreading on the host machine 
    • CPU hyperthreading will actually degrade performance
  • Do not use the /3Gb switch in the host boot.ini
    • Using this switch will cause out of memory errors.

ORCS Web is taking advantage of virtualization technologies to provide cost effective solutions to dedicated hosting.  Point your browser to http://www.orcsweb.com for more information.

In Part II the topic will be about setting up Virtual Machines.  This will include undocumented features and some things to be aware of.

References: 

http://www.microsoft.com/windowsserversystem/virtualserver/default.mspx
Microsoft newsgroups:  microsoft.public.virtualserver

Sponsor