Setup VM for DB2

Every DBA must have a VM to play around, it can be either a VM in public cloud like AWS, Azure, GCP, IBM Cloud etc. or you can build your own VM on your system. If you have a system with processor which supports virtualization and 8 GB of memory you should be fine with creating VMs. You can do it with 4 or 6 GB of memory but then you might observe slowness on your VM as well as on your system.

For creating VM you can use Oracle Virtual Box or  VMware Workstation Player which is freeware.

In this post we will see how to Setup VM for DB2 using Oracle Virtual Box on a Windows 10 system. Below steps can be used to setup VM for other purpose as well not necessarily for DB2.

Step1: Download Oracle Virtual Box

You can download Oracle Virtual Box from  Download Oracle Virtual Box

Step2: Install Oracle Virtual Box

Run setup file to get below screen

Oracle Virtual Box Installation welcome screen

Click on Next > button

Oracle Virtual Box Installation Screen

You can change installation directory by clicking on Browse button.

Click on Next >

Oracle Virtual Box Installation Screen

If you would like to have Start menu entries, Shortcut on Desktop, Quick Launch icon you can check Create start menu entries , Create a shortcut on the desktop, Create a shortcut in the Quick Launch Bar respectively.

You can keep Register file association as checked.

Click on Next > button

Oracle Virtual Box Installation Screen

You will get a warning message as above indicating your network might temporarily disconnect, if you are actively using your network like downloading or uploading or connected to your system by taking RDP it will disconnect.

Click on Yes button to proceed.

Oracle Virtual Box Installation Screen

Click on Install button to install Oracle Virtual Box

Oracle Virtual Box Installation Screen

Once installation completes you will get above screen. Keep Start Oracle VM VirtaulBox option checked.

Click on Finish button to complete installation. It will launch Oracle VM VirtaulBox.

Step3: Create a VM in Oracle VirtaulBox

Oracle Virtual Box Screen

Click on New button

Oracle Virtual Box Create Virtual Machine Screen

In Name field enter a name for your VM. In Machine Folder field you can update location where you want to store your VM files. In Type field select OS Type i.e Windows, Linux, Solaris etc. In Version field select OS version from drop down.

Select OS Type and Version which you are planning to install on your VM.

Click on Next button.

Oracle VirtualBox Create Virtual Machine screen

Configure memory for your VM using scroller or edit in text box. By default it is 1024 MB.

Click on Next button.

Oracle VirtualBox Create Virtual Machine screen

You can keep Create a virtual hard disk now selected and click on Create button.

Oracle VirtualBox Create Virtual Hard Disk screen

You can keep VDI (VirtualBox Disk Image) as selected and click on Next button.

Oracle VirtualBox Create Virtual Hard Disk screen

You can keep Dynamically allocated as selected and click on Next button.

Oracle VirtualBox Create Virtual Hard Disk screen

You can change Virtual Hard disk location by clicking on icon next to location text box. By default this path is same as VM location configured earlier screen. Virtual Hard disk size can be configured by using scroller or updating size in text box, by default it is 8 GB.

Click on Create button.

Oracle VirtualBox VM screen

You will get above screen on successful VM creation. Select your VM and click on Settings button to make changes to your VM configuration.


You can add additional Virtual Hard disk, mount optical disk by clicking on Storage button, change Boot order, Memory and Processor configuration by clicking on System button. Change VM name by clicking on General button.

Click on Network button to make changes network setting for your VM. Ensure Enable Network Adapter under Adapter 1  is checked. In Attached to you can select Bridged Adapter if you want to make your VM part of your network else keep it on default setting of NAT.

Oracle VirtualBox VM setting screen

Once done with configuration changes click on OK button to save and close it. You can right click on your VM to start/reset/shutdown it.