Virtualization is a hot topic in the IT world. What is virtualization and why is it so popular? First of all, virtualization is not a new concept. It was introduced in the 60s to partition large mainframes in order to utilize their full power. These partitions allowed mainframes to “multitask”. Today’s systems can also benefit from virtualization, not so much with regard to multitasking but to increase the efficiency of large machines and to isolate different applications and/or clients in the case of cloud computing. This article will introduce you to some of the terminology of virtualization, provide an overview of Oracle’s offerings and dive into one of their products (VirtualBox) in more detail.
The term virtualization is applied to many different types of technology. You will find virtualization categorized in many different ways. The following three categories seem to be used often and are the ones adopted by Oracle in their product offerings. Their delivery methods can be very different as well as their familiarity and comfort levels. They all have one thing in common. They all provide a way to present some piece of technology as something it is not.
Partitioning the computer’s resources into separate and isolated “virtual machines” simulates multiple machines within one physical computer. It enables multiple copies of the same or different operating systems to run on the computer and also can prevent applications from interfering with each other.
Network and Storage Virtualization
In a network, virtualization consolidates multiple devices into a logical view so they can be managed from a single place. Storage virtualization enables applications to read from and write to a single pool of storage rather than individual disks, tapes and optical devices.
This term is sort of catch-all term that emphasizes making running applications more protected, more flexible or easier to manage. It could be a simple as streaming applications to PC’s on an as-needed basis or client/server where it appears that the application is running on the client.
Hardware virtualization uses the idea of a Virtual Machine. The virtual machine approach differs from a dual-boot or multi-boot environment, in which the user has to choose only one OS at startup. All virtual machines can run simultaneously.
Virtual machines are delivered in a couple of different ways. The delivery mechanism is referred to as the Virtual Machine Monitor or Hypervisor. Both methods provide the same basic functionality (Figure 1) – multiple, encapsulated instances of operating systems, along with accompanying applications, running on a single physical computer. The first method runs directly on the host hardware – bare metal. The second runs on top of a host operating system – hosted.
Each virtual machine looks and acts like an isolated physical machine, both to the outside world and to itself. These virtual machines are referred to as “Guests” and the actual physical machine they run on is referred to as the “host”.
Virtual Desktop Infrastructure
This software is a connection broker that can provide desktop virtualization to replace personal computers with virtual machines on a server (Figure 2). Users can access the VMs through any RDP (Remote Desktop Protocol) client. RDP is a proprietary protocol developed by Microsoft, which provides a user with a graphical interface to another computer.
VDI makes the administration of virtual machines easier. It provides a tool to quickly provision new virtual machines from templates, to copy and move VMs, to control access to virtual storage, to provide additional security to VM access, and much, much more.
Oracle’s Virtualization Products
The most recognized products in this space would be Oracle Exadata Storage Server or Oracle Automatic Storage Management. Like the other products, the products in this space are designed to provide more cost effective resources disguised as well-known devices that “standard” software can run on with no code changes.
Oracle divides the hardware virtualization into two categories. They are both based on the idea of a virtual machine. They target the two products for different uses, but there are what appear to be “religious” disagreements on which is best for any given usage.
The primary product in this space is Oracle VM, a direct competitor to VMware. Oracle VM allows multiple virtual servers of possibly differing operating systems to operate on a single physical server. Resources (memory, CPUs, Disk space) can be allocated and reallocated easily from one virtual machine to another while maintaining the isolation of operation as if they were separate physical machines. Oracle has targeted large data centers with multiple external or internal clients that have major applications that should be isolated. Both E-Business Suite and JD Edwards applications have been favorably benchmarked on Oracle VM platforms. Oracle VM templates can be downloaded or custom created so that new complex configurations (appliances) can be quickly imported to create a complete environment for applications. There are existing appliances for E-Business suite, JD Edwards, and PeopleSoft.
The primary product in the space is VM VirtualBox. This product provides very similar functionality to Oracle VM. You can create multiple virtual machines running on a single physical platform. Oracle has targeted the use of VirtualBox for either creating alternative operating systems on a PC for testing and pilots or providing a corporate server to house everyone’s PC operating system that can be accessed “form anywhere using any client platform” (more of this later).
Virtual Desktop Infrastructure
Oracle VDI provides a robust management portal for the administration of virtual desktops. Among its features are:
- Integration with LDAP or Active Directory for user authentication
- Integration of Sun Ray Server Software for VDI access through Sun Ray thin clients.
- Integration of Sun Secure Global Desktop (SGD) for remote access through a web interface.
- Choice of virtualization backend: VMware vSphere, Microsoft Hyper-V and Oracle VM VirtualBox are supported
- Built-in RDP support in VirtualBox can be used to remotely access operating systems that lack a built-in RDP server, such as Linux, or Windows 2000
- Oracle VM VirtualBox backend offers high performance through tight integration with Oracle’s Unified Storage products
I have already hinted at some of the characteristics of the various virtualization products, but I am going to concentrate on the Desktop offerings and in particular the VirtualBox virtual machine product. Future articles will address other virtualization products. Let’s first look in a little more detail at the benefits of a virtual machine in general.
Compatibility – the virtual machines are designed to simulate all of the components of a physical machine (motherboard, CPU, RAM, hard disks, network cards, VGA, etc.) so they are able to run all the same software that would run on a physical machine with the same operating system.
Isolation – the virtual machines remain isolated from each other as if they were separate physical machines so if one of the virtual machines on a single host crashes it will have no effect on the other virtual machines.
Encapsulated – a virtual machine is a container for a complete set of virtual hardware resources as well as the operating system and applications software. This makes them very easy to move and copy.
Hardware Independence – since the virtual machine is unaware of the underlying physical hardware, it can run on any physical hardware supported by the virtual machine monitor.
Most companies started off using virtualization primarily as a cost-cutting solution. A significant portion of a company’s budget can be used up just setting up, maintaining, and updating employee computers because they had to physically go where the computers were located. Increasing memory, CPU cores, or disk space to accommodate more resource intensive operating systems and applications meant purchasing and installing hardware throughout the company. With virtual machines and virtual desktop infrastructure, all of this becomes easier and more cost effective. More RAM or CPUs or disk can all be provided by just changing some parameters on a virtual machine. Provisioning a new system for someone is done in a few minutes by just creating a new virtual machine using prebuilt appliances (templates). You can build a virtual machine on your laptop and easily migrate it to a server. You don’t have to keep around physical systems with old versions of operating systems or applications to do testing or support.
All of these things can save money, but they also provide something else that is becoming even more valuable – agility. Resources can be reallocated to deal with peak times. They could actually be moved to service different parts of the world at different times in a global company. The cost savings and agility of virtualization have made either internal or external cloud computing are some of the reasons that cloud computing is growing in popularity.
This product is an open source product that is very easy to install and use. It is available on many different host operating systems and supports an equally diverse set of guest operating systems. There are a number of appliances that can be imported to quickly create complete development environments for a number of Oracle tools. Templates do not currently exist for Oracle’s applications, but I have installed E-Business Suite on a VirtualBox Linux guest running on my Windows 7 laptop host. I have not tested it extensively, but everything seems to be working just fine. Having come from a dual-boot system for switching back and forth from windows to linux, VirtualBox has been a huge improvement. It is a great way to do demos of potentially complex systems.
First, let’s see just how easy it is to install VirtualBox.
- Download the proper version of VirtualBox from the many versions found at http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html In this case I’m using Windows – VirtualBox-4.1.6-74713-Win.exe (87.2MB, 42 sec).
Click Next on Welcome page. On the Custom Setup page (figure 3) you can remove features if you want.
Click Disk Usage to see where there is room for the installation and change Location if necessary or desired.
You will get a warning that your network connection will be reset and you will be temporarily disconnected from the network.
Click Yes to continue.
Click Install on next page. (3 min)
At this point (Figure 4) you have VirtualBox installed and there are two choices. You can either create a new virtual machine or import an appliance. If you select New from the File Menu, you will be guided through the steps to create the basic machine and then install an operating system.
Installing the operating system involves creating a bootable CD or CD image containing the proper operating system and installing the operating system as you would on a real machine. The second option is much simpler and faster. On top of that you can get a number of pre-installed applications with no extra work. Following is a partial list of appliances to select from. Choose the one that comes closest to what you might want. You can always install additional software as needed. A full list can be found at http://www.oracle.com/technetwork/community/developer-vm/index.html
- Java Development VM
- Database App Development VM
- SOA & BPM Development VM
- Oracle Business Intelligence Enterprise Edition Plus VM
- I have selected Database App Development which includes:
- Oracle Linux 5
- Oracle Database 11g Release 2 Enterprise Edition
- Oracle TimesTen In-Memory Database Cache
- Oracle XML DB
- Oracle SQL Developer
- Oracle SQL Developer Data Modeler
- Oracle Application Express 4.0
- Oracle JDeveloper
- OTN Developer Days.ovf — Right-click file and use ‘save target as’. IE users make sure file extension remains as .ovf (93,468 bytes)
- OTN_DD_ROOT_1.vmdk (1,405,033,984 bytes)
- OTN_DD_ORACLE_1.vmdk (2,976,346,112 bytes)
Click Settings and then Shared Folders. Click the plus sign and fill in the host path and a folder name. Check Auto-mount.
Once this is set, start up the new virtual machine and log in to root – password Oracle. Left click on the screen and choose Open Terminal. Type in the commands shown in Figure 6 to create and mount the shared directory.
Add the following line to /etc/fstab to insure the directory is mounted on startup.
downloads /mnt/downloads vboxsf defaults 0 0
Select Log Out root from the System Menu at top and click Log Out on the pop up and then log back in to oracle/oracle to see the environment that has been created (Figure 7). Notice the various tools along the top and the handy file folders along the left side. If you click on the FireFox icon you will be sent to the OTN Developer Day Hands-On Session page where you can walk through hands-on sessions with the tools.
So in about 45 minutes including about 30 minutes of download time, you have a fully working Linux Virtual Machine guest running on a windows host with a full database installation and a bunch of Oracle tools. As I said before, you could now install additional software just as you would on any linux system. As a matter of fact that is just what I did to set up a demo for connecting Oracle SOA Suite to E-Business Suite. I created a linux virtual machine hosted on my laptop using the SOA Suite appliance and then added a couple of virtual disks to the system and installed E-Business Suite. The setup for the SOA Suite virtual machine took about two hours because it was a bigger appliance import. At that point I could have connect SOA Suite to an existing E-Business Suite system as long as the host had access to the E-Business Suite servers. I actually used a shared folder as a staging area for E-Business Suite installation so my virtual disks did not have to be big enough to hold that along with the actual installed files. I also could have set up a separate virtual machine to house the E-Business suite and connected the two virtual machines via the network, but putting them on the same machine used less disk space. These are perfect examples of using virtual machines to isolate SOA suite which runs a version of Weblogic, along with its own metadata database, from the infrastructure of E-Business Suite. If anything happens to the virtual machine while I am experimenting with SOA Suite, it will have no ill effect on E-Business Suite. Dispite this assurance, please connect to a test system first. This approach should remove most barriers for starting to explore the SOA tools with existing E-Business Suite installations in preparation for the eventual move to Fusion Applications.
Other Interesting Features
There are a number of additional features that are worth mentioning and some are unique to the virtual world.
Most virtual machines come with a set of features included in a Guest Addition. This contains special software packages which are shipped with VirtualBox but designed to be installed inside a VM to improve performance of the guest OS and to add extra features. There is a facility to have these features installed using unattended Installation if you wish. It can include features like:
- Shared Folders – mentioned earlier, optionally shares a folder with your host operating system.
- Shared clipboard – the clipboard of the guest operating system can optionally be shared with your host operating system.
- Better video support – accelerated performance including 3D graphics and 2D video.
There are a number of networking options that can be utilized with VirtualBox. The choices for adapters include:
- NAT – VMs IP address is translated in communications.
- Bridged Adapters – VM is a full network citizen with its own publicly accessible IP address.
- Internal Network and Host-only adapter – VMs sit on a virtual network inside the host machine.
This latter model is extremely useful for test setups because you don’t need to involve system administrators at all. But the downside is that maybe you can’t fit all your running VMs in the same host.
With these choices you should be able to create connections between a VirtualBox VM and the outside world through the host, between guests and hosts, and between guests and guests. You can setup as many as four separate adapters. There is often more than one way to set adapters up in order to create the various connections you need. Searching for VirtualBox network adaptor videos or tutorials will provide you with plenty of examples of how to accomplish these. There have been some changes in the way some of the adapters work between pre and post 4.0 versions of VirtualBox, so be sure the example specifies what version is being used.
Dynamically Allocated Files
When a new disk is created, it can be set to be dynamically extended. It will only grow in size when the guest actually stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data.
This feature provides a somewhat unique method for the backup and recovery of virtual machines. You can save a particular state of a virtual machine for later use. At any later time, you can revert to that state, even though you may have changed the VM considerably since then. There is always at least one snapshot which maintains the information for the “Current state”, the point in the lifetime of the virtual machine. Snapshots can easily be taken either from the VirtualBox console or from inside a virtual machine. These snapshots can be named with a description to indicate what they contain.
Snapshots are hierarchical. Each one just stores any changes since the last snapshot – its parent. There are no limits imposed on the number of snapshots or the depth of the hierarchy except disk space. You can restore a snapshot at any time by picking the snapshot and clicking Restore Snapshot. A snapshot can restore a virtual machine to the exact point in time it is taken because it stores VM settings, a complete state of all the attached virtual disks, and the state of virtual memory, if the VM is running. You will be right in the middle of whatever you were doing when the snapshot was taken. There is a way to protect some disks from being part of a snapshot if desired. Look up “write-through” mode to find out more about this.
Settings are stored in an XML text file using the same format as VM configuration files. The state of virtual disks is stored using Differencing Images. These images store any disk sectors that have been modified. When a request for a sector occurs, the driver looks in the snapshots, starting at the most recent snapshot (“Current State”) and proceeding to the oldest to see if the sector is there. The first one found is used. This creates some overhead, but it is not noticeable except in some extreme cases. The actual virtual disks are not written to unless a new sector is used. This method saves space and can make snapshot manipulations very fast. Taking snapshots is almost instantaneous because all that is necessary is to rename the “Current State” snapshot, start a new “Current State” child, and store settings and memory. Reverting to an older snapshot can be as simple as just logically changing the snapshot you start looking in for sectors, and restoring settings and memory. A new branch is created in the hierarchy at the point of the snapshot reverted to. To avoid losing the current state when restoring a snapshot, you can check the New Snapshot box to create a new snapshot before the restore. Snapshots also can be deleted in which case the sectors that changed in that snapshot are included in the snapshot’s child. You can no longer go back to that point in time but none of the changes are lost that took place during that snapshot. It is important to understand what happens when you change to a different snapshot. New files or even new disks may disappear or be revived.
Yes, teleporting. This is a very interesting capability that takes advantage of the way virtual machines are implemented. It is a way of moving a virtual machine from one host to another while it is running. This can be done across different host platforms ( Windows to Linux) or different classes of host (Server to laptop) or even different CPU architectures (Intel to AMD).
There are some restrictions:
- Both the source and target must have access to the same shared storage
- Both the source and target VMs must have the same configuration
- Neither of the machines can have any snapshots
Before starting the target, it must be prepared to receive a teleport by executing the following command:
VBoxManage modifyvm <targetvmname> --teleporter on --teleporterport <port>
supplying the appropriate target name and a port to use. Start the target VM. It will indicate it is waiting for a teleport request to arrive.
Start the source VM as usual and execute the following command once it is running:
VBoxManage controlvm <sourcevmname> teleport --host <targethost> --port <port>
supplying the appropriate source name, the target’s host, and the same port used above.
Sun Ray Client
This is going to become very popular. It is a stateless thin client integrated in a flat panel display with a smart card. A user can walk up to one of these, put in their smart card and be connected to a backend Virtual machine. They can pull the smart card and go to another device, possible at home, plug in the smart card and continue the session right where it was left off. Some of its benefits include:
- No configuration necessary, connect immediately to servers
- Displays full Windows, Oracle Linux, and Oracle Solaris desktops
- Up to 1920×1080 HD resolution, 2 DVI ports, 5 USB ports,
- Gigabit Ethernet, fiber optic networking, two-way audio support
- Energy efficient: as low as 6 watts, 98% recyclable and EPEAT Silver and Energy Star 5.0 qualified
We have taken a look at some of the terminology used when talking about virtualization and become familiar with some of the offerings that Oracle can supply. We have taken a look at some of the reasons why virtualization has become such a hot topic. And, finally, we have taken a closer look at one of these products – VirtualBox. Hopefully, this has provided a good introduction to the topic of Virtualization and will convince you that it is easy to get started and will inspire you to start trying it out. This article will be followed up in subsequent issues with a discussion about Oracle VM and perhaps other Oracle virtualization offerings.