Virtualisation In this article, I will examine VMM 2008 The red box on the upper-left represents At a glance: and the new features it brings to IT adminis- the Manager 2008 server Support for VMware VMs trators. I’ll then look at the requirements and service. Above it are the different interfaces Windows PowerShell- based scripting and the steps involved with a VMM installation. into the service: the Administrator Console, automation Finally, I’ll take a closer look at how to use the Windows PowerShell interface, and the Consolidated, centralised some of the new features of VMM 2008. management Installation procedures An introduction to Virtual Machine There are significantly Manager 2008 System Center more interfaces to 2008 is a standalone application that provides centralised, enterprise-class management of the VMM system in virtual machines running under Virtual Server 2005 R2 SP1, Windows Serv- VMM 2008 er 2008 Hyper-V, Microsoft Hyper-V Server Manage your virtual 2008 and VMware Infrastructure 3 (ESX/ ESXi) servers. Together with other System Self-Service Web Portal with delegated user Center products, VMM provides end-to-end access. Windows PowerShell forms the basis physical and virtual infrastructure manage- for all access to the VMM server. The VMM environments with ment. Figure 1 shows the architectural lay- Admin Console is built entirely on Win- out of Virtual Machine Manager. dows PowerShell, so you can simply create As those familiar with VMM 2007 will Windows PowerShell scripts that the VMM note, there are significantly more interfaces server service runs. Thus, the public API for Virtual Machine to the VMM system in VMM 2008 (see Fig- VMM 2008 is Windows PowerShell, and any ure 1). The boxes in the upper-left represent program can leverage VMM using Windows VMM 2008; the boxes in the upper-right rep- PowerShell. A great example of this is the in- resent System Center Operations Manager tegration of Citrix’s XenDesktop Desktop Manager 2008 2007, and the managed systems and interfac- Delivery Controller with Virtual Machine es are shown below. The red boxes indicate Manager, which is done entirely through Edwin Yuen the management servers, the blue boxes Windows PowerShell. show the system inputs, and the green box- Supporting VMM is a SQL Server 2005 or es are the managed host systems with their SQL Server 2008 database. You can run it ei- Last year, Microsoft introduced System Center managed objects shown in yellow. ther on a full installation or on SQL Server Virtual Machine Manager 2007, which provides Administrator’s Self-Service a consolidated interface for managing a virtual Console Web Portal Operator’s Web Windows Console Console PowerShell Windows PowerShell infrastructure running Microsoft Virtual Server Connector 2005. Now, to coincide with the release of the VMM supports all the traditional vir- Virtual Machine Manager Operations Manager Server Server new Hyper-V hypervi- tualisation tasks, such as rapid virtual ma- sor, a new version of Virtual Machine Man- chine (VM) deployments from templates Management Interfaces ager (VMM) has been released. Not only does and pre-configured VMs, physical-to-virtu- System Center Virtual Machine Manager al (P2V) conversions, a centralised library Virtual Server VMM Library VMware VI� 2008 manage Microsoft Virtual Server 2005 of virtual infrastructure objects, and even Host Server and Windows Server 2008 Hyper-V installa- virtual-to-virtual (V2V) conversion of VM- Virtual Center Server tions, but support has also been extended to ware virtual machines (VMX configuration VM VM Template VM VM VM VM ESX Host This article is based on a VMware Infrastructure 3 (ESX/ESXi) serv- files plus VMDK virtual disks) to Hyper-V prerelease version of Virtual ers. With VMM, you now have an integrated VMs. Moreover, VMM integration with the VM ISO VHD Script VM VM VM VM VM VM VM VM Machine Manager 2008. All management interface that works with your rest of the System Center family brings the Figure 1 System Center information herein is subject entire virtual infrastructure, including both management of physical and virtual systems SAN Storage Virtual Machine Manager to change. Microsoft and VMware systems. to a single pane of glass. 2008 architecture

20 To get your FREE copy of TechNet Magazine subscribe at: www.microsoft.com/uk/technetmagazine TechNet Magazine November 2008 21 Virtualisation

Express Edition if no other database is avail- agement of Hyper-V hosts is done through sole is not an MMC snap-in; it’s a completely into virtual machines without having to re- able. While the diagram shows both Opera- Windows Remote Management (WinRM) new application built using the Microsoft install those machines. This is especially use- tions Manager and Virtual Machine Manager and the Windows Management Instrumen- .NET Framework and is built on top of Win- ful when converting machines that have low pointing to SQL Server, the two programs do tation (WMI) interface. In fact, when a po- dows PowerShell 1.0. In fact, as noted earli- utilisation for their hardware, so you can not share a database. They simply both run tential Hyper-V host is added, if the Hyper-V er, any action in the Administrator Console maximise resources by placing several low- on the same version of SQL Server. The ac- role is not enabled in Windows Server 2008, calls the associated Windows PowerShell tual integration between Virtual Machine VMM can automatically enable that role for command, so the UI actually uses Windows Manager and Operations Manager is through the administrator. This feature is also avail- PowerShell. Any command or function done VMM 2008 provides a a connector that is available through VMM. able to potential Virtual Server hosts for in the Administrator Console can be done This connector allows VMM and OpsMgr systems. through the command line in Windows single view of all hosts to share data, which brings virtualisation in- The management of VMware VI3 ESX PowerShell. formation into OpsMgr and brings OpsMgr hosts is actually done through a VMware Each wizard in the Administrator Console and virtual machines data to VMM for actions. VirtualCenter server. VMM 2008 interfaces has a View Script button that can show the The bottom half of the diagram shows with VirtualCenter through the VirtualCen- associated Windows PowerShell script for and allows you to set the managed hosts. VMM 2008 still man- ter Web Services API. Thus, a VirtualCenter the command about to be run – a great start- ages Virtual Server 2005 R2 SP1 virtual ma- server is required for VMware management, ing point for learning Windows PowerShell parameters to filter chine hosts and a centralised library share, and most enterprise installations of VMware as it relates to VMM. New in VMM 2008, the as it did in VMM 2007. It should be noted will have at least one VirtualCenter server. View Script action now opens these scripts and view your systems that in VMM, the library share is not a spe- What is unique to VMM 2008 is the ability in Notepad, so you can easily edit them right cial file store or server. It’s simply a Windows to manage multiple VirtualCenter servers. from VMM. You can also easily save the ed- file share that VMM manages. You can man- VMM can add multiple VirtualCenter serv- ited scripts, which you can then reuse right utilisation machines together on one piece of age the library through VMM or you can eas- ers, allowing an administrator to aggregate from the VMM library – another new fea- physical hardware. P2V is an integrated fea- ily copy and delete files out of the file share the entire VMware infrastructure and pro- ture in VMM 2008. The cmdlets from VMM ture of VMM and doesn’t require additional and let VMM discover the changes. You can vide a single enterprise view, which was not 2007 have been updated for VMM 2008, in- software or servers. For VMM 2008, support also have multiple libraries, which is useful possible before. cluding support for VMware servers. The for a greater number of physical systems has for delegated sets of servers and for servers As part of the System Center family of same cmdlets work across virtualisation plat- been added, including , Win- in remote offices. products, VMM uses the System Center or forms, so that cmdlets like New-VM work on dows Server 2008 and x64 hosts. The P2V New to VMM 2008 is the ability to manage Outlook®-style interface in the Administra- both Microsoft and VMware systems. IT ad- functionality of VMM is a great companion the Hyper-V and ESX . The man- tor Console. The VMM Administrator Con- ministrators can thus use one set of cmdlets to planning tools such as the Microsoft As- to manage Virtual Server, Hyper-V, and VM- sessment Planning (MAP) tool (discussed in ware ESX hosts. the article by Baldwin Ng and Jay Sauls in Virtual Machine Manager 2008 is designed this issue of TechNet Magazine), which helps to provide three important benefits for IT identify candidates for server consolidation. administrators: If you already have virtual machines in VMware’s VMDK format, VMM allows you • Maximise resources to use V2V to convert your existing VM- • Achieve better agility DKs into the VHD format. This is an offline • Leverage existing skills process – the VMware VM has to be shut A number of features and functions promote down as the V2V process converts the actu- these benefits. First, VMM helps maximise al VMDK file to a VHD. You can also con- your resources by integrating the manage- vert a running VMware VM by using the ment of your entire virtual infrastructure, P2V function. This may be a little confusing, regardless of . By integrating but it’s important to remember that virtual Microsoft and VMware systems, VMM 2008 machines are machines first, virtual second. provides a single view of all hosts and virtual Since all other systems see VMs as running machines, as shown in Figure 2, and allows machines, so will VMM’s P2V functionality, administrators to filter and view their sys- which lets you convert a VM running on any tems by parameters such as host, operating virtualisation software to a Microsoft VHD. system, owner, date added and so forth. VMM provides greater agility for IT ad- VMM also helps maximise system resourc- ministrators through several features. One Figure 2 The VMM Console shows integrated es through easy server consolidation with of the key features that VMM enables is the Microsoft and VMware conversions such P2V and V2V. P2V lets you migration of VMs from one host to anoth- management consolidate your existing physical machines er, which can help maintain high availabil-

22 To get your FREE copy of TechNet Magazine subscribe at: www.microsoft.com/uk/technetmagazine TechNet Magazine November 2008 23 Virtualisation

ity and server optimisation. With Hyper-V then returns a weighted list of recommend- rectory domain for its security model. VMM hosts, VMM 2008 supports Quick Migration, ed hosts to which you can deploy the VM. 2008 supports the management of perimeter which can move a VM between Hyper-V As you can see in Figure 3, Intelligent Place- network (non-domain joined) hosts, includ- hosts with only seconds of downtime. This ment supports Microsoft and VMware hosts, ing the P2V of non-domain systems, which is requires a Windows Server 2008 cluster and along with their storage configurations. In- new for VMM 2008. shared storage, but VMM helps ease the man- telligent Placement in VMM 2008 is both One of the advantages of using Windows agement and configuration. platform aware and configuration aware. Server 2008 as the installation platform is that With a VMware ESX host, VMM 2008 also Thus it will only recommend hosts that fit many of the prerequisites for VMM (such as supports VMware VMotion, the VMware the correct host platform; hosts must be clus- the .NET Framework 3.0, WinRM and Win- feature that moves VMs without any user- tered if high availability is needed, and x64 dows PowerShell 1.0) are already built in. perceptible downtime. VMotion-enabled capable if they are to support x64 VMs. Finally, VMM 2008 requires the Windows VMware ESX hosts are required, as is a clus- Automated Installation Kit (WAIK) 3.0, al- ter and SAN back-end like Quick Migration. Integration with System Center though the VMM 2008 installer includes the Later in this article, I’ll walk you through a One of the key features of VMM 2008 is the Figure 4 PRO Tips provide alerts and remedies for issues in the installation files. VMotion using VMM 2008. integration with System Center Operations virtual infrastructure While I recommend that in a production Finally, VMM 2008 can migrate an existing Manager 2007. While VMM 2007 had some environment each VMM component be in- Virtual Server 2005 VM onto a Hyper-V host, integration with Operations Manager, VMM meters from Operations Manager. Figure 4 stalled on a separate production server, I’ll automatically performing all the upgrades 2008 includes a product connector for Op- shows some example PRO Tips. When us- discuss a single-server installation. The rec- and conversions needed for migration. erations Manager that greatly increases the ing a PRO-enabled management pack (PRO ommended hardware for a VMM server in- As part of any VM deployment (includ- functionality of the integration. Through its pack), VMM 2008 can perform automated stallation is an x64-based server running at ing the migrations described above) started integration with Operations Manager, VMM actions such as migrations of VMs and cre- 2.8GHz or higher with at least 2GB of RAM. through either conversions or new deploy- provides consolidated operations manager ation of new VMs based on host-, hypervi- Since this is a single-server installation with ments, VMM uses a process called Intelli- reports from the admin console, as well as sor-, hardware- and even workload-based a local SQL database, 7GB of hard disk space gent Placement to deploy the VMs to the through a new feature called Performance performance parameters. is required. Note that if a remote database hosts. It also uses Intelligent Placement to and Resource Optimization (PRO). were used, only 1GB would be required for query all the virtual machine hosts that it is PRO enables VMM 2008 to create alerts the VMM installation itself. An additional managing, retrieves several parameters about called PRO Tips and even perform auto- VMM 2008 includes 80GB of disk space is recommended for the the resource availability of those hosts, and mated remedies based on monitoring para­ local library installation. a product connector As mentioned earlier, VMM runs on a Windows Server 2008 x64 installation. Ad- for OpsMgr that ditional software requirements include the .NET Framework 3.0, Windows PowerShell greatly increases the 1.0, WinRM, and IIS 6.0 or later for the self- service portal. The Microsoft MSXML 6.0 functionality of the Parser is also required, but it is included as part of .NET Framework 3.0. integration When you start the VMM installation, you are offered five options: the Virtual Machine Manager Server, the Administrator Console, Virtual Machine Manager 2008 installation the Self-Service Portal, the Local Agent and To perform a System Center VMM 2008 in- an option to configure the Operations Man- stallation, there are several prerequisites and ager management pack. As I mentioned, I new system requirements. First, the VMM will install all the components on a single 2008 server requires Windows Server 2008 machine, starting with the VMM Server. x64. The server will not install on Windows Once the setup starts, the first screens will Server 2003 or on x86 versions of Windows check for the system prerequisites. Server 2008. The Admin Console and other In addition to the requirements men- components can still be installed on Win- tioned previously, the machine must be on dows Server 2003 and Windows XP® or Win- a domain. The VMM server installation will dows Vista® (in the case of the console), with automatically enable the built-in functions Figure 3 Intelligent the same requirements and installation pro- for you, thus eliminating the need to enable Placement analyses all cedures as VMM 2007. Second, VMM 2008 them manually. Once you launch the install- available hosts requires an installation against an Active Di- er, I recommend using the

24 To get your FREE copy of TechNet Magazine subscribe at: www.microsoft.com/uk/technetmagazine TechNet Magazine November 2008 25 Virtualisation option to make sure VMM 2008 is up to date. • Common HTTP Features (Static Content, ready to create and use self-service-enabled console, you simply add the VirtualCenter The installer will then review the options, Default Document, Directory Browsing, VMs in VMM 2008. server using the Add VMware VirtualCenter mainly relating to the SQL database instal- HTTP Errors) Server action located in the upper right of lation. For this example, I’ll use SQL Server • Application Development (ASP.NET, Adding VMware ESX hosts the Actions pane. 2005 Express Edition. .NET Extensibility, ISAPI Extensions, While there are many new features in VMM After you launch the wizard, type in the Next, the wizard asks you to identify the ISAPI Filters) 2008, arguably the most eagerly awaited fea- computer name of the VirtualCenter server location for the centralised library. This can • Security (Request Filtering) ture is the addition of support of VMware along with the Administrative Account for be either a local directory on the VMM serv- • IIS 6.0 Management Compatibility ESX host management. With this support, the VirtualCenter server. VMM will add the er (and a share will be created for that direc- VMM is now capable of managing the vir- ESX hosts, including the existing Host Group tory) or it can be an existing file share. The If these role services are enabled, the in- tual infrastructure of the majority of enter- structure from VirtualCenter, into the VMM default location is C:\ProgramData\Virtual stallation will pass the prerequisite check prise IT departments. interface. This task may take several minutes, Machine Manager Library Files. and the installation will proceed. During The process of adding ESX hosts into Vir- but you can monitor the progress from the Port assignments are the next thing to installation, the configuration options deal tual Machine Manager 2008 is fairly simple. VMM Jobs menu. sort out. I need to configure the port for only with the ports used by the self-service As I noted earlier, VMM 2008 manages VM- When all the servers have been import- the Administrator Console’s connection to portal. The first, the port to connect to the ware hosts through a VirtualCenter server, ed, you should be able to see the same VM- the core VMM server service (8100 by de- core VMM service, is 8100, the same as for which must be version 2.0.1 or 2.5. To add the ware ESX host server structure in VMM as fault); the port used by WinRM to perform the Administrator Console. The second is the VMware ESX servers into the management you see in VirtualCenter. To add another Vir- the management functions (80 by default); port on which to run the portal. The default tualCenter server, you would simply repeat and the port used by the Background Intelli- is port 80, but in many configurations, that the process. Once the host structure is add- gent Transfer Service (BITS) to move files to ed to VMM, you can add non-VMware serv- the virtual machine hosts (443 by default). ers into the same group structure. Of course, Once you’ve entered this information, a the non-VMware servers will not be shown summary screen is presented and the server With the added in VirtualCenter. installation can finish. While VMM 2008 uses VirtualCenter to Next, I’ll install the Administrator Con- support for VMware manage ESX hosts, it needs to be able to di- sole, which has system prerequisites similar rectly access the ESX hosts themselves for to the VMM server. The only configuration ESX, VMM 2008 can certain functions, such as V2V, saving state, option available other than the install direc- and cloning VMs from ESX hosts. Thus, after tory is to confirm the communications port manage the virtual you add the VirtualCenter server into VMM, used to connect to the VMM server service. the hosts will show up as OK (Limited). To This port should be 8100, as configured in infrastructure of most enable full management, go into the Prop- the VMM server installation. erties page of the individual ESX hosts in At the end of the installation, you are giv- IT departments VMM and supply the appropriate host cre- en the options to create a desktop shortcut dentials to directly manage the servers. for the Administrator Console and to open port is already taken and the VMM install- the console when you close the setup. It’s a er will warn you if that’s the case. If neces- VMotion migration good idea to select both. The first time you sary, change the port to one that’s open, such Whenever VMware management in Virtual open the Administrator Console, you will be as 8080. The installer will then create a web- Figure 5 VMotion using Intelligent Placement Machine Manager 2008 is discussed, invari- prompted to Connect to the server. With the site called Microsoft System Center Virtual ably the question asked is whether VMM can single server install, localhost on port 8100 Machine Manager 2008 Self-Service Portal perform VMotion and other VirtualCenter is correct and you can simply press Enter to Home. The configuration can be changed in functions. And since VMM uses VirtualCen- start the console. the Server Manager. ter for VMware management, the answer to Finally, I will install the self-service portal. When the installation of IIS has complet- that question is yes! The prerequisites for this are IIS 6.0 or 7.0, ed, you can simply open the website by go- Functionally, VMM treats VMotion like .NET Framework 3.0, and Windows Power- ing to localhost:8080 in Internet Explorer. If any other migration. To start a VMotion, first Shell 1.0. (Windows PowerShell is needed as you are prompted for authentication when select the VM you want to move, then select the self-service portal is just another inter- opening the website, this is because of In- the Migrate virtual machine option from the face to the core VMM services, which use ternet Explorer security settings. The self- Actions pane on the right-hand side of VMM. Windows PowerShell.) For Windows Server service portal should run in the intranet When you’ve done that, VMM brings up the 2008, you need to enable the IIS role before context in Internet Explorer and you may Intelligent Placement window for that VM starting the VMM 2008 installation. When need to add the VMM server to the list of in- and presents the potential destination hosts, doing so, make sure the following IIS Role tranet sites in Internet Explorer. Once those with a transfer type of Live, as shown in Fig- Services are enabled: configurations are complete, you will be Figure 6 VMotion Summary window ure 5. Intelligent Placement can help you

26 To get your FREE copy of TechNet Magazine subscribe at: www.microsoft.com/uk/technetmagazine TechNet Magazine November 2008 27 Virtualisation select the right destination hosts for your the VMotion, issue this command:

VMs. This is the same process as performing Move-VM -VM $VM -VMHost $VMHost –RunAsynchronously a Quick Migration using Hyper-V hosts. This tells VMM to run Move-VM against the Select the destination host for the VM – in VM in $VM, moving to the host system in this case the server called cqaesxi003.conto- $VMHost, and to run the job asynchronous- so.com – and click Next. The final summary ly. Once the job starts, the entire process window, shown in Figure 6, will display the requested action. As mentioned earlier, each wizard in VMM has a View Script button that can Admins can use VMM show the Windows PowerShell script for a job in Notepad. This gives us an opportuni- 2008 to unify both physical ty to see how Windows PowerShell in VMM 2008 works with VMware. Here’s the script and virtual systems from for this action: $VM = Get-VM -VMMServer localhost -Name "MyVM" | Microsoft and VMware 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 can be monitored from the Jobs window in Three simple commands perform the VMM. Again, this same basic command can VMotion for this system. In my example, I be done for Quick Migrations on Hyper-V am moving the VM MyVM from the VM- clusters and even non-cluster hosts, using a ware server cqaesxi003.contoso.com to the LAN based transfer. server cqaesxi001.contoso.com. The first command is to identify the virtual machine to be migrated via VMotion. As you can see, Conclusion in this command line, I assign the virtual ma- As you see, System Center Virtual Machine chine value to the variable $VM: Manager 2008 has extended the great fea- tures and functions of Virtual Machine Man- $VM = Get-VM -VMMServer localhost -Name "MyVM" | where {$_.VMHost.Name -eq " cqaesxi003.contoso.com"} ager 2007 with new management platforms and new features. By reviewing the instal- The second command is to identify the lation process and a couple of the features, destination ESX host system for the VM. In I hope I’ve shown how easy it is to manage this line, I assign the variable $VMHost to multiple hypervisors in VMM 2008. the ESX host cqaesxi003.contoso.com: VMM 2008 is designed to be the consol- $VMHost = Get-VMHost -VMMServer localhost | where idated management software for virtuali- {$_.Name -eq " cqaesxi003.contoso.com"} sation, unifying both physical and virtual Finally, I use the Move-VM command to systems from Microsoft and VMware. With move the VM. Here are the complete com- this new version, VMware administrators, mand line and parameters for Move-VM: Microsoft Virtual Server 2005 administrators and new Hyper-V administrators can all ben- Move-VM [-VM] [] -VMHost [] [-JobGroup ] [-JobVariable ] [-Path efit from a single tool, a single scripting in- ] [-PROTipID] [-RunAsynchronously] [-StartVMOnTarget ] [-UseLAN ] terface and, above all, a single management [] process for their virtual infrastructure. ■ In keeping with the heterogeneous man- agement philosophy in Virtual Machine For more information on Virtual Machine Manager, you can see that the command is Manager, visit the VMM TechCenter at: not vendor-or software-specific. To complete http://technet.microsoft.com/en-gb/scvmm

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.

28 To get your FREE copy of TechNet Magazine subscribe at: www.microsoft.com/uk/technetmagazine