Back to description
Before diving in to a discussion of using and understanding Microsoft Virtual Server 2005 R2 SP1, I would like to address... more
Before diving in to a discussion of using and understanding Microsoft Virtual Server 2005 R2 SP1, I would like to address a fundamental question: Why Virtualize?
You picked up this book, so chances are good that you already have ideas about why and how you want to use virtual machines, and you may be tempted to skip this section. I advise against this. Before you get started, it is important to fully understand the benefits and drawbacks associated with virtualization.
Furthermore, while you might have a specific use in mind for virtualization, you may be surprised to find out all the potential that is available in server virtualization.
... less
Now it is time to get your first Microsoft Virtual Server 2005 system running.
The first thing to know is that Virtual Server... more
The first thing to know is that Virtual Server is a hosted virtualization solution. This means that Virtual Server runs on top of another operating system and in turn provides virtual machines that additional operating systems can be installed inside of. The operating system that Virtual Server runs on top of is usually referred to as the “host” operating system, while the operating systems that run inside of the virtual machines are referred to as the “guest” operating systems.
This chapter provides background information that is very useful to have when working with Virtual Server virtual machines... more
This chapter provides background information that is very useful to have when working with Virtual Server virtual machines. It primarily covers the emulated devices used by Virtual Server and drills down into each of the devices and the specific features and options available. You will also learn about Virtual Machine Additions and why you should care about it so much.
Now it is time to install an operating system into a virtual machine. This chapter walks through the process for setting... more
Now it is time to install an operating system into a virtual machine. This chapter walks through the process for setting up basic Windows Server 2003 and Red Hat Enterprise Linux 4 virtual machines.
Now that you are starting to become familiar with Virtual Server, and have installed a couple of guest operating systems,... more
Now that you are starting to become familiar with Virtual Server, and have installed a couple of guest operating systems, it is time to talk about how to get away from installing guest operating systems ever again. The reality is that unless you are an operating system developer, installing operating systems is a necessary evil that you perform to allow you to do some other task. Virtual Server can help you reclaim the lost time and energy that you would normally spend installing and reinstalling operating systems.
This can be done through something known as a virtual machine library.
The concept is to create a set of base virtual machines that you use as a starting point for all new virtual machines. These base virtual machines contain the operating system, Virtual Machine Additions, and any other common tools that you want. Once you have created your base virtual machines, you will never need to install an operating system again (except if you want to add a new operating system to your set of base virtual machines).
Virtual machine performance optimization is a relatively complex topic, and many people struggle with it. This chapter steps... more
Virtual machine performance optimization is a relatively complex topic, and many people struggle with it. This chapter steps through each of the areas involved and explains the performance issues and implications to consider. By the end of this chapter, you should understand all the factors that determine how a virtual machine performs.
As soon as you have more than one installation of Virtual Server, you start wondering how you will effectively monitor and... more
As soon as you have more than one installation of Virtual Server, you start wondering how you will effectively monitor and manage your virtual machines. With Virtual Server, virtual machines can be easily created at any time, and without a clear management strategy you may soon lose track of what virtual machines are where, what they are doing, and whether they are working correctly. In this chapter, you read about the different tools that Microsoft provides for you to be able to manage and monitor your virtual machines.
A number of third-party management tools are available for Virtual Server. Some of them are tools built specifically for the management of virtual machines (such as the tools provided by PlateSpin and LeoStream) while others are traditional computer management systems that have been extended to provide extra functionality when used with Virtual Server (such as the management suites available from IBM or HP). However, I will be focusing on the tools provided by Microsoft in this book.
When maintaining any sort of computing infrastructure you need to ensure that it is kept up-to-date with the latest security... more
When maintaining any sort of computing infrastructure you need to ensure that it is kept up-to-date with the latest security patches and updates. Using virtual machines can complicate the process of keeping systems up-to-date in a number of ways:
With virtual machines, a larger number of systems need to be kept up-to-date.
Virtual machines may be turned off for long periods of time, and not receive regular updates that other computers receive.
Virtual machines created from older base virtual machine images don’t have the latest patches and updates installed.
The use of undo disks and differencing disks can cause updates to inadvertently be removed after they have been applied to a system.
This chapter covers the different methods and strategies for ensuring that your virtual machines are always updated with the right software.
With any computing infrastructure, it is important to keep it secure from viruses and other network-based dangers. This is... more
With any computing infrastructure, it is important to keep it secure from viruses and other network-based dangers. This is also true for virtual machines. Virtual machines act and behave just like physical computers, which means that they, too, can be infected with viruses or be the victim of a network attack, or otherwise be compromised.
This chapter looks at the different issues to consider, and the possible strategies you can employ to keep your virtual machines secure from these threats.
Now that you know how to keep your virtual machines secure, the next thing to look at is how to keep Virtual Server itself... more
Now that you know how to keep your virtual machines secure, the next thing to look at is how to keep Virtual Server itself secure. This chapter covers a number of the available options to increase the security of an installation of Virtual Server.
In order to understand many of the configurations discussed in this chapter, you need to know how the Virtual Server security model works in general. The Virtual Server services runs as Network Service. This means that it does not have access to most of the files on the host operating system by default. When you connect to Virtual Server and ask it to do something, it uses your user credentials to access any files that it needs to access. This is called impersonation.
Virtual Server uses your credentials to start a virtual machine on your behalf. Once you have started a virtual machine, it continues to run using your credentials, even if someone else accesses it. Your credentials will be used for the virtual machine until it is stopped (either by being turned off, save stated, or shut down).
With Virtual Server, you can also configure a specific user account that should always be used to run a virtual machine. To do this, follow these steps:
1. Hover your cursor over the Configure entry in the Virtual Machines section of the navigation pane on the Virtual Server administrative website.
2. Select the desired virtual machine from the list.
3. Click on General Properties.
4. Check Run virtual machine under the following user account.
5. Enter the user name and password that you want the virtual machine to run as.
6. Click OK.
Once you have configured a user account to be used for running a virtual machine, you can also configure the virtual machine to start automatically whenever Virtual Server is started. You can configure a virtual machine so that it will always be started when Virtual Server starts, or so that it will be started only when Virtual Server starts if it was running when Virtual Server was stopped. Both of these options are very useful as they allow you to ensure that the virtual machines will continue to run even if the host operating system is restarted.
This option is enabled only when you have specified a user account to be used for running the virtual machine because without this information Virtual Server is not able to start the virtual machine without having a user initiate it.
With production environments running inside of virtual machines, creating a backup strategy that allows you to guarantee... more
With production environments running inside of virtual machines, creating a backup strategy that allows you to guarantee data recovery in the case of a system failure is critical. In fact, this is more important with virtual machines than with hardware, because with virtual machines a single hardware failure could affect multiple virtual machines.
Unfortunately, backup is quite a bit more complicated with virtual machines than with physical computers, but this chapter explains the various options available for ensuring your virtual machines are always safely backed up in a fashion that integrates with your existing backup infrastructure.
This chapter focuses on using the backup tools that are available with a standard installation of Virtual Server on Windows. If you are using any of the commercially available backup programs you should be able to apply the principles of this chapter to those programs.
It should be noted that Microsoft has recently started licensing the format for its virtual hard disk file to other software companies and has stated that a number of popular backup vendors have licensed this format. However, at the time of this writing, no commercial backup solutions have been released that provide specific functionality for Virtual Server virtual machines.
Many times when you decide that you want to virtualize an existing server, there is an unforeseen problem. Servers often... more
Many times when you decide that you want to virtualize an existing server, there is an unforeseen problem. Servers often require extensive configuration in order to get them set up just right. In a best case scenario, this could mean hours of work. In worst case scenarios you may never be certain the new server setup is exactly the same as the original server, or you may not even have the appropriate media or expertise to set up the server again.
In order to deal with this roadblock to virtualization, many physical to virtual (P2V) migration tools have been developed. These tools allow you to take an existing working physical server and migrate it to a virtual machine without the need to install or configure any software inside of the virtual machine.
There are a number of commercial P2V products (such as those offered by PlateSpin and LeoStream). This chapter covers the Virtual Server Migration Toolkit (VSMT), which is a P2V tool provided by Microsoft. VSMT is a free download, but it requires that you have an installation of Windows Server 2003 Enterprise Edition running Automated Deployment Services (ADS). If you do not want to, or cannot, use Windows Server 2003 Enterprise Edition and ADS, you will need to use a third-party P2V product.
Using the automated physical to virtual migration tools such as VSMT is very useful when you have a large number of physical... more
Using the automated physical to virtual migration tools such as VSMT is very useful when you have a large number of physical computers to migrate in a planned fashion. There are, however, times when these tools are not so appropriate. If you only have one or two computers that you want to migrate you may not be able to justify the time and/or money involved in using a physical to virtual migration tool, and you might want to try a manual conversion. Also, you might find that the computer that you want to migrate is not supported by the migration tool that you want to use (either because the operating system is not supported, or because the specific configuration you have installed is not supported).
This chapter details some of the methods that can be used to perform a manual physical to virtual migration of the various operating systems that are supported by Virtual Server. For each of these operating systems, three possible methods are covered:
Using backup and restore software: This involves using the built-in backup software on the operating system to make a system-level backup and then restoring it to the virtual machine.
Using a prepared system image: In this case, you would go through and make the necessary changes to the operating system on the physical computer to prepare it for the migration. Then you use an imaging tool (such as PQImage or Symantec Ghost) to transfer the system data to the virtual machine.
Using an unprepared system image: This is a relatively common scenario. You have a system image of an existing physical computer that you want to deploy to a virtual machine, but no preparation has been done on the image in order to help it run in a virtual machine.
Performing manual physical to virtual migrations is not easy, and it is not always guaranteed to succeed. This chapter outlines the steps that will work in 95 percent of migrations, but you may need to perform further configuration for your physical computers.
It should also be noted that a number of the techniques discussed in this chapter are not officially supported by Microsoft. I will attempt to highlight any specific techniques that I know are not supported and explain why they aren’t.
Virtual Server supports three different kinds of clustering: virtual machine clustering with emulated SCSI, virtual machine... more
Virtual Server supports three different kinds of clustering: virtual machine clustering with emulated SCSI, virtual machine clustering with iSCSI, and Virtual Server clustering. Each of these clustering configurations has its own strengths and weaknesses and different reasons for using it. This chapter discusses how to set up a virtual machine clusters with emulated SCSI and with iSCSI.
In Chapter 14, you read about how to configure virtual machines in a cluster. In that configuration, the virtual machines... more
In Chapter 14, you read about how to configure virtual machines in a cluster. In that configuration, the virtual machines were clustered just like physical computers are clustered, and you had to install cluster-aware applications inside the virtual machines. Virtual Server clustering is a significantly different configuration. You configure the host operating systems in a cluster, and Virtual Server then acts as the cluster-aware application, with the virtual machines being clustered, highly available resources.
This presents a completely different set of advantages and disadvantages to virtual machine clustering. As it is the host operating system that is being clustered, there is no overhead from emulation in the cluster and the highest possible performance is provided. Furthermore, because Virtual Server is the cluster-aware application, the guest operating systems and other applications installed inside of virtual machines are completely unaware of the fact that they are clustered. This means that you do not have to invest time or money in making these applications cluster aware.
Virtual Server monitors the state of the virtual machines and detects if one has failed, in which case Virtual Server will migrate it to another node on the cluster. If you need to perform maintenance on a cluster node, you can safely migrate the virtual machine resources off the cluster node onto other nodes on the cluster while you perform maintenance. And finally, if an entire Virtual Server cluster node were to fail, the cluster would automatically start the virtual machines that had been on the failed node on other nodes on the cluster.
There are disadvantages to this configuration. Virtual Server is aware of the health of the virtual machine only to the extent that the guest operating system is running or not. If the guest operating system is still running successfully, but the applications on top of it have failed for some reason, Virtual Server will not detect this failure.
In the case of a planned migration (where you go into Cluster Administrator and select to move a resource in order to prepare for maintenance) the virtual machine will be put into a saved state and then restored on the target cluster node, but in the case of an unplanned migration (where the guest operating system has failed, or the host operating system has crashed) the virtual machine will be restarted and will behave as if a power failure occurred. This means that to be able to gain the benefit of high availability through clustering, the guest operating system and applications need to be able to recover gracefully from a crash.
Virtual server clustering is best used in production environments where you are trying to provide high availability to applications and operating systems that do not support high-availability configurations themselves. If your guest operating system and application support operation of the clustered configuration then you should consider clustering the virtual machines (as discussed in the previous chapter) for high availability.
It is possible to use clustered virtual machines on top of clustered instances of virtual server when you use an iSCSI cluster of the virtual machines.
Virtual Server provides a fully documented and fully programmable COM (Component Object Model) API. This is the interface... more
Virtual Server provides a fully documented and fully programmable COM (Component Object Model) API. This is the interface that the Virtual Server Administrative website uses to display information about virtual machines, to allow you to configure and interact with virtual machines and configure all aspects of Virtual Server. Using the COM API that is exposed by Virtual Server, you can automate almost any operation possible with Virtual Server.
There are many situations in which you want to automate Virtual Server. In production environments you want to use scripts to automate regular maintenance operations. In training environments you want to provide customized, limited interfaces for users to use. In development and testing environments you want to automate virtual machines to assist the testing process. Indeed, the possibilities are close to limitless.
Chapter 16 demonstrated that using a scripting language such as VBScript to control Virtual Server is quite easy. This chapter... more
Chapter 16 demonstrated that using a scripting language such as VBScript to control Virtual Server is quite easy. This chapter goes over the entire Virtual Server COM object model and discusses how VBScript can be used to automate it. Before doing that, you should understand why and when scripting is more appropriate than developing a standard application. There are a number of factors to consider when trying to decide whether to write a script or an application to automate Virtual Server:
Complexity: It is possible to perform quite advanced and complex tasks with scripts. However, application development environments usually provide more advanced features for larger programs. You will need to decide whether the problem you are trying to solve can be addressed with a script or requires a full application.
Interactivity: Scripts can only take input through command-line parameters and basic user prompts. If the solution you are developing requires extensive and varied user input, an application is a better solution. Alternatively, if you need a solution that is able to run in an unattended mode, scripting may be a better choice.
Flexibility: When you develop an application, you produce a single solution for a single problem at the end of the day. If you want to reuse the application to address another problem, you will need to go back to the source code and compile a new application. Scripts are not compiled. Instead, you run the source code directly. This means that making modifications, or making alternate versions of scripts, is very easy and can be done quickly.
The end user: It is always possible for the end user to modify a script. If the end user is a technically savvy person, this can be a good thing because scripts enable the end user to immediately correct any issues he encounters, and make modifications appropriate to his environment. If the end user is not technically savvy, it can be a recipe for disaster. If the end user is not familiar with scripting environments, developing a standalone application may be more appropriate.
There are probably other factors that you may want to consider, but these are some of the common ones. Even if you do not plan to use scripting extensively, I recommend you read this chapter. By doing so, you gain an insight into the construction and capabilities of the Virtual Server COM APIs.
Windows PowerShell is a new command-line and scripting environment provided by Microsoft. It is a managed application, which... more
Windows PowerShell is a new command-line and scripting environment provided by Microsoft. It is a managed application, which means it is a bit more difficult to create an initial connection to the Virtual Server COM interface. For the most part, PowerShell scripts are written for the same reason as VBScripts: They provide an elegant way to repeatedly perform unattended operations.
One of the big advantages that PowerShell scripting has over VBScript is its object-oriented nature. Imagine a situation in which you have two scripts that interact with virtual hard disks and you want to chain these scripts together. In VBScript, the first script would create a virtual hard disk COM object and perform any needed operations on the virtual hard disk COM object, but when the first script went to call the second script, the first script would only be able to provide the virtual hard disk file string, and then the second script would need to create its own virtual hard disk COM object. With a PowerShell script, the first script is able to directly pass the virtual hard disk COM object to the second script.
Another advantage of the PowerShell environment is that it is possible to casually access and interact with the Virtual Server COM interface in an ad hoc manner directly from the command line, once the initial connection is established.
One downside to using PowerShell for scripting is that, at the moment, it cannot connect to COM objects on remote computers, which means you can connect only to Virtual Server on the local computer.
In Chapter 17, you learned how to write VBScripts to automate pretty much every aspect of Virtual Server. In this chapter... more
In Chapter 17, you learned how to write VBScripts to automate pretty much every aspect of Virtual Server. In this chapter, you'll be seeing a couple of targeted examples that highlight how to interact with Virtual Server from managed applications. Developing an application, rather than writing a script, is advantageous when you need to have significant user interaction in the process. Most people who choose to develop applications to control Virtual Server are primarily interested in providing a customized user experience when interacting with the virtual machines themselves.
The development of ASP.NET solutions that control Virtual Server opens up a number of interesting avenues for usage of Virtual... more
The development of ASP.NET solutions that control Virtual Server opens up a number of interesting avenues for usage of Virtual Server. In a typical ASP.NET solution, you have a web-based application that users connect to remotely. They can then use this application to control Virtual Server. These sorts of solutions are usually the most attractive in development, training, and demonstration environments.
Using ASP.NET with Virtual Server has two main advantages. First, there is no need for users to install any software on their end computer. All their interaction is handled through a web browser (if they are directly controlling virtual machines through VMRC they will need to install the ActiveX control, but the browser should do this automatically for them).
The second advantage is that by utilizing a service account model it is possible to achieve a very high level of control over the exact privileges that the end user has. Figure 20-1 shows the usual mode of operation for Virtual Server.
You have now seen how applications that control Virtual Server can be developed. But Virtual Server can also be used to help... more
You have now seen how applications that control Virtual Server can be developed. But Virtual Server can also be used to help greatly in the development of other applications. Virtual machines can be used to provide clean, trustworthy testing environments that can be rapidly provisioned. Beyond this, virtual machines can help developers while testing and debugging their applications.
Note that this chapter is not intended to be a primer on debugging; I assume you are familiar with how to debug software in general. This chapter applies those principles to Virtual Server.
Virtual machines bring two big advantages. First they provide an always-clean and trustworthy testing environment for the developer. As you're developing an application, it is not uncommon to make changes to system settings or shared libraries that affect your application in ways you do not realize. When testing your application in a virtual machine you can be sure that it is not being influenced by any unknown customization of the environment. The other advantage of virtual machines is that they make it much easier to test applications that are being developed for multiple platforms. The reality for most developers who need to support multiple platforms is that, because of the difficulty involved in testing their application and all the various platforms, they usually just develop and test on one platform and only test other platforms once development has finished. Discovering problems at this stage of development is much more costly than discovering them earlier on, when they would be easier to fix.
This chapter details how to set up virtual machines for application and kernel debugging to help developers working in these environments.
Contains solutions for the following common Microsoft Virtual Server 2005 problems.... more
Contains solutions for the following common Microsoft Virtual Server 2005 problems.
The host operating system crashes or freezes when running virtual machines under Virtual Server.
When running Virtual Server on a Windows XP computer that is not joined to a domain, you receive an accessed-denied error when trying to open the Virtual Server Administrative website.
When shutting down the host computer when virtual machines are running that are configured to save state when the host shuts down, the virtual machines do not always save state.
Accessing the Virtual Server Administrative website when connected to the host operating system over remote desktop results in an accessed-denied, or page-cannot-be-displayed, error.
After moving a virtual machine that is configured to automatically start as a specified user account to another host computer, the virtual machine is no longer able to start.
You experience slow network performance/intermittent network connectivity issues when using virtual machines.
Virtual Server fails to add an existing virtual machine with an error message that it is already registered, even though it is not.
One of the virtual machines is no longer being displayed on the Virtual Server Administrative website, and an error is displayed stating “The configuration value could not be retrieved because the key could not be found.”
When trying to compact a dynamically expanding virtual hard disk, you receive an error that there is not enough space available.
Virtual Server reports errors about SPNs not being registered.
When configuring a Windows NT 4.0 virtual machine with multiple network adapters, only the first one is detected by Windows.
Accessing the Virtual Server Administrative website does not work.
Installing Virtual Machine Additions for Linux fails.
When using Linux virtual machines you are seeing repeated keystrokes inside of the virtual machine.
The complete copy of script from Microsoft for using Virtual Server in a cluster. Used with permission, Copyright Microsoft... more
The complete copy of script from Microsoft for using Virtual Server in a cluster. Used with permission, Copyright Microsoft(c) 2005
Purchase Before purchasing this product, please be sure you have met all software and system requirements, and that you understand any limits placed upon its use.
Return Policy Wrox Chapters on Demand are non-returnable and non-refundable.
Watermarking Wrox Chapters on Demand are sold with a small unique watermark at the bottom of each page identifying the purchaser name, email address, and order number.
Reader Software Wrox Chapters on Demand are offered as PDFs, and they can be viewed using the Adobe Reader, ADE, or a compatible PDF reader. If you do not have the Reader installed, it can be downloaded for free at Adobe.com.
Test Download As Wrox Chapters on Demand purchases are non-returnable, it is advisable that you test your system and software configurations with a free sample download before you place an order.
Usage Rights for a Wrox Chapters on Demand File Any Wrox Chapters on Demand product you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you:
If you have any questions about these restrictions or need any further assistance please refer to Technical Support (www.wiley.com/techsupport) or call (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday).
Related Books