Developer

SolutionBase: Configuring and using Virtual Server 2005

Microsoft Virtual Server 2005 gives network administrators an easy way to consolidate multiple servers and operating systems on one computer. But in order to use it, you must know how to configure virtual servers. Here's how it's done.

Is your data center getting hot and crowded? Do you have older servers running legacy applications? Would you like to be able to remove some older hardware from expensive maintenance contracts? Do you want to make full use of the power of your new hardware?

If you answered yes to these questions, consider virtualizing some of your physical servers. Rather than have a separate physical server for every small application and service, run lighter-load services on virtual server instances. This lets you maintain the isolation of an application while making better use of your existing hardware. Microsoft's answer to creating virtual servers is to use its newest entry in the virtual server market: Microsoft Virtual Server 2005 (VS2005). Here's how to provision and deploy virtual servers inside VS2005.

Author's note

In the article "Preparing to deploy Microsoft Virtual Server 2005," I discussed deployment planning for the actual VS2005 installation. In this section, I'll go over some things you should consider as you begin to deploy virtual machines on your VS2005 server.

Deployment planning

First, keep in mind the systems that you can actually run inside VS2005. Most versions of Windows are supported as guest operating systems. All versions of Windows Server 2003 and Windows 2000 Server, with the exception of the Datacenter varieties, are supported, as is Windows NT 4.0 SP6a.

You might be wondering if you can run the latest version of Red Hat or SuSE under VS2005. From a technical perspective, there's no reason that various flavors of Linux can't run inside VS2005. However, Microsoft doesn't support this scenario, so you're on your own if you try it.

Limitations

Clients running inside VS2005 have some limitations that are important to understand. On the memory front, each client is limited to 3.6 GB of RAM, no matter how much RAM is in the host server. The VS2005 server as a whole can support up to 64 GB of RAM.

One area that is confusingï¿?and an area where Microsoft is lagging behind industry frontrunner VMWareï¿?is processor use. VS2005 comes in two editions: Standard and Enterprise. The Standard edition can make use of up to four system processors, whereas the Enterprise flavor supports up to 32 physical processors. However, unlike VMWare's GSX and ESX offerings, clients running inside VS2005 cannot use more than a single processor, effectively eliminating VS2005 for high-end use until this situation is corrected. Plans to address this shortcoming are on the slate.

Some people think that the whole of VS2005 can't use more than a single processor. In reality, the VS2005 installation can use every processor in the system, but the individual clients will never see more than a single processor.

Before you deploy an application on a VS2005-hosted client, ask yourself if the application can run smoothly on a single processor. If not, leave the app on a multiprocessor server until Microsoft releases a version of VS2005 in which clients can use symmetric multiprocessing (SMP).

Storage considerations

In your calculations, make sure to consider disk space, although you'll quickly find that there are few limits to the different ways by which virtual servers can access storage. A virtual server can have up to four IDE devices (a combination of CD-ROM drives, VHD, or virtual hard disk files, pointers to ISO image files).

VHD files are where the meat of the virtual server resides. An IDE-based VHD file can be up to 127 GB. If you install a virtual SCSI adapter in your virtual machine, you can add up to seven SCSI-based VHD files, each up to 2 terabytes. You can install up to four SCSI adapters inside a virtual server, providing a total of up to 28 SCSI devices in the virtual machine. You don't actually need a real SCSI adapter, either. You can store the SCSI-based VHD file on a NAS unit on the network or on a fibre channel array. Or, you can actually hang a huge SCSI storage unit off the VS2005 server and use it for your VHD files.

Licensing

For licensing purposes, consider any virtual servers to be real, deployed servers on your network. Just as you need a Windows license for a new physical Windows server on your network, you also need a license for any virtual Windows servers you deploy. Don't forget about the VS2005 server itselfï¿?it also needs a valid Windows license. So, if you have four virtual Windows servers on your VS2005 server, you'll actually need five Windows server licenses: four for the virtual servers and one for the VS2005 server.

Virtual machine creation

To create a new virtual machine, start the VS2005 administrative interface (Figure A). You can either browse for it on the Start menu, or browse to http://{your VS2005 server}:1024. Log in as an administrative user.

Figure A

The VS2005 administrative interface

Click Create under the Virtual Machines heading in the left-hand part of the administration window. This brings up a form you need to fill out with the details for the new virtual server. The form shown in Figure B is completed, but I'll go over all of the options. Table A contains virtual server creation information.

Figure B

Create a new virtual machine.

Table A

Entry Details
Virtual machine name This is the name you want to assign to the virtual server's directory on the host machine. The name can be up to 150 characters but can't contain special characters.
I used Windows Server 2003 — file1 as the name in this example. This lets me quickly see the OS that the virtual machine is running and the service it provides.
Memory Decide how much RAM you want to allocate to the new virtual machine. Notice that the form tells you what the limits are. These limits are based on the amount of RAM installed in the host. In no case, however, can you allocate more than 3.6 GB of RAM to a single machine.
Virtual hard disk The virtual hard disk is a file that contains the whole of the virtual machine. In the example shown in Figure B, I've told VS2005 to use up to 16 GB for this virtual server.
By default, VS2005 doesn't just go out and grab up 16 GB of space, though. It expands the size of the VHD file as needed, but it will not grow beyond the size specified here. In fact, after the Windows Server 2003 installation into the virtual machine created in this step, the VHD file was at just above 1.5 GB, which is well below this parameter. It will grow as I add contents to the virtual server. You'll read a lot more about VHD files in a future article.
Virtual network adapter Each virtual machine starts with a single network adapter. Your job here is to indicate to which physical network adapter this virtual adapter should communicate. Understand, however, that all traffic between virtual machines and the network is completely separate from host traffic. You can't capture packets on the host that are destined for one of the virtual servers, for example.
Virtual Machine Additions Virtual Machine Additions provide significant enhancements to Windows guests. These will be discussed later in this article.
Virtual server creation information

After you've filled in the fields, click the Create button at the bottom of the form. You'll get an overview of the system's configuration. If you don't get an overview, select Configure | { your virtual server } from the Virtual Machines menu option. Either way, you'll get something similar to the screen shown in Figure C.

Figure C

Virtual server configuration overview

Decide on a CD-ROM device

This is an area where you'll need to make more decisions. If your VS2005 server has only a single CD-ROM drive, and you have your Windows Server CD in hand, you can most likely just pop the CD into the VS2005 system's CD-ROM drive and be on your merry way. However, you might have a VS2005 server with multiple CD-ROM drives, or you might have only an image (an ISO file) of a CD-ROM drive handy. In these cases, you might need to decide how you want the virtual server to handle CDs.

To look at your options, click the CD/DVD option on the virtual machine configuration. The screen shown in Figure D pops up.

Figure D

Virtual machine CD/DVD management

On this screen, you can add or remove a virtual CD/DVD device to or from a server. You can also dictate which virtual IDE channel a device should be connected to. In addition, you need to decide how you want media to be made available to the virtual server's CD device.

To remove a CD/DVD device, check the box marked Remove and then click OK. To add a CD/DVD device, click the button labeled Add CD/DVD Drive. When you click the Add button, another entry will appear on the screen with a new label. If you add a second CD drive, for example, you'll see two device entries with the second name being Virtual CD/DVD Drive 2.

For each CD/DVD drive, you need to tell the virtual machine which IDE connector the device is attached to. Just like a physical server, your choices are IDE 1 (Primary) and IDE 2 (Secondary). For each IDE channel, you can have up to two devices, numbered channels 0 and 1. You cannot add CD/DVD devices to a virtual SCSI bus in VS2005, so you're limited to four such devices per virtual server. When you click the selector button next to the Attachment option, channels that are occupied by other virtual hardware are marked "in use."

Finally, provide your new virtual server with details on how it should load media into the virtual CD/DVD drive. Here you have three options: Don't put any media in the virtual drive (No media); attach a physical CD/DVD drive to the virtual drive; or point the virtual drive at an ISO file residing on the VS2005 server (known image files). If the ISO you want to add doesn't show up in the list, type the ISO file's path in the appropriate box at the bottom of the window. In any case, click OK when you're done. For this article, I have a physical Windows Server 2003 CD that I've put into my VS2005 server's CD-ROM drive.

Networks

During the process, you told your virtual machine which physical network adapter it should use. After it starts up, your new virtual machine will use this adapter for all communication, including DHCP requests. The traffic over this link can't be intercepted at the VS2005 server and is completely isolated.

To just get up and running, this is all you need to do. Later on, you can do things such as create networks for virtual machines to communicate with one another. This could be useful if you need private communication between virtual servers. You can find steps to set up private networks for use by virtual servers in the VS2005 Help.

Enable VMRC

Before you get to the business of finally installing an OS inside your virtual server, you should start the Virtual Machine Remote Control (VMRC) client. VMRC is a protocol developed by Microsoft to manage virtual machines. The protocol is used by the Web-based administrative tools as well.

To enable VMRC, go to Virtual Server | Server Properties | Virtual Machine Remote Control (VMRC) Server. Figure E shows the configuration screen.

Figure E

The VMRC configuration screen

Check the Enable box at the top of the window. To get started, that's all you need to do. Obviously, if you begin to use VS2005 in a production environment, you should consider installing an SSL certificate in order to protect the management traffic. If you don't enable VMRC, you won't be able to interact with a running virtual machine.

Installing an operating system inside your VM

At this point, you've created your virtual server. You now have a computer set up and ready to go, but it doesn't have an operating system. If you try to boot this OS-less system, you'll receive the typical "non-system disk" or "disk error" message that you'd see if you tried to boot a regular computer with no OS. The solution: Install an operating system.

Power up the virtual server

Before you proceed, make sure that your CD device is set up correctly and that installation media is present. To turn on your virtual server, choose { your virtual server } | Turn On from the Master Status screen, as shown in Figure F. Next, click the little thumbnail picture of your server's console.

Figure F

The master status screen provides a snapshot of all virtual servers.

From here, install the server operating system just as you would for a regular physical server. You'll be able to interact with your server just as if you were sitting at the console. The screen in Figure G shows a fully loaded Windows Server 2003 installation being used via a Web browser and running inside the VS2005 server.

Figure G

The VS2005 remote control window

One important note: While you're loading the operating system, your mouse pointer will be captured each time you do something inside the virtual server. To release the mouse pointer back to the host system, press the right [Alt] key. The left [Alt] key will not release your pointer. To send a [Ctrl][Alt][Del] to a virtual machine, press [Right Alt][Del]. Don't use [Ctrl][Alt][Del] because this keystroke will be captured by the host system.

Install Virtual Machine Additions

After you've loaded your operating system, you'll probably notice that it looks pretty bad. The resolution will most likely be low, and you'll eventually get annoyed that your mouse pointer is continually captured by the virtual machine. Fortunately, all of this can (and should) be fixed with the installation of the Virtual Machine Additions. The Virtual Machine Additions do the following:

  • Install a virtual SVGA driver that enables higher resolution.
  • Integrate the mouse pointer better. You no longer have to release the mouse pointer to use it between the virtual server and the management station.
  • Allow time synchronization between the host server and the virtual machine.
  • Provide increased performance for the virtual machine.
  • Provide heartbeat capability for improved virtual machine monitoring.

The Virtual Machine Additions work only for Windows virtual machines. To install the Virtual Machine Additions, make sure your virtual server is turned on and you're logged in as an administrator and sitting at the desktop. Next, from the management features beneath the server desktop, click Configure { your virtual machine }. In Configuration, click Virtual Machine Additions, click Install Virtual Machine Additions, and then click OK.

Now, go back to your virtual server's console and follow the steps in the wizard. After you install the Virtual Machine Additions, you'll have to restart your virtual server. You'll now have a fully functional VS2005 server and a virtual machine running inside of it.

Editor's Picks