Microsoft Virtual Server 2005 R2 is the most cost-effective server virtualization technology engineered for the Windows Server System operating system.

Microsoft Virtualization Executive Summit

Virtualization lab Prerequisites

  • Intermediate Knowledge in C#
  • Familiar with Virtual Server Administrative Web Interface a plus
  • Familiarity with Visual Studio .NET and the .NET Framework
  • Basic understanding of COM and Windows domains

Virtualization 3 day Lab Agenda Overview

Microsoft Virtualization Roadmap. - VHD Licensing - Virtual Server Management Pack - Setting Up Virtual Server - Managing Virtual Server - Application Testing and Installation - Building a Redistributable VHD with your application - System Center -Virtual Machine Manager

Lab Daily Timetable (Excel file)

Lab 1: Virtual Server Scripting Basics

Description: This lab will guide students to the very basics of automating Virtual Server using VBScript, C#, and Visual Basic .Net.

Lesson 1: Instantiate the Virtual Server Object using VBScript.
This lesson introduces you to the Virtual Server COM API and its properties. VBScript offers easy access to this Object and it is a great tool for the quick automation of tasks that do not require much user interaction.

Lesson 2: Setting your .NET Environment.
This lesson will show you the complexities of using this technology in the .NET Platform. There are some initial steps you need to follow in order to prepare your .NET project for the level of security required by the Virtual Server COM Object.

Lesson 3: Instantiate the Virtual Server Object using .NET
Once you have taken care of the security issues, you can instantiate the Virtual Server COM Object. You will learn through this lesson how you can instantiate the COM Object and query its properties on your .NET applications.

Lesson 4: Instantiate a Remote Virtual Server Object.
By default, the Virtual Server COM Object will look for the Virtual Server service on the computer where the Object is instantiated (locally). In this lesson you will learn how you can instantiate the COM Object to manage a remote Virtual Server instance and the requirements for this connection to be successful.

Lesson 5: Enumerate the Virtual Machines.
The Virtual Server COM Object provides access to a set of Virtual Machine objects. These objects can be used to access properties of Virtual Machines and procedures to manipulate them. This lesson consists of how to invoke those properties in a "Hello World" kind of application.

Lesson 6: Virtual Server and C++
The Virtual Server COM Interface can be used on scripts languages and full-featured development languages. For a different approach this lesson shows how to use the Virtual Server COM Object in C++ applications.

Lab 2: Managing Virtual Server Machines

Description: This lab will show students the specific details of working with Virtual Machines. These tasks can include starting/stopping VMs, specifying hardware configuration, creation/deletion, etc. Attendees will use VBSript, C#, and Visual Basic .Net to carry out a series of tasks for VM manipulation. The end result will be a fully functional Virtual Machine administrator utility built by invoking the different functions from the VM creation API.

Lab Exercises
Lesson 1: Obtaining Virtual Server Information using the Virtual Machine Object.
This lesson introduces you to the virtual machine object in order to query Virtual Server and find Virtual Machines based on their name.

Lesson 2: Implementing the VM Configuration Functionality.
In this lesson, you will learn how to add, remove, register, and unregister virtual machines using Virtual Serverís COM API.

Lesson 3: Querying the State of a Virtual Machine.
You will learn about the different states a virtual machine has and implement this functionality into a C# application.

Lesson 4: Changing the State of a Virtual Machine.
Once you have learned how to query the state of a VM, this lab will show you code samples on how to manipulate the state of virtual machines.

Lesson 5: Incorporating VMRC into your Application.
The last lesson will show you how you can successfully utilize the VMRC ActiveX control to directly manage all your Virtual Server virtual machines.

Lab 3: Working with WMI

Description: WMI provides access to Virtual Server-server specifics namespaces that can assist developers in monitoring and querying information from Virtual Server. In this lab weíll review the VirtualMachine and VirtualNetwork classes, explore their properties, and find out how to successfully write programs that use this information. This lab also focuses on the tools that can assist programmers when working with the WMI namespaces (WMI Code Creator, WMI Explorer, Scriptomatic).

Lab Exercises
Lesson 1: Introduction to WMI and Virtual Server 2005
The last lesson will show you how you can successfully utilize the VMRC ActiveX control to directly man-age all your Virtual Server virtual machines.

Lesson 2: Working with WMI Code Creator.
In this lesson, you will use the WMI Code Creator utility to simplify the effort required to generate WMI code. First, you will explore Virtual Serverís WMI namespace, and then you will create new WMI scripts using this new tool.

Lesson 3: Monitoring Performance using WMI and C#.
WMI can be used to collect information and report on performance statistics. In this exercise, you will create a C# application that uses WMI to access information about the status of the virtual machines.

Lesson 4: Virtualization Performance.
In this lesson, you will learn to collect performance information about virtual machines using the Windows System Monitor and the corresponding .NET classes.

Lab 4: VHD Lab

Description: Being an integral part of the performance of running Virtual machines, this lab focuses on the different types of VMs that can be created using Virtual Serverís COM API. Lab 4 focuses on the virtual disk architecture and a thorough discussion of virtual hard disks in general.

Lab Exercises
Lesson 1: Getting a VHD Object
The VHD object allows the programmer to query many properties from the VHDs that a Virtual Machine can have. This exercise focuses on showing how to query the VHDs that a VM currently has as well as obtaining additional information such as the security used, the drive space available, its size, size in host, type, etc.

Lesson 2: Creating and Deleting a Virtual Hard Disk Controller
Besides having the option of selecting the type of VHD, a user has also the option of selecting the hard disk controller that will be used. When should you choose a SCSI or IDE controller? We will answer this and many other inquiries that can have an impact on your applicationís performance by carrying out this particular exercise.

Lesson 3: Automatic VHD Creation
Anyone that has used Virtual Server knows that VHD creation using the VS Manager is a simple and straightforward procedure. Not as trivial is the process of creating VHDs at runtime using VS COM API, which is exactly what this exercise is about. This session will teach attendees how to create dynamic, fixed, and differentiating disks inside the Virtual machine.

Lesson 4: Maintaining VHDs
In this lesson itís going to be shown the diverse processes available for saving or increasing the memory of a VHD, which also depends of the VHD type. We will then, by means of scripting, carry out a series of operations on the VHDs such as compacting dynamic disks and converting them to various formats with-out using the VSMC.

Lab 5: Meet the Virtual Machine Manager

Description: Although targeted towards the IT Pro, the Virtual Server Manager (codename Carmine) is a topic that should be on anyoneís mind who is planning on using Virtualization in Longhorn server. Weíll discuss its advantages and demonstrate its rich set features by following detailed instructions on fully documented labs.

Lab Exercises
Exercise 1: Installing Virtual Server Manager
Virtual Machine Manager contains different tools to automate a centralized management of distributed virtual hosts. This lab will guide students on the deployment of Virtual Machine Manager through their datacenters in order to take full advantage of the new management capabilities and to obtain the best possible performance.

Exercise 2: Physical Machine to Virtual Machine Conversion
Converting a physical machine into a virtual machine can be a very slow and disruptive process. Normally software has to be installed onto the source server to accomplish this, and then the server has to be re-booted into a ďpre-executionĒ state to copy the entire contents of the server, which this tends to be a failure-prone process. Students will experience how Virtual Machine Manager can make the P2V conver-sion easier and faster than ever before.

Exercise 3: Using the Control Library
Turning a physical datacenter into a virtualized datacenter usually means having to handle many Virtual Hosts, all of them containing running Virtual Machines as well as offline Virtual Machines. A virtualized datacenter will contain hundreds or even thousands of large VHD files. In this exercise, students will get to experience how the Central Library offers a centralized management of all of those Virtual Machines and their building blocks; such as virtual hard disks, CD/DVD media images, hardware configurations, and ISO images. The Central Library also presents a new standardization tool for administrators, Virtual Machine templates.

Exercise 4: Host Provisioning
Many administrators have experienced the headache of administering many servers that host virtual machines and having to allocate a new VM. As part of the System Center family, Virtual Machine Manager has access to historic data and the artificial intelligence to automate this decision for you. In this exercise you will learn how to group approved Virtual Hosts and how to configure the Virtual Machine Manager to give you ratings so that you can determine which host is the best candidate for a new virtual machine.

Exercise 5: Self-Service Provisioning
A centralized management tool is very helpful and it sure makes an administratorís life a lot easier. Thanks to the new Virtual Machine templates and a very complete set of security and permission options, the administrator can now delegate Virtual Machines management to end-users without ever crossing the set limits. In this exercise you will learn how to configure self-service policies on your hosts groups. We will also explore the Web based portal to see how the policy settings affect the userís environment.

Lab 6: Advanced Scripting Techniques

Desription: Virtual Serverís APIs allow the creation of a wide variety of scripts and applications for automating management and monitoring tasks. In this lab you will learn some of the advanced features offered by the API, such as associating scripts with Virtual Server events, how to input information directly to a virtual machinem and determining whether an application is running in a virtual environment or not.

Lab Exercises
Exercise 1: Attaching Scripts to Virtual Server Events
How do you make Virtual Server notify you of events like starting a virtual machine, shutting it down, and others? This lab will teach students how to configure Virtual Server to execute a script when all of these events occur. Students will learn both how to perform these tasks from Virtual Server's API.

Exercise 2: Virtual Machine Input
Virtual Serverís API contains objects that represent the keyboard and mouse of running Virtual Machines. These objects can be manipulated programmatically. In this lab you will learn how to use the VirtualKeyboard and VirtualMouse objects to manipulate the input of a virtual machine.

Exercise 3: Using Sysprep to Prepare an Image
The Sysprep Utility is used to prepare a Windows installation for cloning. This comes in very useful for virtual environments, since you can have a pre-configured image ready for deployment at a momentís notice after using this tool. In this exercise, you will learn how to use Sysprep and itís companion utilities, like the Setup Manager, to prepare a Windows installation for deployment inside a Virtual Hard Disk.

Exercise 4: Determining if you are on a Virtual Environment
You may want your programs or scripts to determine whether they are running inside a Virtual Server virtual machine. One of the most common techniques for this is to use hardware fingerprinting Ė looking for a hardware combination that is only present inside a virtual machine. In this lesson, you will learn how to use hardware fingerprinting in your applications to determine if they are running inside a virtual machine or not.

Exercise 5: Offline VHD Mounting
One of the latest additions to Virtual Server 2005 R2 SP1 is the ability to mount a VHD on a host machine, and to access it as it was a physical drive. This lesson will show you how to achieve this, plus any additional considerations you need to take into account when mounting these drives.

Exercise 6: Working with the Virtual Machine Accountant
The Accountant object tracks the usage of Virtual Serverís resources. It contains read-only information that can help you determine what VM is using certain resources. In this lab you will learn to use the Accountant object to gather these performance statistics from a Virtual Server instance.

Lab 7: Working with Removable Media

Description: Virtual Server is a complete hardware virtualization solution and as such, removable media devices are not left behind. On this lab you will learn how Virtual Server can help you get the efficiency and stability offered by networks on virtual CD/DVD drives and floppy drives and take advantage of them programmatically in your applications. This is an extra credit exercise. You will get all the information you need, but you will have to develop everything yourself and apply some of the knowledge you have gained from past sessions.