Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Setting up a VMware Environment for DB2 UDB for Linux on a Windows Machine

Suita Gupta, PartnerWorld for Developers , IBM Malaysia
Photo: Suita Gupta
Suita Gupta works as a DB2 Technical Support representative for PartnerWorld® for Developers. Along with 10 other team members, Suita helps Independent Software Vendors (ISVs) solve a wide range of development and administration issues. Suita has DB2 certifications in both application development and administration. She focuses most of her time helping ISVs with DB2 Application Development related problems. If you would like to learn more about PartnerWorld for Developers, please visit http://www.developer.ibm.com/.

Summary:  This article shows you how to set up DB2 UDB for Linux on a Windows 2000 machine using VMware and explains the benefits of using a virtualized environment.

Date:  22 May 2003
Level:  Introductory

Activity:  5172 views
Comments:  

Important notice: The contents of this article are meant for deploying DB2 on VMware for testing and evaluation purposes only. DB2 may not support all versions of VMware and Linux distributions. If deploying your solution for production use, please ensure you are only using validated products listed at: ibm.com/db2/linux/validate. Furthermore, there are licensing implications when using DB2 UDB under a VMware virtual machine. When running under production environments, ensure that you comply with DB2 UDB licensing guidelines for using VMware.

Introduction

Don't have enough machines to set up an environment to develop and test your software? Are deadlines knocking on your door while you're stuck installing and configuring software? Do you wish you were able to apply all the Fix Packs you need and undo the changes without affecting your current setup? There is a solution for you!

VMware Workstation is a product that enables you to run multiple operating systems within portable virtual computers. Each "virtual computer" encapsulates the operating system and the software applications installed on it. Several virtual computers or VMware images can coexist simultaneously on one physical machine, thereby enabling you as a developer to make maximum use of the machine provided to you.

This article provides a starting point for those who are new to virtualization software such as VMware. It will show you how you can create a new VMware image with Red Hat Linux 7.2 as the operating system and then install IBM® DB2® Universal Database® (UDB) V8.1 within that image. Hints and tips for some of the common setup and usage questions you may have while setting up such an environment are covered, as well as the various benefits that such a configuration offers to DB2 UDB application developers and testers. For further details, see the extensive documentation on VMware's official website (http://www.vmware.com).


Create a new VMware image

In order to create a new VMware image, you will need the following software:

Download the trial copy of VMware Workstation 3.2 and install it on your Windows® 2000 machine.

  1. Click on the VMware workstation icon that was created during the installation and then start the VMware New Virtual Machine wizard as shown here in Figure 1:
    Figure 1. New Virtual Machine wizard
    New Virtual Machine wizard
  2. In the New Virtual Machine panel shown in Figure 2, select the Typical machine configuration and click Next.
    Figure 2. Choose Typical configuration
    Choose Typical configuration

    (If you want to configure the attributes, such as the size of the virtual disk and so on, you would need to choose Custom instead of Typical.)

  3. Next, select the guest operating system for your new VMware image. In our case we select Linux, as shown in Figure 3.
    Figure 3. Select a guest operating system
    guest operating system
  4. Now, specify a name (Figure 4) for your virtual machine as well as the location for the files associated with that virtual machine. You can use the default location for the files or specify a new path. If you do not intend to share this virtual image with any other user on the network, then we recommend providing a path on your local drive for better performance.
    Figure 4. Specify a name
    Specify a name
  5. This is the final step in creating a VMware image. Here you can select the kind of networking configuration for your virtual computer. For details on the options available please refer to your VMware User Guide or in the online documentation provided in the official VMware website. For this scenario, we will select Use network address translation (NAT). NAT allows sharing of files between the virtual machine and the host operating system. See Figure 5.
    Figure 5. Select a network connection
    Select a network connection
  6. Click Finish, and you should see the status of your newly created virtual machine along with the values for some of the resources allocated to it, such as memory, network adapter, and so on, as shown in Figure 6.
    Figure 6. Status of new virtual machine
    Status of new virtual machine

Set up the Linux guest operating system

Some tips to keep in mind when installing Linux are:

  • A virtual machine runs inside a separate window. To enable the virtual machine to occupy the full display area, click the Full Screen button on the toolbar. Alternatively, you can press Ctrl-Alt-Enter. To get out of the full screen mode, press Ctrl-Alt. Please note that virtual machines run faster when in full-screen mode.
  • VMware recommends that you disable the screen saver of your host machine before starting the installation of the Linux guest operating system.
  • The default virtual disk size is 4GB for VMware. The size of the virtual disk for the virtual machine cannot be changed after you've created the virtual machine. The virtual disk should be large enough for the guest operating system as well as the software you wish to install in it. If 4GB is not enough space, create a virtual machine using the New Virtual Machine wizard and select Custom. This option allows you to specify the virtual disk size. However if you just wish to install Linux as the guest OS and DB2 V8.1, then 4GB is more than enough space.
  • You can change properties of the virtual image even after you have finished the installation by going to Settings -> Image Configurator. Here you can change the network adapter, disk mode options, and more. VMware has three different disk modes: persistent, doable and undoable. The default disk mode is persistent. When you use undoable mode for your virtual machine, it allows you to either keep or discard the changes you made to the virtual machine. To change the mode of your virtual machine, select the virtual computer you want to modify, go to the Settings menu and choose Configuration Editor.
  • When installing Linux, you will be asked for permission to perform an automatic partitioning. This refers to partitioning the virtual disk and doesn't refer to your physical disk, so you can agree to it without any issues.

To install Linux as the operating system for the new virtual machine that you have created in the previous section, please ensure that the Linux install CD is placed in the CD-ROM drive. Then start up the virtual machine by clicking on the Power On button on the menu bar as as shown in Figure 7.


Figure 7. Start virtual machine
Start virtual machine

After you power on the virtual computer, it will automatically start the OS installation, as shown in Figure 8.


Figure 8. OS installation
OS installation

Detailed instructions for installing the Red Hat Linux operating system can be found at http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/install-guide/.

After the OS is installed, it automatically boots up and you can then proceed to mount the CD-ROM drive, and proceed with the installing DB2.


Install DB2 UDB within a Linux VMware image

Installing new software in the newly created VMware image is just like installing on a physical computer. You will need to ensure that you have the installation CD in the CD-ROM drive. Navigate to the CDROM folder and run the db2setup.exe file.

For instructions on installing DB2 UDB on Linux platform, see the Quick Beginnings PDF, found at ftp://ftp.software.ibm.com/ps/products/db2/info/vr8/pdf/letter/db2ise80.pdf

Click the Power Off button on the menu bar after DB2 UDB is successfully installed. If you previously changed the disk mode of your virtual machine from the default mode of "persistent" to "undoable," it will prompt you as to whether it should save or discard the changes made to your virtual machine.

To start up this virtual machine again in the future, all you will need to do is click Power On to start up the operating system, as shown in Figure 9.


Figure 9. Power on to start the virtual machine
Power on

After logging in, run the db2profile script and start up the DB2 command line processor (CLP) as usual (Figure 10).


Figure 10. DB2 CLP
DB2 CLP

DB2 UDB is now ready for use!


What can VMware offer to DB2 developers and testers?

Here are the key reasons you might want to use VMware with DB2 UDB:

  • As we described before, VMware disk modes enableyou to either commit or discard the changes made to the image. One main advantage of choosing undoable disk mode for your virtual machine would be to apply a DB2 Fix Pak to your virtual machine, run your tests, and then, when you power off the virtual machine, decide whether you want to keep those changes. If you choose to discard the changes, the Fix Pack is discarded along with any other changes you might have made.
  • VMware provides a natural isolated environment within which you can test changes to configuration parameters, etc., without risking the actual host environment.
  • Multiple scenarios can be set up on one physical machine:
  • It's easy to do backups, because you would only need to backup the virtual machine's files created in the location specified during the creation of the virtual machine. The virtual machine is highly portable because you simply have to copy the files to another machine that has VMware and easily recreate the same scenario without needing to install all the underlying products individually.
  • You don't have worry about partitioning your hardware in order to be able to install more than one operating system on a single machine.
  • VMware gives Windows DB2 developers and Linux DB2 Developers an opportunity to simultaneously develop their applications both for Windows and Linux platforms on a single machine. Linux DB2 developers can get access to Windows applications and utilities. Cutting, pasting, sharing of files is allowed between different virtual machines and between the host machine and the virtual machine regardless whether it is a Windows or a Linux virtual machine.

Terms

Guest operating system: An operating system that runs inside the virtual machine.

Host operating system: An operating system that runs on the host machine.

Virtual machine: A virtualized environment in which a guest operating system and software can run. Multiple virtual machines can run simultaneously on the same host machine. In this article, the terms "virtual machine," "virtual image," and "virtual computer" are all used to refer to a virtual machine.


Conclusion

In conclusion, VMware is a great tool that can be used to maximize productivity when developing and testing DB2 UDB applications. It enables you to set up various different environments in which to test your application. Setting up DB2 within aVMware image is quite similar to installing DB2 on a physical machine and therefore the product doesn't require much time to learn and use.


Resources

About the author

Photo: Suita Gupta

Suita Gupta works as a DB2 Technical Support representative for PartnerWorld® for Developers. Along with 10 other team members, Suita helps Independent Software Vendors (ISVs) solve a wide range of development and administration issues. Suita has DB2 certifications in both application development and administration. She focuses most of her time helping ISVs with DB2 Application Development related problems. If you would like to learn more about PartnerWorld for Developers, please visit http://www.developer.ibm.com/.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=13825
ArticleTitle=Setting up a VMware Environment for DB2 UDB for Linux on a Windows Machine
publish-date=05222003
author1-email=
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers