Professional Documents
Culture Documents
2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and
intellectual property laws. This product is covered by one or more patents listed at
http://www.vmware.com/download/patents.html.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other
jurisdictions. All other marks and names mentioned herein may be trademarks of their respective
companies.
VMware, Inc.
3401 Hillview Ave
Palo Alto, CA 94304
www.vmware.com
Contents
1.
Introduction ...................................................................................... 5
1.1 SAP Platform Overview ................................................................................................. 5
1.2 vSphere .......................................................................................................................... 6
1.3 HP Hardware Overview ................................................................................................. 7
1.4 SAP Datacenter Benefits ............................................................................................... 8
2.
3.
4.
5.
6.
7.
Snapshots ...................................................................................... 69
7.1 Take the First Snapshot and Update from Windows Server 2003 SP1 to SP2 ........... 70
7.2 Take a Second Snapshot and Roll Back to the First ................................................... 73
2011 VMware, Inc. All rights reserved.
Page 3 of 110
8.
9.
10.
1. Introduction
This guide focuses on the deployment of SAP ERP software on the VMware virtualized platform, and
showcases the benefits that VMware solutions provide for the SAP datacenter. Technical procedures,
accompanied by screenshots, are provided for using the following VMware features with an SAP ERP
ECC 6.0 system installed in a virtual machine:
Template creation and cloning
VMware snapshots
VMware Infrastructure (VMware ESX 3.x and VirtualCenter 3). However, all of the procedures are the
same for the newest version of the platform, VMware vSphere , and the look and feel of the UI for the
VMware vCenter client is similar to VirtualCenter.
1.1
The SAP flagship product is called SAP ERP. In addition to ERP software, other key SAP products and
solutions include business intelligence, customer relationship management, supply chain management,
supplier relationship management, human resource management, product life cycle management,
enterprise portal software, and knowledge warehouse.
SAP Business Suite applications are based on the SAP NetWeaver application and integration platform.
SAP enterprise applications can be deployed in a two- or three-tier architecture. The three-tier
client/server architecture generally consists of a presentation layer, an application layer, and a database
layer. These three layers can run separately on different computers or all together on the same computer,
depending on the requirements and size of the SAP solution being deployed. The presentation and
application server layers can be distributed over multiple computers. The three-tier architecture scales to
support large numbers of users. The two-tier architecture is usually sufficient for many smaller and
midsize companies, as well as for sandbox, development, training and test systems.
The SAP application layer can be further broken down into the following components:
Central services, which include messaging (manages client connections and communications) and
enqueue (SAP lock management) services.
Application services that process online and batch workloads, which can be further categorized into
the following types:
o
The specific SAP product determines the type of application service required (ABAP, Java, or both).
1.2
vSphere
vSphere is a virtualization platform that enables datacenters to transform into a simplified cloud
infrastructure and enables the next generation of flexible, reliable IT services.
The components of vSphere are classified into:
Infrastructure services These are components that comprehensively virtualize server, storage and
network resources, aggregate them and allocate them precisely on demand to applications based on
business priority.
Application services These are components that provide built in service level controls to all
applications running on the Cloud operating system platform, regardless of application type or
operating system.
VMware vCenter Server provides a central point of control for virtualization management, essential for
administering infrastructure and application services, with deep visibility into every aspect of virtual
infrastructure, automation of day to day operational tasks and the scalability to manage large datacenter
environments.
vSphere holistically manages hardware resources and provides built-in application service level controls,
creating dramatically simplified cloud infrastructures. The different VMware products are summarized in
the following logical architecture.
1.3
HP Hardware Overview
As with the ProLiant full-height blade servers, the half-height ProLiant BL460c and BL465c servers are
excellent platforms for virtualization, offering an integrated, easily managed infrastructure. To develop this
guide, VMware used the ProLiant BL460c half-height blade configured as shown in Appendix B.
The ProLiant BL460c and BL465c servers double the computing capacity in the same space versus fullheight blades, while keeping the same flexibility, power management and system control and VMware
best practices. The ProLiant BL460c and BL465c offer hot-plug hard drives, large memory capacity,
multiple expansion slots and the latest generation processors, making them favorable choices for
VMware Infrastructure.
HP BladeSystem servers, storage, and other modular components can be added or removed easily
without having to power off. HP BladeSystem c-Class reduces space requirements and can be set up or
reconfigured easily. HP provides a common and intuitive interface to monitor and control all HP
BladeSystem resourcesserver, storage, network, power and cooling.
1.4
The SAP and vSphere deployment scenarios described in this document demonstrate the following
benefits that the vSphere suite brings to enterprise SAP installations:
Server containment
Availability
Rapid provisioning
1.4.2 Availability
For customers who run SAP environments on x86 hardware and who can accept lower levels of
availability (for example, on non-production systems), VMware HA and vMotion offer a cost-effective
alternative to expensive third-party clustering and replication solutions. With VMware HA, failed SAP
instances and virtual machines on one ESX host can be restarted on another ESX host within minutes.
With vMotion, it is possible to migrate live SAP virtual machines between ESX hosts, and to move SAP
instances off failing hardware, with minimal interruption to end users.
The key benefits of using vSphere to achieve high availability are as follows:
Provide a cost-effective failover alternative to expensive third-party clustering and replication
solutions. VMware software makes it possible to implement enhanced availability without the cost of
identical servers, the complexity of rebuilding clusters when physical hardware is changed, and the
difficulty associated with testing the clustering of physical systems.
Employ a time-efficient mechanism to restart an SAP system within minutes on an available ESX host
in case of failures.
Cause minimal interruption to end users during live migration of SAP virtual machines from one ESX
host to another, and minimize downtime during hardware maintenance.
2.1
The lab environment consists of two ESX hosts connected to shared storage. The SAP ECC 6.0 system
(database and central instance) is installed onto a single virtual machine with the following properties:
Windows Server 2003 guest operating system
115GB VMFS disk
Two virtual CPUs
3GB RAM
The procedure for installing SAP on a virtual machine is the same as installing it in a physical
environment.
Oracle software is uninstalled in the source template so that it can be reinstalled in the new virtual
machine to the new SID and host name.
The SAP CI instance is uninstalled in the source template, as the SAP System Copy process in
the new virtual machine reinstalls a new CI for the new SID and host name.
The SAP system rename is based on a documented and supported SAP procedure (the SAP
System Copy Guide).
The SAP System Copy Guide covers other SAP certified databases (not just Oracle).
The process can be extended for other variations of the SAP application server, ABAP + Java or
Java (covered by the SAP System Copy Guide).
Disadvantages:
o
Includes manual steps (Oracle software de-install and re-install, sapinst input screens).
Requires some of the SAP install media CDs or DVDs (Oracle software, Oracle client, SAP
kernel).
It might be possible to automate the change of the SID and host name of the Oracle software and
database (with Oracle tools or by way of command line) using a script.
Users who want to try this improvement must check with the database vendor and SAP to
determine if such options are supported.
2.3
Snapshots
This test demonstrates software patch testing using the VMware snapshot feature and highlights the
benefits of being able to revert back to the state prior to the software update in case of errors or to
continue with the current state when tests are successful. This process can be applied to an SAP
development or test system for testing patches at the following levels: OS, SAP kernel, and SAP ABAP or
Java software.
Users must be aware that any changes made to SAP during the testing phase after a patch or upgrade
has been applied are lost in the event of a rollback to a previous snapshot.
2.4
Tests demonstrate live migration of a virtual machine running an SAP batch workload between two ESX
hosts. The workload is created by running SAP transaction SGEN (which generates and compiles ABAP
code and is a standard utility executed after a fresh SAP install). CPU performance charts from VMware
Infrastructure (VI) client and SAP monitoring transactions (SM50, SM37, SM21) executed before and
after the migration clearly show continuation of the batch job and no disconnections.
The SAP license is not impacted by the migration of the virtual machine between physical servers. The
SAP license utility saplicense get returns the same hardware key when running on either server.
The hardware key, required for generation of an SAP license, is based on the virtual machine, not on the
physical ESX host.
2.5
In this test, the virtual machine is powered off, and the virtual machine and its data are migrated between
two different VMFS datastores, from SAN to local storage (on the ESX host) and back again.
This functionality provides a benefit, for example, during the initial setup of an environment where shared
storage (SAN, iSCSI, or NAS) might not yet be available but local storage on the ESX host is present with
adequate free capacity. SAP software can be installed into a virtual machine on the local datastore and
migrated later to shared storage after the SAN is configured.
2.6
High Availability
This test shows how VMware HA provides ESX host-based HA capability with minimum configuration.
This feature manages ESX host hardware, not application level failures. The latter require separate thirdparty application aware cluster software, which is not covered here.
Server failure is simulated using a manual reboot of the ESX host, and the virtual machine is restarted on
the remaining server. This feature does not automatically restart the SAP application, which must be
manually restarted after the virtual machine is powered up on the failover server.
2.7
For the latest information on best practices, see SAP Solutions on VMware vSphere 4 - Best Practice
Guidelines (http://www.vmware.com/resources/techresources/10086).
3. Infrastructure Environment
3.1
The following software and hardware was used for the environment:
Software:
o
SAP ECC 6.0 Unicode, NetWeaver 2004s R2, Oracle 10g, ABAP stack
A single virtual machine running an SAP CI and Oracle Database instance on Windows Server
2003 SP1
Hardware:
o
2x HP SAN switch
3.2
The following figures illustrate the logical and physical architecture for implementing SAP software on
VMware.
Figure 5. Logical Architecture for SAP Software on VMware
Installation of VMware Infrastructure is not covered in this document. Consult the VMware Infrastructure 3
Documentation (http://www.vmware.com/support/pubs/vi_pubs.html).
Appendix A shows screenshots of the ESX host configuration. The following table gives an overview of
the ESX host setup used for these tests.
ESX Host Datacenter Name
HP
sap_vm
VM storage size
115GB
C:\
VM memory assigned
3GB
VM CPUs assigned
vega7066
Datastore name
vega7062
vega7063
vega7067
For this test environment I/O performance is not a consideration and the LUN count is limited. As a result
the 115GB storage for the virtual machine is assigned to one LUN.
Note
A better practice would be to separate the system and application data onto separate LUNs.
4.2
7. Select 2 from the Number of virtual processors drop-down menu. Click Next.
4.3
The Windows install ISO image is copied to local storage on the ESX host.
To install the guest operating system
1. Run the VI Client.
2. Right-click sap_vm and select Edit Settings.
9. Follow the instructions for a standard Windows Server install. To move the cursor out of the console
area, press Ctrl+Alt.
11. Right-click sap_vm and select Install VMware Tools. Click OK.
12. After the VMware Tools installation completes successfully, at the prompt set the hardware
acceleration to full and restart Windows. VMware Tools optimizes mouse performance, among other
things.
4.4
SAP Install
To install SAP on a virtual machine, use the same procedure as for a physical server. A standard SAP
Oracle on Windows install is performed with SID = TEM and ORACLE_HOME set to
c:\oracle\TEM\102.
For instructions on the SAP install see the SAP install guide, SAP ERP 2005 SR2 ABAP on Windows:
Oracle, which is available at http://service.sap.com/instguides.
5. Create a Template
The SAP system TEM is running in sap_vm, on ESX host vega7063.
A golden image of the virtual machine is created as a template. This image is used to provision a new
SAP system in the next sections.
An SAP Java tool, orabrcopy, is used here. This tool is documented in the System Copy Guide from
SAP, System Copy Guide for SAP Systems Based on SAP NetWeaver 2004s SR2 ABAP. The guide is
available at http://service.sap.com/instguides.
At a high level the procedure is as follows:
1. Run the SAP orabrcopy tool to generate the Oracle initTEM.ora and CONTROL.SQL files.
This is required for the Oracle rename to another system ID (SID). The SID contained in these files is
TEM. This is changed to the desired target SID (DEV) during the deployment of the new virtual
machine. These files are saved in the virtual machine at C:\oracle\orabrcopy.
2. Uninstall the CI instance using sapinst.
3. Uninstall the Oracle software using the Oracle Universal Installer.
4. The CI instance and the Oracle software are uninstalled as they are not required in the golden image.
The SAP rename process reinstalls the Oracle software and CI instance to the new host name and
SID after a new virtual machine is deployed from the template.
5. The virtual machine now contains the Oracle data files stored under C:\oracle\TEM. This
corresponds to a database backup.
6. Create a virtual machine template. This is the golden image from which to deploy a new virtual
machine and provision a new SAP system.
5.1
507510784 bytes
Fixed Size
1249848 bytes
Variable Size
264244680 bytes
Database Buffers
239075328 bytes
Redo Buffers
2940928 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 Production
With the Partitioning, OLAP and Data Mining options
SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 31 14:18:08 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 Production
With the Partitioning, OLAP and Data Mining options
C:\oracle\orabrcopy>
5.2
2. From the menu, select the service you want to install: expand the folders for SAP ERP 2005 Support
release 2 > Additional Software Life Cycle Tasks > Uninstall and select Uninstall System /
Standalone Engine. Click Next.
3. Select Remove all instances of the SAP system or standalone engine on this host and Remove
OS users of SAP system or standalone engine on this host. Click Next.
The CI instance and the SAP user ID have been deleted, but the Oracle database and software still
remain.
5.3
Confirm that the Oracle instance is down after running ora_vr_copy.bat in the previous procedure.
To uninstall Oracle home
1. Copy the sqlplus executable to the desktop as follows: click Start > All programs > ORACLETEM102 > Application Development > Sql Plus.
2. Right-click the Sql Plus icon and select Properties.
3. Change the target to C:\oracle\TEM\102\BIN\sqlplusw.exe /nolog.
4. Double-click the Sql Plus icon. This displays the Oracle SQL*Plus Window.
5. Enter the following commands on the SQL command line:
SQ L > s et in st an c e t e m
O r ac le D at ab a se 1 0g Ent e rp ri s e Ed iti on Re le a se 1 0 .2 .0 . 1. 0 - P ro duct ion
W ith t he Pa rt it i oni ng, O L AP a nd D ata M ini ng op tio ns
SQ L > c onn e ct / a s s ys dba
Conn e ct e d t o i dl e in s t an ce
SQ L >
6. Access Oracle services as follows: click Start > All Programs > Administrative Tools > Services.
7. Stop all Oracle services:
OracleJobSchedulerTEM
OracleServiceTEM
OracleTEM102iSQL*Plus
OracleTEM102TNSListener
8. Run the Oracle Installer as follows: click Start > All programs > OracleTEM102 > Oracle
Installation Products > Universal Installer.
5.4
8. Click Finish.
6.2
1. Start and log into the VI Client. Select datacenter lab_dc and click the Virtual Machines tab.
2. Right-click sap_vm_golden and select Deploy Virtual machine from Template.
6. The customize options that appear are based on the Sysprep set up in Section 6.1.1, Prepare for
Guest OS Customization. Select Customize using the Customization Wizard and click Next.
8. Select Use a specific name and enter vega7067, which is the host name of the new virtual machine.
9. Click Next.
10. Leave the Product ID field blank. The license key is provided upon system boot after cloning. Click
Next.
26. Enter the Product Key and click Next. Windows restarts.
6.3
5. Enter DEV for the SAP System ID (SAPSID), select Unicode System (recommended), and click
Next.
23. The rename stops with a notification window. Proceed as directed in the following steps.
Note
The previous two steps could have been performed before creation of the template. In Windows
Explorer, move all subdirectories in C:\oracle\TEM to C:\oracle\DEV.
7. Snapshots
Snapshots preserve the state of a virtual machine. This feature captures the entire state of a virtual
machine at the time of the snapshot is taken, including the memory state, the settings state (virtual
machine settings), and the disk state. Reverting to a snapshot returns these items to the state they were
in at the time the snapshot was taken. Using this feature allows tests to be run with just one virtual
machine. The test here demonstrates using Snapshots to test a guest operating system patch update.
Note
The Snapshot tests were carried out on the original virtual machine, sap_vm, before it was used
to create the template.
The following two snapshots are taken of sap_vm, with the following different states:
sap_vm snapshot1
sap_vm snapshot2
Oracle db up
Oracle db up
CI instance down
CI instance up
7.1 Take the First Snapshot and Update from Windows Server 2003
SP1 to SP2
To take the first snapshot and update Windows
1. Initially, the guest operating system (Windows Server 2003) is at patch level SP1.
8. Restart SAP.
7.2
4. Review the progress in the bottom pane under Recent Tasks (of VI Client).
5. Log in to the guest operating system and verify rollback to the earlier snapshot.
The status of sap_vm is as follows:
The guest operating system is Windows Server 2003 SP1
Database is running.
CI instance down. Note the CI instance was previously running prior to the rollback; snapshots
preserve the virtual machine memory state which includes state of the running processes.
Start CI instanceverify that correction TEMK900002 does not exist. This highlights that user
changes might be lost during snapshot moves. Procedural steps are required to notify users that
during patch testing, changes are lost when, in the event of unsuccessful testing, a rollback to an
earlier snapshot is required.
Note
These tests were carried out on the original virtual machine, sap_vm, before it was used to
create the template.
2. Start the SGEN process in SAP. This is the ABAP code generation utility that consumes CPU and
database I/O.
3. Check the following monitoring tools to validate load and activity: VI Client CPU charts, SAP
transactions SM50 (process monitor), and SM37 (batch job monitor).
4. Migrate sap_vm from ESX host vega7063 to vega7062.
5. Check monitoring tools for load and activity.
6. Perform SAP license check using the saplicense utility.
7. Migrate sap_vm from vega7062 back to vega7063.
8. Check monitoring tools for load and activity.
9. Perform SAP license check using the saplicense utility.
10. Run SAP transaction SM21 (system logs) to verify no disconnections in SAP during the migrations.
vMotion requirements are as follows:
Both ESX hosts have compatible CPUs (same server types).
Both ESX hosts are connected to a virtual switch assigned for vMotion operations (vMotion feature
enabled).
Both ESX hosts are connected to a production switch for user access.
sap_vm virtual disk and VMFS configuration files reside on shared storage connected to both ESX
hosts.
8.1
A batch workload is executed in SAP, and monitoring tools (CPU charts in the VI Client and SAP
transactions SM50 and SM37) verify that load/activity has started on ESX host vega7063.
1. Log in to the SAP UI (SAPGUI).
2.
3. Select Generate All Objects of Selected Software Components, and click Continue.
7. Proceed to transaction SM37 to verify that the job has started and is active.
8. Wait approximately five minutes and proceed to transaction SM50 to view the SAP processes.
8.2
The virtual machine, sap_vm, is live-migrated to the other ESX host. CPU performance charts in the VI
Client show the following:
An initial CPU spike on the source host vega7063 after the migration is started.
The CPU utilization on the source host vega7063 drops to 50% and the CPU utilization on the target
host vega7062 rises to 50%.
SAP transactions SM37 and SM50 verify that SAP activity is uninterrupted after the migration.
After migration, when the virtual machine is running on vega7062, an SAP license check is executed
verifying that the license is OK.
To migrate the virtual machine
1. On the VI Client right-click sap_vm, then select Migrate.
3. Click Next.
4. Click Next.
5. Click Finish. The progress of the vMotion operation is shown in the Recent Tasks pane.
9. Verify that the SAP job is still running in SM50 and SM37.
8.3
The virtual machine sap_vm is live migrated back to vega7063. CPU performance charts in the VI Client
show the following:
A CPU spike on the source host vega7062 after the migration has started.
The CPU utilization on the source host vega7062 drops from 50% to zeroand the CPU utilization on
the target host vega7063 rises to 50%.
The CPU utilization in the virtual machine is near 100% and drops to zero for approximately one
minute during the migrations.
SAP transactions SM37 and SM50 verify that SAP activity is uninterrupted after the migration.
After migration, when the virtual machine is running on vega7063, an SAP license check is executed
verifying that the license is OK and that the SAP hardware key is the same.
SAP transaction SM21 (displays SAP system log activity) is executed for the period of the migrations
and indicates no process interruptions or disconnections (normally any terminations in SAP can be
seen in SM21).
3. The CPU utilization on vega7062 spikes and then drops to zero (at time 11:10, as seen in the
following screenshot).
4. Open an RDP session to the virtual machine (on vega7063) and verify that there is no change in the
SAP license.
Note
The virtual machine is migrated back to shared storage for continuation of the remaining
scenarios, but the screenshots are not shown.
8. Click Finish.
10. The storage relocation lasted approximately 50 minutes. After the migration, sap_vm is up and
running on local datastore, storage1.
4. Click Finish.
Enclosure Configuration
The configuration recommends the NC325m 4-port network adapter for the ProLiant BL460c or BL465c
servers. This adapter allows for six individual gigabit network ports. As such, the enclosure should be
outfitted with a minimum of three network uplinks and a total of six network uplinks for redundancy. These
network uplinks should be placed in switch slots 1, 5, and 7 in a non-redundant configuration, and in slots
1, 2, 5, 6, 7, and 8 for full redundancy.
A channel uplink is required in switch slot 3 for a non-redundant configuration and in slots 3 and 4 for full
redundancy. The latter configuration allows for a redundant 4Gb Fibre Channel connection from each
blade within the enclosure. When switches are used internally, the need for external Fibre Channel
switching is greatly reduced, saving costs and reducing cable failure risks and complexity.
Figure 7 and Figure 8 depict the network switch configuration and enclosure configuration for the servers
used in the creation of this deployment guide. Additional HP documentation can be found in the following
locations:
HP VMware Server Virtualization
http://www.hp.com/go/vmware