Share via


Virtualization

Manage Your Virtual Environments with VMM 2008

Edwin Yuen

This article is based on a prerelease version of Virtual Machine Manager 2008. All information herein is subject to change.

At a Glance:

  • Support for VMware VMs
  • Windows PowerShell-based scripting and automation
  • Consolidated, centralized management
  • Installation procedures

Contents

An Introduction to Virtual Machine Manager 2008
Integration with System Center
Virtual Machine Manager 2008 Installation
Adding VMware ESX Hosts
VMotion Migration
Conclusion

Last year, Microsoft introduced System Center Virtual Machine Manager 2007, which provides a consolidated interface for managing a virtual infrastructure running Microsoft Virtual Server 2005. Now, to coincide with the release of the new Windows Server 2008 Hyper-V hypervisor, a new version of Virtual Machine Manager (VMM) has been released. System Center Virtual Machine Manager 2008 manages not only Microsoft Virtual Server 2005 and Windows Server 2008 Hyper-V installations, but support has also been extended to VMware Infrastructure 3 (ESX/ESXi) servers. With VMM, you now have an integrated management interface that works with your entire virtual infrastructure, including both Microsoft and VMware systems.

VMM supports all the traditional virtualization tasks, such as rapid virtual machine (VM) deployments from templates and pre-configured VMs, Physical-to-Virtual (P2V) conversions, a centralized library of virtual infrastructure objects, and even Virtual-to-Virtual (V2V) conversion of VMware virtual machines (VMX configuration files plus VMDK virtual disks) to Hyper-V VMs. Moreover, VMM integration with the rest of the System Center family brings the management of physical and virtual systems to a single pane of glass.

In this article, I will examine VMM 2008 and the new features it brings to IT administrators. I'll then look at the requirements and the steps involved with a VMM installation. Finally, I'll take a closer look at how to use some of the new features of VMM 2008.

An Introduction to Virtual Machine Manager 2008

System Center Virtual Machine Manager 2008 is a standalone application that provides centralized, enterprise-class management of virtual machines running under Microsoft Virtual Server 2005 R2 SP1, Windows Server 2008 Hyper-V, Microsoft Hyper-V Server 2008, and VMware Infrastructure 3 (ESX/ESXi) servers. Together with other System Center products, VMM provides end-to-end physical and virtual infrastructure management. Figure 1 shows the architectural layout of Virtual Machine Manager.

fig01.gif

Figure 1 System Center Virtual Machine Manager 2008 Architecture (Click the image for a larger view)

As those familiar with VMM 2007 will note, there are significantly more interfaces to the VMM system in VMM 2008 (see Figure 1). The boxes in the upper-left represent VMM 2008; the boxes in the upper-right represent System Center Operations Manager 2007, and the managed systems and interfaces are shown below. The red boxes indicate the management servers, the blue boxes show the system inputs, and the green boxes are the managed host systems with their managed objects shown in yellow.

The red box on the upper-left represents the Virtual Machine Manager 2008 server service. Above it are the different interfaces into the service; the Administrator Console, the Windows PowerShell interface, and the Self-Service Web Portal with delegated user access. Windows PowerShell forms the basis for all access to the VMM server. The VMM Admin Console is built entirely on Windows PowerShell, so you can simply create Windows PowerShell scripts that the VMM server service runs. Thus, the public API for VMM 2008 is Windows PowerShell, and any program can leverage VMM using Windows PowerShell. A great example of this is the integration of Citrix's XenDesktop Desktop Delivery Controller with Virtual Machine Manager, which is done entirely through Windows PowerShell.

Supporting VMM is a SQL Server 2005 or SQL Server 2008 database, either a full installation or SQL Server Express Edition if no other database is available. While the diagram shows both Operations Manager and Virtual Machine Manager pointing to SQL Server, the two programs do not share a database. They simply both run on the same version of SQL Server. The actual integration between Virtual Machine Manager and Operations Manager is through a connector that is available through VMM. This connector allows VMM and OpsMgr to share data, which brings virtualization information into OpsMgr and brings OpsMgr data to VMM for actions.

The bottom half of the diagram shows the managed hosts. VMM 2008 still manages Virtual Server 2005 R2 SP1 virtual machine hosts and a centralized library share, like it did in VMM 2007. It should be noted that in VMM, the library share is not a special file store or server. It's simply a Windows file share that VMM manages. You can manage the library through VMM or you can easily copy and delete files out of the file share and let VMM discover the changes. You can also have multiple libraries, which is useful for delegated sets of servers and for servers in remote offices.

New to VMM 2008 is the ability to manage the Hyper-V and ESX hypervisors. The management of Hyper-V hosts is done through Windows Remote Management (WinRM) and the Windows Management Instrumentation (WMI) interface. In fact, when a potential Hyper-V host is added, if the Hyper-V role is not enabled in Windows Server 2008, VMM can automatically enable that role for the administrator. This feature is also available to potential Virtual Server hosts for Windows Server 2003 systems.

The management of VMware VI3 ESX hosts is actually done through a VMware VirtualCenter server. VMM 2008 interfaces with VirtualCenter through the VirtualCenter Web Services API. Thus, a VirtualCenter server is required for VMware management, and most enterprise installations of VMware will have at least one VirtualCenter server. What is unique to VMM 2008 is the ability to manage multiple VirtualCenter servers. VMM can add multiple VirtualCenter servers, allowing an administrator to aggregate the entire VMware infrastructure and provide a single enterprise view that was not possible before.

As part of the System Center family of products, VMM uses the System Center or Outlook-style interface in the Administrator Console. The VMM Administrator Console is not an MMC snap-in; it's a completely new application built using the Microsoft .NET Framework and is built on top of Windows PowerShell 1.0. In fact, as noted earlier, any action in the Administrator Console calls the associated Windows PowerShell command, so the UI actually uses Windows PowerShell. Any command or function done in the Administrator Console can be done through the command line in Windows PowerShell.

Each wizard in the Administrator Console has a View Script button that can show the associated Windows PowerShell script for the command about to be run—a great starting point for learning Windows PowerShell as it relates to VMM. New in VMM 2008, the View Script action now opens these scripts in Notepad, so you can easily edit them right from VMM. You can also easily save the edited scripts, which you can then reuse right from the VMM library—another new feature in VMM 2008. The cmdlets from VMM 2007 have been updated for VMM 2008, including support for VMware servers. The same cmd­­lets work across virtualization platforms, so that cmdlets like New-VM work on both Microsoft and VMware systems. IT administrators can thus use one set of cmdlets to manage Virtual Server, Hyper-V, and VMware ESX hosts.

Virtual Machine Manager 2008 is designed to provide three important benefits for IT administrators:

  • Maximize resources
  • Achieve better agility
  • Leverage existing skills

A number of features and functions promote these benefits. First, VMM helps maximize your resources by integrating the management of your entire virtual infrastructure, regardless of hypervisor. By integrating Microsoft and VMware systems, VMM 2008 provides a single view of all hosts and virtual machines, as shown in Figure 2, and allows administrators to filter and view their systems by parameters such as host, operating system, owner, date added, and so forth.

fig02.gif

Figure 2 The VMM Console shows integrated Microsoft and VMware management (Click the image for a larger view)

VMM also helps maximize system resources through easy server consolidation with conversions such P2V and V2V. P2V lets you consolidate your existing physical machines into virtual machines without having to reinstall those machines. This is especially useful when converting machines that have low utilization for their hardware, so you can maximize resources by placing several low-utilization machines together on one piece of physical hardware. P2V is an integrated feature of VMM and doesn't require additional software or servers. For VMM 2008, support for a greater number of physical systems has been added, including Windows Vista, Windows Server 2008, and x64 hosts. The P2V functionality of VMM is a great companion to planning tools such as the Microsoft Assessment Planning (MAP) tool (discussed in the article by Baldwin Ng and Jay Sauls in this issue of TechNet Magazine), which helps identify candidates for server consolidation.

If you already have virtual machines in VMware's VMDK format, VMM allows you to use V2V to convert your existing VMDKs into the VHD format. This is an offline process—the VMware VM has to be shut down as the V2V process converts the actual VMDK file to a VHD. You can also convert a running VMware VM by using the P2V function. This may be a little confusing, but it's important to remember that virtual machines are machines first, virtual second. Since all other systems see VMs as running machines, so will VMM's P2V functionality, which lets you convert a VM running on any virtualization software to a Microsoft VHD.

VMM provides greater agility for IT administrators through several features. One of the key features that VMM enables is the migration of VMs from one host to another, which can help maintain high availability and server optimization. With Hyper-V hosts, VMM 2008 supports Quick Migration, which can move a VM between Hyper-V hosts with only seconds of downtime. This requires a Windows Server 2008 cluster and shared storage, but VMM helps ease the management and configuration.

With a VMware ESX host, VMM 2008 also supports VMware VMotion, the VMware feature that moves VMs without any user-perceptible downtime. VMotion-enabled VMware ESX hosts are required, as is a cluster and SAN back-end like Quick Migration. Later in this article, I'll walk you through a VMotion using VMM 2008.

Finally, VMM 2008 can migrate an existing Virtual Server 2005 VM onto a Hyper-V host, automatically performing all the upgrades and conversions needed for migration.

As part of any VM deployment (including the migrations described above) started through either conversions or new deployments, VMM uses a process called Intelligent Placement to deploy the VMs to the hosts. It also uses Intelligent Placement to query all the virtual machine hosts that it is managing, retrieves several parameters about the resource availability of those hosts, and then returns a weighted list of recommended hosts to which you can deploy the VM. As you can see in Figure 3, Intelligent Placement supports Microsoft and VMware hosts, along with their storage configurations. Intelligent Placement in VMM 2008 is both platform aware and configuration aware. Thus it will only recommend hosts that fit the correct host platform; only hosts that are clustered if high availability is needed, and only x64 capable hosts for x64 VMs.

fig03.gif

Figure 3 Intelligent Placement analyzes all available hosts (Click the image for a larger view)

Integration with System Center

One of the key features of VMM 2008 is the integration with System Center Operations Manager 2007. While VMM 2007 had some integration with Operations Manager, VMM 2008 includes a product connector for Operations Manager that greatly increases the functionality of the integration. Through its integration with Operations Manager, VMM provides consolidated operations manager reports from the admin console, as well as through a new feature called Performance and Resource Optimization (PRO).

PRO enables VMM 2008 to create alerts called PRO Tips and even perform automated action remedies based on monitoring parameters from Operations Manager. Figure 4 shows some example PRO Tips. When using a PRO-enabled management pack (PRO pack), VMM 2008 can perform automated actions such as migrations of VMs and creation of new VMs based on host-, hypervisor-, hardware-, and even workload-based performance parameters.

fig04.gif

Figure 4 PRO Tips provide alerts and remedies for issues in the virtual infrastructure (Click the image for a larger view)

Virtual Machine Manager 2008 Installation

To perform a System Center VMM 2008 installation, there are several prerequisites and new system requirements. First, the VMM 2008 server requires Windows Server 2008 x64. The server will not install on Windows Server 2003 or on x86 versions of Windows Server 2008. The Admin Console and other components can still be installed on Windows Server 2003 and Windows XP or Windows Vista (in the case of the console), with the same requirements and installation procedures as VMM 2007.

Second, VMM 2008 requires an installation against an Active Directory domain for its security model. VMM 2008 supports the management of perimeter network (non-domain joined) hosts, including the P2V of non-domain systems, which is new for VMM 2008. One of the advantages of using Windows Server 2008 as the installation platform is that many of the prerequisites for VMM (such as the .NET Framework 3.0, WinRM, and Windows PowerShell 1.0) are already built in. Finally, VMM 2008 requires the Windows Automated Installation Kit (WAIK) 3.0, although the VMM 2008 installer includes the installation files.

While I recommend that in a production environment each VMM component be installed on a separate production server, I'll discuss a single-server installation. The recommended hardware for a VMM server installation is an x64-based server running at 2.8GHz or higher with at least 2GB of RAM. Since this is a single-server installation with a local SQL database, 7GB of hard disk space is required. Note that if a remote database were used, only 1GB would be required for the VMM installation itself. An additional 80GB of disk space is recommended for the local library installation.

As mentioned earlier, VMM runs on a Windows Server 2008 x64 installation. Additional software requirements include the .NET Framework 3.0, Windows PowerShell 1.0, WinRM, and IIS 6.0 or later for the self-service portal. The Microsoft MSXML 6.0 Parser is also required, but it is included a part of .NET Framework 3.0.

When you start the VMM installation, you are offered five options: the Virtual Machine Manager Server, the Administrator Console, the Self-Service Portal, and the Local Agent, as well as an option to configure the Operations Manager management pack. As I mentioned, I will install all the components on a single machine, starting with the VMM Server. Once the setup starts, the first screens will check for the system prerequisites.

In addition to the requirements mentioned previously, the machine must be on a domain. The VMM server installation will automatically enable the built-in functions for you, thus eliminating the need to enable them manually.

Once you launch the installer, I recommend using the Windows Update option to make sure VMM 2008 is up to date. The installer will then review the options, mainly relating to the SQL database installation. For this example, I'll use SQL Server 2005 Express Edition.

Next, the wizard asks you to identify the location for the centralized library. This can be either a local directory on the VMM server (and a share will be created for that directory) or it can be an existing file share. The default location is C:\ProgramData\Virtual Machine Manager Library Files.

Port assignments are next. Here I configure the port for the Administrator Console's connection to the core VMM server service (8100 by default); the port used by WinRM to perform the management functions (80 by default); and the port used by the Background Intelligent Transfer Service (BITS) to move files to the virtual machine hosts (443 by default). Once you've entered this information, a summary screen is presented and the server installation can finish.

Next, I'll install the Administrator Console, which has system prerequisites similar to the VMM server. The only configuration option available other than the install directory is to confirm the communications port used to connect to the VMM server service. This port should be 8100, as configured in the VMM server installation.

At the end of the installation, you are given the options to create a desktop shortcut for the Administrator Console and to open the console when you close the setup. It's a good idea to select both. The first time you open the Administrator Console, you will be prompted to Connect to the server. With the single server install, localhost on port 8100 is correct and you can simply press Enter to start the console.

Finally, I will install the self-service portal. The prerequisites for this are IIS 6.0 or 7.0, .NET Framework 3.0, and Windows PowerShell 1.0. (Windows PowerShell is needed as the self-service portal is just another interface to the core VMM services, which use Windows PowerShell.) For Windows Server 2008, you need to enable the IIS role before starting the VMM 2008 installation. When doing so, make sure the following IIS Role Services are enabled:

  • Common HTTP Features (Static Content, Default Document, Directory Browsing, HTTP Errors)
  • Application Development (ASP.NET, .NET Extensibility, ISAPI Extensions, ISAPI Filters)
  • Security (Request Filtering)
  • IIS 6.0 Management Compatibility

If these role services are enabled, the installation will pass the prerequisite check and the installation will proceed. During installation, the configuration options deal only with the ports used by the self-service portal. The first, the port to connect to the core VMM service, is 8100, the same as for the Administrator Console. The second is the port on which to run the portal. The default is port 80, but in many configurations, that port is already taken and the VMM installer will warn you if that's the case. If necessary, change the port to one that's open, such as 8080. The installer will then create a Web site called Microsoft System Center Virtual Machine Manager 2008 Self-Service Portal Home. The configuration can be changed in the Server Manager.

When the installation of IIS has completed, you can simply open the Web site by going to localhost:8080 in Internet Explorer. If you are prompted for authentication when opening the Web site, this is because of Internet Explorer security settings. The self-service portal should run in the intranet context in Internet Explorer and you may need to add the VMM server to the list of intranet sites in Internet Explorer. Once those configurations are complete, you will be ready to create and use self-service-enabled VMs in VMM 2008.

Adding VMware ESX Hosts

While there are many new features in VMM 2008, arguably the most anticipated feature is the addition of support of VMware ESX host management. With this support, VMM is now capable of managing the virtual infrastructure of the majority of enterprise IT departments.

The process of adding ESX hosts into Virtual Machine Manager 2008 is fairly simple. As I noted earlier, VMM 2008 manages VMware hosts through a VirtualCenter server, which must be version 2.0.1 or 2.5. To add the VMware ESX servers into the management console, you simply add the VirtualCenter server using the Add VMware VirtualCenter Server action located in the upper right of the Actions pane.

After you launch the Wizard, type in the computer name of the VirtualCenter server along with the Administrative Account for the VirtualCenter server. VMM will add the ESX hosts, including the existing Host Group structure from VirtualCenter, into the VMM interface. This task may take several minutes, but you can monitor the progress from the VMM Jobs menu.

When all the servers have been imported, you should be able to see the same VMware ESX host server structure in VMM as you see in VirtualCenter. To add another VirtualCenter server, you would simply repeat the process. Once the host structure is added to VMM, you can add non-VMware servers into the same group structure. Of course, the non-VMware servers will not be shown in VirtualCenter.

While VMM 2008 uses VirtualCenter to manage ESX hosts, it needs to be able to directly access the ESX hosts themselves for certain functions, such as V2V, saving state, and cloning VMs from ESX hosts. Thus, after you add the VirtualCenter server into VMM, the hosts will show up as OK (Limited). To enable full management, go into the Properties page of the individual ESX hosts in VMM and supply the appropriate host credentials to directly manage the servers.

VMotion Migration

Whenever VMware management in Virtual Machine Manager 2008 is discussed, invariably the question asked is whether VMM can perform VMotion and other VirtualCenter functions. And since VMM uses VirtualCenter for VMware management, the answer to that question is yes!

Functionally, VMM treats VMotion like any other migration. To start a VMotion, first select the VM you want to move, then select the Migrate virtual machine option from the Actions pane on the right-hand side of VMM. When you've done that, VMM brings up the Intelligent Placement window for that VM and presents the potential destination hosts, with a transfer type of Live, as shown in Figure 5. Intelligent Placement can help you select the right destination hosts for your VMs. Note that this is the same process as performing a Quick Migration using Hyper-V hosts.

fig05.gif

Figure 5 VMotion using Intelligent Placement (Click the image for a larger view)

Select the destination host for the VM—in this case, it is the server called cqaesxi003.contoso.com and click Next. The final summary window, shown in Figure 6, will display the requested action.

fig06.gif

Figure 6 VMotion Summary window (Click the image for a larger view)

As mentioned earlier, each wizard in VMM has a View Script button that can show the Windows PowerShell script for a job in Notepad. This gives us an opportunity to see how Windows PowerShell in VMM 2008 works with VMware. Here's the script for this action:

$VM = Get-VM -VMMServer localhost -Name "MyVM" |
  where {$_.VMHost.Name -eq "cqaesxi003.contoso.com"}
$VMHost = Get-VMHost -VMMServer localhost |   where {$_.Name -eq "cqaesxi003.contoso.com"}
Move-VM -VM $VM -VMHost $VMHost –RunAsynchronously

Three simple commands perform the VMotion for this system. In my example, I am moving the VM MyVM from the VMware server cqaesxi003.contoso.com to the server cqaesxi001.contoso.com. The first command is to identify the virtual machine to be migrated via VMotion. As you can see, in this command line, I assign the virtual machine value to the variable $VM:

$VM = Get-VM -VMMServer localhost -Name "MyVM" |
  where {$_.VMHost.Name -eq " cqaesxi003.contoso.com"}

The second command is to identify the destination ESX host system for the VM. In this line, I assign the variable $VMHost to the ESX host cqaesxi003.contoso.com:

$VMHost = Get-VMHost -VMMServer localhost | where
  {$_.Name -eq " cqaesxi003.contoso.com"}

Finally, I use the Move-VM command to actually move the VM. Here are the complete command line and parameters for Move-VM:

Move-VM [-VM] [<String VM>] -VMHost [<String Host>] 
  [-JobGroup <Guid>] [-JobVariable <String>] [-Path
  <String>] [-PROTipID] [-RunAsynchronously] 
  [-StartVMOnTarget <Boolean>] [-UseLAN <Boolean>]
  [<CommonParameters>]

In keeping with the heterogeneous management philosophy in Virtual Machine Manager, you can see that the command is not vendor-or software-specific. To complete the VMotion, issue this command:

Move-VM -VM $VM -VMHost $VMHost –RunAsynchronously

This tells VMM to run Move-VM, against the VM in $VM, moving to the host system in $VMHost, and to run the job asynchronously. Once the job starts, the entire process can be monitored from the Jobs window in VMM. Again, this same basic command can be done for Quick Migrations on Hyper-V clusters and even non-cluster hosts, using a LAN based transfer.

As you see, System Center Virtual Machine Manager 2008 has extended the great features and functions of Virtual Machine Manager 2007 with new management platforms and new features. By reviewing the installation process and a couple of the features, I hope I've shown how easy and the management of multiple hypervisors is in VMM 2008.

VMM 2008 is designed to be the consolidated management software for virtualization, unifying both physical and virtual systems from Microsoft and VMware. With this new version of Virtual Machine Manager, VMware administrators, Microsoft Virtual Server 2005 administrators, and new Hyper-V administrators can all take advantage of a single tool, a single scripting interface, and most importantly, a single management process for their virtual infrastructure.

Edwin Yuen is the Technical Product Manager in the Windows Enterprise Management division for System Center Virtual Machine Manager. Edwin came to Microsoft with the July 2006 acquisition of Softricity. Edwin also has 13 years of technical consulting experience in both the commercial and federal space. He has a BS in electrical engineering from Johns Hopkins University.