Virtual Machines are generally used to test software. In this article I’ll provide quick tip with Oracle Virtual Box.
Oracle Virtual Box is free to download provided under GNU GPL and It's easy to install in Windows and Linux platform.
The following Consequences shows advantages of using Virtual Box.
Figure 1: Running Virtual Box on Windows 7, to test Application on several platforms.
In the figure above, there are four Operating Systems Ubuntu , Redhat and Fedora ready to run, while Windows 8 is running on the left side, here I will explain the configuration and problems that may happen while running machines.
After installing Virtual Box, one can see the Virtual Box Manager runs on the credentials of user, the Operating system is also called Host machine (operating system where virtual box runs) and any operating system running within virtual box is generally termed as guest machine.
As guest machine needs computer resources like Hard Disk Drives (HDD), Processor, and RAM, We can specify a portion of resource on host machine for the guest machine.
- Click on New to create a new guest machine.
- Specify appropriate Name and select OS type
- Select RAM memory size (Note the error if allocated RAM memory exceeds 50% of available RAM memory) If multiple machines should be run at a same time, apply minimum space. The host machine restarts if the memory exceeds the available memory.
- Virtual Hard disk is virtual disk image file that is stored on any space of host machine. Any files created after using this disk image will be stored within this file. The space should be sufficient for the purpose of installing operating system and required files. Any existing Hard disk can also be selected.
- After finishing installation, any settings can be changed by clicking on settings tab on toolbar.
- Help menu is available to understand the specialization on each option.
- This is a quick tip so, we focus on storage and network options.
- Storage: One can add number of disk image files and configure it as primary master, primary slave, secondary master and so on. All these disks can be used by mounting from guest operating system. File system should be recognized by all guest OS (if same space is shared in multiple guest OS).
- Network: 4 Network adapters can be configured in different way with available Ethernet Adapter.
Note that Ethernet Adapter can be created and configured using File Menu -> Preferences then choose Network on left tab. A new card can be added and edited from small icons on the right side (see the tooltips when placing over icons).
Proxy can also be assigned from proxy tab on the left.
Quick tips to access Network under settings, choose Network tab on left side.
- To isolate the guest operating system from host system; select "Not attached" in Attached to option.
- To access Network or internet access from guest machine, when the host machine is obliged to, select NAT (leave other options as it is)
Some advanced options like port forwarding can be applied, see http://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm for details.
- Select Bridge Adapter, if guest machine have to provide services. Select Ethernet card in Name option. Note that the IP can be assigned while running guest machine.
- Select Internal Networking for secure transfer of data from host machine. Virtual Box wires the cards if multiple cards exist in a network. Note the name of network can be given by simply typing the name. Connections are recognized by the same name.
- Host only adapter is most important option in need to test web application with database support or application that needs to communicate within several guest machines to serve a client. Pre-built DHCP server within Virtual Box manages the connected guest machines in a system.
- UDP tunnel networking
- VDE Networking is available
Will be discussed in the next article as these topics fulfill complex requirement.
See you next time.