Virtual Server 2005 gives network administrators a new tool to consolidate multiple servers running various operating systems on a single machine. Here's how you administer the VS2005 using its Web administration tool to get the most out of the product.
If you've installed Virtual Server 2005 and successfully gotten a virtual machine up and running, you're probably starting to see the power, flexibility, and cost-savings potential for virtual machine technology. As with the introduction of any new technology, Virtual Server 2005 brings with it a learning curve and a new administration tool to handle.
The most obvious VS2005 administration tool is the Web front end, shown in Figure A.
|The Virtual Server 2005 Web administration tool|
There are three panes in this window. In the left pane is the menu bar, which I'll discuss in more detail later. On the right are two windows stacked on top of each other. The top window provides a quick status for all running virtual machines, including a thumbnail screen shot, a shortcut menu, and a CPU usage graph. Below that is the VS2005 event log.
The main menu
Outside of actually administering a virtual server itself, a lot of your administration duties will be accomplished using the menu options on the left side of the VS2005 administration window. Table A provides a high-level overview of each major functional area.
|Overview of main menu options|
The concept of a virtual disk can create a lot of confusion. It doesn't help that VS2005 offers several kinds of disks. After you read this section, you'll probably see why there are so many choices available in this area and how each one can be beneficial.
There are four types of virtual hard disks available:
- Dynamically expanding virtual hard disk: A dynamically expanding hard disk file is only as large as the entire contents of the virtual hard drive. For example, if you have a single virtual disk assigned to a virtual machine, and the operating system installation takes 2.5 GB, the size of the file will be 2.5 GB until you add more contents. This type of disk expands only to the maximum size specified when you created the virtual hard drive. If you need more space, you can add it later.
- Fixed-size virtual hard disk: A fixed-size virtual disk is created in a way similar to that of a dynamically expanding disk, except that the associated VHD file is created at the final size. For example, if you create a 16-GB fixed-size disk, the VHD file on the host will always be 16 GB, regardless of what is stored on the virtual disk. Be careful with these, since increasing the size after the initial creation can be difficult.
- Differencing virtual hard disk: This is probably the most confusing type of virtual disk available. A differencing hard disk basically lets you have multiple, different instances of virtual machines all using the same disk. However, in these cases, the virtual machine actually uses two virtual disks: a parent dynamic or fixed virtual hard disk and this differencing virtual disk. Any changes made to the parent disk are written to the differencing disk rather than being recorded in the parent's VHD file. A differencing disk is particularly useful if you want multiple and similar server configurations, or if you want to maintain the base image for testing.
- Linked virtual hard disk: If you have a physical hard drive that you want to convert to a virtual disk, you can link that particular physical drive to a new fixed virtual disk with this option. (You can't link using a dynamic disk.) You can't use a linked disk for a virtual server's startup volume. Further, you can't use a differencing disk in association with a linked disk. Finally, if the physical disk exceeds 127 GB, you can't attach it to a virtual IDE controller. Instead, attach it to a virtual SCSI controller, which supports volumes of up to 2 TB.
Virtual disk actions
To manage virtual disks, choose the Inspect option in the left-hand menu bar. Select a virtual disk to inspect and click the Inspect button. You'll see the screen shown in Figure B.
|Select a virtual disk to manage.|
The number of options you'll see on the next screen depends on the type of disk you're inspecting. If the selected disk is dynamic, you'll have two optionsï¿?Convert and Compactï¿?as shown in Figure C. The third option, Merge, is available only for differencing virtual disks.
|Management options for a dynamic virtual disk|
If you select a dynamic or fixed virtual disk type, you can convert between the two typesï¿?from fixed to dynamic and vice versa. This is useful if you want to expand the size of a fixed virtual disk. This option is not available for a differencing virtual disk.
For dynamic disks, you'll also see a Compact option that lets you squeeze empty space out of a dynamic virtual disk. I recommend that you make sure your host has sufficient disk space for the maximum size of dynamic disks rather than have to do this.
Finally, a third option, Merge Virtual Hard Disk, is available for differencing disks. This management option lets you do one of two things: (1) write the contents of a differencing disk back into a parent and delete the differencing disk; or (2) write the data from both the parent and the differencing disk into a new file and leave both original disks intact.
Virtual networks provide many ways to connect your virtual servers to the network. In a previous article in this series, you might have read that you can attach your virtual server's network adapter directly to a physical network adapter, but you can also do a lot more.
Keep in mind that all virtual networks are separate from one another. If you have a single VS2005 server, and all of your virtual servers have IP addresses from different subnets, you'll need a router in order to establish communications between the different servers.
Each virtual network can also have a DHCP server. This isn't an Active Directory-integrated DHCP server, but it does provide an address to clients on the virtual network. To configure DHCP services for a particular virtual network, select Virtual Networks | Configure from the left-hand menu, and select the virtual network you want to configure. Next, from the virtual network configuration page, click DHCP Server. A page like the one shown in Figure D will appear.
|The virtual network DHCP server configuration page|
From this page, make the appropriate changes to the virtual DHCP server configuration, and click OK when you're done. The Virtual Networks configuration comes in handy when you want to connect virtual servers to different networks or when you want to establish a virtual DHCP server on a virtual network.
Virtual Server configuration
The last major item I'll cover in the Web GUI is the configuration of the Virtual Server product itself. This part of the configuration lets you determine how the overall product actually operates, including who is allowed to administer virtual servers. Obviously, this is an area you'll want to pay attention to.
The first entry in the Virtual Server section, Server Properties, is where most of the configuration options are located. This screen, shown in Figure E, also provides you with details about your Virtual Server installation, such as the uptime for the host, the versions of VS2005, and the administration Web site that you're running.
|Overall VS2005 configuration|
At the bottom of the screen, you'll notice a number of configurable properties. These are all important, but the one you should focus on is the Security option. By default, members of the Administrators group are allowed to administer VS2005 virtual servers. If you want to add other administrators, click Virtual Server Security and add entries to the screen, as shown in Figure F.
|These users can administer VS2005.|
Notice the different permission levels that can be assigned to different administrators. If you want to limit someone to a "look, but don't touch" capability, then provide View access only. To completely remove an administration user or group, select the Remove check box and then click OK. To add a new security entry, click Add Entry.
The next two items, Scripts and Search Paths, can make life easier as your virtual server infrastructure begins to grow. Now, rather than manually intervening when certain events take place, you can script the resulting actions using cscript, the command-line version of Windows Scripting Host. You can write scripts that take action in any of the following cases:
- Virtual Server starts
- Virtual Server stops
- Any virtual machine is turned on
- Any virtual machine is restored
- Any virtual machine is turned off (saved)
- Any virtual machine is turned off (not saved)
- Any virtual machine is turned off within the guest environment
- Any virtual machine is reset
- No heartbeat is detected for any virtual machine
- Any virtual machine experiences a guest processor error
- Any virtual machine receives a warning due to low disk space on the physical computer
- Any virtual machine receives an error due to low disk space on the physical computer
For example, you might want to be notified via a pop-up or an e-mail if a physical computer is running low on disk space or if a heartbeat is not detected for a particular virtual server. In either case, the risk of downtime is probable if you don't take immediate action, so being notified early is important.
Search paths provide VS2005 with places to look for .vmc (virtual machine configuration) files; .vhd (virtual hard drive) files; .iso (CD-ROM image files), and .vfd (virtual floppy drive) files. By default, only a single location is used by VS2005: C:\Documents and Settings\All Users\Documents\Shared Virtual Machines\. You can add search paths to make other locations available. For example, maybe you want to store all .iso files in C:\cdimages. If you don't add that location to this page, you won't be able to easily make use of the resource.
Allocating resources to virtual machines
One drawback to the use of virtual servers is taking a chance that a single virtual server could swipe all of the host's resources, effectively bringing down the entire virtual machine structure for that host server. If you have multiple virtual servers hosted on a physical server, you can see why this is a concern.
Fortunately, in the design of VS2005, Microsoft considered this potential and built a mechanism that prevents this from happening. This mechanism also allows you to weigh different virtual servers separately; you can basically assign a priority to a virtual server to make sure it gets host resources when needed.
To allocate resources to virtual machines, go to the Resource Allocation section in the Virtual Server configuration. You'll get a screen like the one shown in Figure G, but the percentages will be different, unless you've already adjusted resource allocation.
|CPU resource allocation for virtual machines|
Notice the different categories available for each server: Relative Weight, Reserved Capacity, and Maximum Capacity. In most cases, if you just want to prioritize one virtual server above another, give it a higher relative weight using a number anywhere between 1 and 10,000. When a virtual server with a higher relative weight needs more resources, they are made available at the expense of virtual servers with lower weights, so be careful with this option.
The other two fields, Reserved Capacity and Maximum Capacity, allow you to specifically allocate a percentage of a single host CPU to a particular virtual server, ensuring that the virtual server always has at least that much capacity. The Maximum Capacity setting allows you to provide maximum resource consumption (a percentage of a single host CPU) to a virtual server, ensuring that it will never run away with 100 percent of the host's resources.
After you make changes to these fields, you'll notice that blue lines appear in the CPU Usage graph, indicating these thresholds.