You are here

Oracle Linux Installation with Oracle VM Manager

This chapter of the Oracle Cloud Cookbook describes how to install HVM, PVHVM and PVM Oracle and Red Hat Linux using Oracle VM Manager. This document applies to Oracle VM 3.
Download PDF Now!

Table of Contents

 
Oracle Linux Installation Options with Oracle VM Manager
There are two unique installation options for Oracle Linux and Red Hat Enterprise Linux with Oracle VM Manager. Linux can be installed using paravirtualization mode (Xen PVM) and /or hardware virtualization mode (Xen HVM). Xen PVM and Xen HVM installations have slightly different prerequisites and installation options. For example, Xen PVM installations cannot boot from a DVD or from an ISO image, the installation tree must be available on a Web server to boot a Xen PVM installation. Xen HVM installations can boot from an ISO image, as long as the ISO image has been imported using Oracle VM Manager. Both Xen PVM and Xen HVM can boot from the network.
 
Xen PVM and Xen HVM use very different techniques to provide resources to virtual machines. For example, Xen HVM uses Intel or AMD virtualization technologies for memory management and to emulate the boot environment. Xen HVM also uses QEMU in dom0 for device emulation. Xen PVM leverages the guest operating system's Xen kernel for the boot process using the pygrub bootloader, Xen for memory management, and dom0 for device support, without emulation. Xen PVM virtual machines are hypervisor aware and run without the overhead of hardware emulation. Xen HVM virtual machines think they are running on native hardware, when in fact they are running on emulated hardware. Xen PVM requires much less overhead for timers, interrupts, I/O traffic, and context switches, allowing superior scalability under heavy loads when compared to Xen HVM.
 
Oracle VM Servers can support both Xen PVM and Xen HVM virtual machines simultaneously on a single x86_64 server that has either Intel or AMD virtualization technologies. Intel or AMD virtualization are a requirement only for Xen HVM virtual machines, not for Xen PVM virtual machines. Intel and AMD virtualization technologies are enabled, managed and tuned using the system BIOS.
 
The only way to determine which virtualization mode will provide the best performance for your environment is to benchmark the same workload using a Xen PVM and a Xen HVM virtual machine. If you do not have the time or expertise to conduct the benchmarks, consider only using Xen PVM for your virtual machines. Over the years I have seen Xen PVM outperform Xen HVM in every benchmark.
 
Note: Starting with the 2.6.32 Linux kernel (Unbreakable Enterprise Kernel and Red Hat compatable Kernel), Linux can boot on bare metal, in Xen HVM mode, and in Xen PVM mode using paravirt_ops with the same Linux kernel. In contrast to the 2.6.32 Linux kernel (OL 5U4-), the 2.6.18 Linux kernel can boot on bare metal and in Xen HVM mode, and must use a Xen paravirtualized kernel for Xen PVM mode.
 
The graphical and text installation programs and the installation steps are similar for all of the Oracle Linux releases. The Oracle Linux installation media is freely available from the Oracle eDelivery Linux portal as a single DVD (single download) for Oracle Linux 4, 5 and 6.
 
Note:The GUI installation of an Oracle Linux 6 VM requires a minimum of 1gb RAM. Use the GUI installer for the greatest set of installation options. The text-based installer will do a Minimum Install only.
 
List 1 reviews the Oracle Linux installation considerations.
  • Disk Partitioning Setup. Depending upon your comfort level with installing Linux, you can accept the default partition layout or select a custom layout.
    • The default partition layout.
      • Selecting the default partitioning layout will create a 500MB “/boot” partition and a LVM with two volume groups, a root “/” partition and a swap partition.
    • Custom layout.
      • 100% customizable.
  • Network Configuration
    • Configure a static IP address or use DHCP.
  • Time Zone Selection
    • Select the time zone settings for your area
    • Configure UTC for the system clock
  • Package Installation
    • Use the default software selection and click on Next
Oracle recommends installing Oracle Linux and Red Hat Enterprise using the default software package selection without any customization. Using the default software packages without customization includes most of the prerequisite packages for Oracle technology products and helps limit the number of manual prerequisite checks. After an Oracle Linux and/or Red Hat Enterprise Linux installation, Oracle recommends to install the Legacy Software Development packages by typing:
 
# yum groupinstall @ Legacy Software Development
 
Installing the Legacy Software Development packages will meet most of the Oracle technology product prerequisite packages.
 
Oracle Linux HVM and PVM Installation Prerequisites
Xen HVM installs require the use of ISO images that will be mounted on a virtual CDROM drive during the install process. Oracle Linux ISOs can be downloaded from the Oracle Linux and Oracle VM Cloud Portal. Access to the Oracle Linux and Oracle VM Cloud Portal requires an Oracle.com user account and password.
 
You may be inclined to wonder why Xen HVM installs can be done with an ISO file imported directly into Oracle VM Manager while Xen PVM installs require the ISO file be mounted (mount -o loop) and made available via HTTP. That's because paravirtualized guests don't have a BIOS from which a DVD device can be boot-strapped and the installer DVD doesn't contain a Xen paravirtualized domU kernel so its not possible to boot from an ISO image. You just have to think Xen.
 
The first step for a Xen HVM or PVM installaion is to get the desired Oracle Linux ISO file and stage the file on a Web server. For a Xen HVM installaion, Oracle VM Manager is used to import the ISO file. After which, it will be possible to continue on with a Xen HVM install. For a Xen PVM installaion, the ISO file is used to stage the install tree on a web server. After which, it will be possible to continue on with a Xen PVM install.
 
How to Download the Oracle Linux Installation Media
The Oracle Linux Installation ISO files and DVDs are freely available at the Software Delivery Cloud - Oracle Linux and Oracle VM portal. Access to the Software Delivery Cloud - Oracle Linux and Oracle VM portal requires an Oracle.com user account and password to authenticate into the Oracle Linux and Oracle VM Cloud Portal. If you do not already have an Oracle.com user account, visit the Oracle Linux and Oracle VM Cloud Portal, click the Sign In / Register link or button to create an Oracle.com account.
 
Figure 1 shows the Software Delivery Cloud - Oracle Linux and Oracle VM portal.
Oracle Linux Download
 
From the Sign In page, enter your Oracle.com user name and password, then click the Sign In button.
 
Figure 2 shows the Oracle.com Sign In page.
Oracle Linux Download Sign In
 
Once authenticated, accept the registration/export regulations to access to the Oracle VM and Oracle Linux Media.
 
Figure 3 shows the registration/export regulations form.
Oracle Linux Terms & Restrictions
 
After completing the registration/export regulation form, you will be redirected to the Media Pack Search page. From the Media Pack Search page, select Oracle Linux from the Select a Product Pack dropdown menu. Next, select x86 64-bit or x86 32-bit from the Platform dropdown menu, then click the Go button to be taken to the Oracle Linux Media Pack download page.
 
Tip: If you do not see Oracle Linux or Oracle VM from the Select a Product Pack dropdown menu, you are not in the Oracle Linux and Oracle VM section of the Software Delivery Cloud. Click the Software Delivery Cloud link in the page header, then click the Oracle Linux/VM drop down menu to be redirected to the Oracle Linux and Oracle VM section of the Software Delivery Cloud .
 
Figure 4 shows the Media Pack Search page.
Oracle Linux Media Pack Search
 
 
From the Oracle Linux Media Pack page, click the desired Oracle Linux Media Pack hyperlink, or select the radio button and click the Continue button to go to the download page.
 
Tip: Do not download the source DVD for an operating system installation. Oracle Linux is distributed as Open Source software, therefore the source DVD is also available along with the DVD ISO images. The source DVDs are required by the GNU GPL license.
 
Figure 5 shows the Oracle Linux x86 64 bit Media Pack page highlighting the Oracle Linux Release 6 Update 3 for x86_64 (64 Bit) ISO file download.
Oracle Linux ISO Media Pack
 
From the Oracle Linux Media Pack download page, click the Download button for the ISO file or DVD.
 
Figure 6 shows the Oracle Linux Release 6 Update 3 Media Pack for x86_64 (64 bit) download page.
Oracle Linux Download
 
The Oracle Linux media is delivered as ISO files for OL6 and as DVD images for OL5 and 4.
 
Virtual Machine Installation Prerequisite - Virtual NICs
Before you can continue on with creating a virtual machine you must first confirm and/or create a pool of virtual NICs to be made available to the VMs during the Virtual Machine creation phase.
 
From the Oracle VM Manager, click Networking => Virtual NICs to access the Virtual NICs page. If there are no available Virtual NICs, click (Auto Fill) => Create and enter a number => Create to create Virtual NICs.
 
Figure 7 shows the Virtual NICs page with 10 assigend Virtual NICs and numerious available Virtual NICs.
Oracle VM Manager Virtual NICs
 
Oracle Linux HVM Installation Prerequisite - Import the Oracle Linux DVD ISO File
Xen HVM installs require the use of ISO images that will be mounted on a virtual CDROM drive during the install process. A web server is used to host the ISO file and Oracle VM Manager is used to import the ISO file. After which, it will be possible to continue on with a Xen HVM install.
 
The next example assumes that an Oracle Linux ISO file has been staged on a web server.
 
First, click the Repositories tab => select the desired repository in the Show My or All Repositories window => highlight the ISOs node => click the Import icon => Enter the URL to the ISO file => Click OK to submit the Import ISO job.
 
Figure 8
 Import ISO File Oracle VM Manager
 
Once the Import ISO job completes, a Refresh Repository job runs and the ISO file is made available for installations in the ISOs node.
 
Figure 9 shows the imported ISO file in the ISO node.
ISO File Oracle VM Manager
 
After you have imported the ISO into your VM Manager you are ready to install your new Xen HVM Linux VM.
 
Oracle Linux PVM Installation Prerequisite - Stage the Install Tree on a Web Server
For a Xen PVM installaion, the ISO file is used to stage the install tree on a web server. After which, it will be possible to continue on with a Xen PVM install.
 
Install and configure Apache using the Oracle Public Repository
Installing Apache from the Oracle public yum repository is accomplished by typing "cd /etc/yum.repos.d/", then “wget http://public-yum.oracle.com/public-yum-el5.repo” for Oracle Linux 5.x hosts or “wget http://public-yum.oracle.com/public-yum-ol6.repo” for Oracle Linux 6.x hosts followed by "yum install httpd".
 
Once Apache is installed, type “chkconfig httpd on” to setup Apache to automatically start. Next, start Apache by typing “service httpd start”. The next example shows how to install, configure, and start Apache.
 
Using yum, as root type (Public 5.x):
# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-el5.repo
# yum install httpd
# chkconfig httpd on && service httpd start
 
Using yum, as root type (Public 6.x):
# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-ol6.repo
# yum install httpd
# chkconfig httpd on && service httpd start
 
Once the "yum install httpd", “chkconfig httpd on” and “service httpd start” commands have ran, test Apache by pointing a web browser to the fully qualified domain name (FQDN) or the IP address of the Apache server.
 
Tip: If you don’t see the default Apache test page, check if iptables is blocking http traffic on the Apache host. Consider disabling iptables to test Apache by typing “sudo /sbin/service iptables stop”.
 
Install and configure Apache using the Unbreakable Linux Network
Installing Apache from an Unbreakable Linux Network registered Oracle Linux host is accomplished by typing “up2date -i httpd” for 5.x hosts or "yum install httpd" for 6.x hosts while logged in as root.
 
Once Apache is installed, configure Apache to automatically start by typing “chkconfig httpd on”. Next, start Apache by typing “service httpd start”. The next example shows how to install, configure and start Apache.
 
Using up2date, as root type (ULN 5.x):
# up2date -i httpd
# chkconfig httpd on && service httpd start
 
Using yum, as root type (ULN 6.x):
# yum install httpd
# chkconfig httpd on && service httpd start
 
Once the “up2date -i httpd”, or "yum install httpd", “chkconfig httpd on” and “service httpd start” commands have completed, test Apache by pointing a web browser to the fully qualified domain name (FQDN) or the IP address of the Apache server.
 
Tip: If you don’t see the default Apache test page, check if iptables is blocking http traffic on the Apache host. Consider disabling iptables to test Apache by typing “sudo /sbin/service iptables stop”.
 
Stage the Oracle Linux Install Tree on Apache
Here is two methods for staging the install tree on a web server. Both examples assumes the ISO file is on the Apache web server, iptables is not blocking http traffic, the ISO file is mounted as the root user in a directory in the web root, i.e. /var/www/html<Directory Name>.
 
The fist example mounts the ISO file in the /media directory, creates a directory on the web server, copies the ISO file contents to the directory on the web server, then umounts the ISo file.
# mount -o loop <Oracle Linux>.iso /media
# mkdir -p /var/www/html/repo/ol/6.3/iso/
# cp -avr /media/* /var/www/html/repo/ol/6.3/iso/
# umount /media

The contents of the ISO file are now staged on the Web server and ready to use for your Xen PVM install.
 
The second example creates a directory on the web server and mounts the ISO file in directory.
# mkdir -p /var/www/html/repo/ol/6.3/iso/
# mount -o loop <Oracle Linux>.iso var/www/html/repo/ol/6.3/iso/
 
The contents of the ISO file are now staged on the Web server and ready to use for your Xen PVM install.
 
Create a PVM Oracle Linux Virtual Machine
This section of the Oracle Cloud Cookbook describes how to create a PVM Linux virtual machines. From Oracle VM Manager, click the Servers and VMs tab, then click the Create a Virtual Machine icon to access the Create a Virtual Machine window.
 
Figure 10 highlights the Servers and VMs tab and the Create a Virtual Machine icon.
Virtual Machine Install Oracle VM Manager
 
From the Create Virtual Machine How do you want to create your Virtual Machine window select the Create a new VM (Click 'Next' to continue) radio button. Click Next to proceed.
 
Figure 11
Createa newVM Oracle VM Manager
 
From the Create Virtual Machine page select the Server Pool, the *Server that will create the VM, enter the Name of the VM, select the Repository, select the Enable High Availability check box, select the Operating System, accept the default Keymap, select Xen PVM in the Domain Type drop down menu, enter the desired RAM allocation number in MB in the Max. Memory (MB) and Memory (MB) text box, enter the same CPU allocation in the Max Processor and Processor text box. Accept the default Priority and Processor Cap % settings. Click Next to proceed.
 
Figure 12
Create Virtual Machine Oracle VM Manager
 
Tip: In the Server drop down menu select an Oracle VM Server that’s not running mission critical VMs to minimize the performance impact to the running VMs of creating the virtual disks (an I/O and CPU intensive operation).
 
From the Set up Networks window accept the default  Unassigned VNICs selection, select the network from the Network drop down menu, then click the Add VNIC button, Click Next to proceed.
 
Figure 13
Set up Networks Oracle VM Manager
 
From the Arrange Disks window create the disks, i.e. one 20G disk for the OS, and one 50G disk for /u01. Select the + icon to open the Create a Virtual Disk window. From the Create Virtual Disk windows select the desired storage Repository in the drop down menu, enter a name for the OS disk in the Virtual Disk Name text box, enter the Size (GiB) in the text box, optionally enter a Description, and select the desired Allocation Type for the disk. Click OK to proceed.
 
Figure 14
Set up Networks Oracle VM Manager
 
Tip: Define a Virtual Disk Naming convention for your environment so that you can easily recall Virtual Disk information in the future. In this example, we have decided on the convention (vm_name-disk0) for the system disk. If you add a second disk, you would name it (vm_name-disk1), and so on. Define your naming convention from the beginning and stick with it.
 
From the Boot Options window confirm the Network boot option is in the right side window. Enter the Network Boot Path in the Network Boot Path text box. Click Finish to summit the Create Virtual Machine job.
 
Tip: If the Network Boot Path option is not visible, go back to the Create Virtual Machine window and select the Domain Type Xen PVM.
 
Figure 15
Boot Options Oracle VM Manager
 

The virtual machine is created and ready to Start, access the VNC console and install the Oracle Linux operating system.

 
Oracle Linux 6 HVM Installation using Graphical (GUI) Mode
This section reviews how to install Oracle Linux 6 with the graphical (GUI) mode using the Oracle VM Manager VNC console.
 
1- Start the VM and access its VNC console.  At the boot prompt, press the Enter key to start the Oracle Linux installation in graphical mode.
 
Figure 16
Oracle Linux Boot Prompt
 
2- On the CD Found window, you can perform a media test to validate the integrity of the installation media. The media test is optional and time consuming. In this example, we will not perform a media test.
 
Press the tab key to select the Skip key. Once the Skip key is selected, press the Enter key to proceed.
 
Figure 17
Oracle Linux Disk Found
 
3- On the Welcome screen, click the Next button or Alt+N to proceed.
 
Figure 18
Oracle Linux Welcome Screen

4- On the Language Selection screen, select the preferred language that will be used during the installation process. In this example, select the default language, English (English).
 
Accept the default English (English) language selection, then click the Next button or press Alt+N to proceed.
 
Figure 19
Oracle Linux Language Selection
 
5- On the Keyboard Selection screen, select the desired keyboard setting for the system. In this example, select the default keyboard selection, US English.
 
Accept the default US English keyboard selection, then click the Next button or press Alt+N to proceed.
 
Figure 20
Oracle Linux Keyboard Selection
 
 
6- On the Storage Device screen, you can select the Basic Storage Devices or the Specialized Storage Devices options. 
 
In this example, accept the default Basic Storage Devices option, click the Next button or press Alt+N to proceed.
 
Figure 21
Oracle Linux Select Storage
 
7- A disk initialization Warning dialogue box will appear after you make your Storage Device selection. Click the Re-initialize button or press Alt+R to proceed with the installation.
 
Figure 22
Oracle Linux Reinitializing
 
8- On the Networking configuration screen, you can accept the default DHCP setting or configure the networking manually. To use DHCP, accept the defaults, and click the Next button or press Alt+N to proceed.
 
Click the Configure Network button to review the network configurations.
 
Figure 23
Oracle Linux Hostname Selection
 
9- From the Network Connections screen, select the desired connection, i.e. eth0 and click the Edit button.
 
Figure 24
Oracle Linux Network Connections
 
10- On the Editing System screen select the Connect automatically checkbox to enable the interface to automatically start at boot time. To configure the networking manually, click the desired tab to configure the selected interface. Click the Apply button to save the networking setting and to return to the Network Connections screen.
 
Figure 25
Oracle Linux Edit Network Settings
 
11- On the Networking Connections screen, click the Close button or press Alt+C, next  click the Next button or Alt+N to proceed.
 
Figure 26
Oracle Linux Network Options
 
12- On the Time Zone screen, select the time zone for your area by clicking your region on the map. Accept the default System clock uses UTC setting, and click the Next button or press Alt+N to proceed.
 
Figure 27
Oracle Linux Time Zone
 
13- On the Root Password screen enter a root password for the server, then click the Next button or press Alt+N to proceed.
 
Figure 28
Oracle Linux Root Password
 
14- On the Installation Type screen, you can select the desired partitioning layout or create your own partitioning layout. 
 
In this example, accept the default Replace Existing Linux System(s), click the Next button or press Alt+N to proceed.
 
Note: To edit the default partitioning layout, select Review and modify partitioning layout  option and click Next or Alt+N.
 
Figure 29
Oracle Linux Partitioning Options
 
15- A partition table Warning dialogue box will now appear. Click the Write changes to disk or press Alt+W to proceed.
 
Figure 30
Oracle Linux Write Storage Configurations
 
16- On the Software Selection screen, you can accept the default selections or select one or more roles for the server and/or customize the entire software selection by selecting the Customize now.
 
Oracle recommends installing Linux using the default software package selection without any customization. The default software packages have most of the prerequisite packages for Oracle technologies and helps limit the number of manual checks.
 
Select the Desktop option without any customization, then click the Next button or press Alt+N to proceed.
 
Figure 31
Oracle Linux Select Desktop Option
 
17- On the Installation Progress screen, you will see a dialogue box about the installation starting. Once the Starting Installation process screen is gone, the installation begins and you see the progress indicators. The installation will take a few minutes.
 
Figure 32
Oracle Linux Installation Progress
 
18- The Congratulations screen informs you that the installation is complete and to remove your DVD media from the system and to reboot the system. Remove the CD/DVD media from the system
 
Figure 33
 
Oracle Linux Congratulations
 
At this point you would be advised to shutdown the VM using the VM Manager GUI because the DVD is still listed first in the boot order for this VM. Go to the VM Manager and right-click on our newly created Oracle Linux 6 VM and then left-click Stop. Wait for the VM Manager to indicate that the VM is shutdown completely as indicated by a removal of the lock icon and the VM icon now appearing in the color red. Right-click on the VM and then left-click Edit. Click Next until you get to the Boot Order screen and remove the DVD from the Boot Order. Click Next, then click Finish. You can now start the VM by again right-clicking on the VM from the VM Manager GUI and selecting Start.
 
19- After the system reboots, you will be presented with the Welcome screen. Click the Forward button or press Alt+F to proceed.
 
Figure 34
 
Oracle Linux Welcome Screen
 
20- On the License Agreement screen, accept the license agreement and click the Forward button or press Alt+F to proceed.
 
Figure 35
 
Oracle Linux License Agreement
 
21- On the Set Up Software Updates screen, select the desired Unbrekable Linux Network registration option, then click the Forward button or press ALT+F to proceed.
 
Figure 36
 
Oracle Linux Set Up Software Updates
 
22- If you selected No from the previous screen, click the No thanks, I'll connect later. button to proceed.
 
Figure 37
 
Oracle Linux Security and Updates
 
23- On the Finish Update Setup screen click the Forward button or press ALT+F to proceed.
 
Figure 38
 
Oracle Linux Finish Updates
 
24- On the Create User screen, you can create new system users. Click the Forward button or press Alt+F to proceed.
 
Figure 39
 
Oracle Linux Create User
 
25- On the Date and Time screen you can configure the Date and Time and Network Time Protocol (NTP) settings. Configure the Date and Time and Network Time Protocol settings, then click the Forward button or press Alt+F to proceed.
 
Figure 40
 
Oracle Linux Date and Time
 
26- On the Kdump screen, accept the default setting and click the Forward button or press Alt+F to proceed.
 
Figure 41
 
Oracle Linux Kdump
 
27- On the Login screen, click on the desired user name and enter the password to access the desktop.
 
Figure 42
 
Oracle Linux Login
 
28- Once you have successfully authenticated, you have a fully functional GNOME desktop environment.
 
Figure 43
 
Oracle Linux GNOME
 
Oracle Linux 6 HVM Installation using Text Mode
After creating your Linux VM using the VM Manager GUI you are now ready to begin installation. If your VM has less than 1024MB of RAM then the installer will default to text-mode. This section will guide you through the text-based installer for Oracle Linux 6.1.
 
From the Oracle VM Manager, right-click on your newly created VM and select “Start”. After the VM has started, right-click again on the VM and select Start Console.
 
For a text mode installation, at the boot prompt below press tab and enter text after the boot line.
 
Figure 44
 
Oracle Linux Installation Text Mode
 
Press <Enter> to begin the Installation process.
 
We do not need to test the installation media, so select “Skip” and then press <Enter>.
 
Figure 45
Oracle Linux Disk Found
 
This takes us to the Welcome screen. Press <Enter> to continue.
 
 
Figure 46
 
Welcome to Oracle Linux server
 
Choose your language, press <Tab> to highlight the OK button then press <Enter>.
 
Figure 47
 
Oracle Linux Language Selection
 
Select the model of your keyboard, press <Tab> to highlight the OK button, then press <Enter>.
 
Figure 48
 
Oracle Linux Keyboard Selections
 
Press <Tab> to highlight the Re-initialize button then press <Enter> to continue.
 
Figure 49
 
Oracle Linux Re-initialize Disk
 
Use the default UTC (Coordinated Universal Time) if appropriate for your environment.
Select your Time Zone then press <Tab> to highlight the OK button then press <Enter>.
 
Figure 50
 
Oracle Linux Time Zone
 
Define the root password for your new VM. Press <Tab> to highlight the OK button then press <Enter>.
 
Figure 51
 
Oracle Linux Root Password Selection
 
Partition using the entire drive, select the appropriate drive then press <Tab> to highlight the OK button then press <Enter>.
 
Figure 52
 
Oracle Linux Partitioning Type
 
Press <Tab> to highlight the Write changes to disk button then press <Enter>.
 
Figure 53
 
Oracle Linux Writing Storage Configuration to Disk
 
The installer now creates and formats the volume group and filesystems.
 
Figure 54
 
Oracle Linux Formatting
 
At this point, installation of your new Oracle Linux 6 VM will begin.
 
Figure 55
 
Oracle Linux Installation Starting
 
This is a Minimal Install so only the base 226 packages are now installed.
 
Figure 56
 
Oracle Linux Package Installation
 
When you get to this screen, do not reboot.
 
Figure 57
 
Oracle Linux Installation Complete
 
Instead switch back to the VM Manager GUI and shutdown the Virtual Machine.
 
Figure 58
 
After the shutdown operation completes, you can right-click on the VM, select Edit, click next until you get to the Storage Options. You can now uncheck the ISO image. You no longer need it.
 
Figure 59
 
Under storage options you see that our Virtual disk is in the disk order.
 
Figure 60
 
Now, remove CDROM from the boot order. In its place add Disk. Click Finish. You are now ready to start your newly installed VM for the first time by launching the console from the VM Manager GUI.
 
To register your new VM to receive patches and updates from the Oracle Unbreakable Linux Network for OL5 run the up2date --register command and for OL 6 run the uln_register command.
 
# up2date (OL 5)
# uln_register (OL6)
 
If your behind a proxy server, use the “--proxy” option to specify an http proxy, i.e. as root type “uln_register -proxy=<HOST NAME>:<PORT NUMBER> “
 
If your proxy server requires authentication, use the “--proxyUser” and “--proxyPassword” to add a username and password, i.e “# uln_register –proxy=<HOST NAME>:<PORT NUMBER> --proxyUser=<USER NAME> --proxyPassword=<PASSWORD>”
 
How to Add a Virtual Disk
 
UNDER DEVELOPEMENT
 
From the VM Manager GUI, select Home, then Server Pools, then Repositories and choose the appropriate repository.
 
Figure 61
 
Next, select Virtual Disks. Click the Create Virtual Disk icon.
 
Figure 62
 
From the Create Virtual Disk screen give the virtual disk a name using your organization's standardized naming convention and size the virtual disk. Click OK and wait for the Job to complete.
 
Figure 63
 
Now right-click on the VM for which you wish to add an additional virtual disk and select EditNote: you cannot complete this action on a running VM so make sure the VM has been powered down first. Click Next until you get to the Storage Options and select the newly created virtual disk. Click Next and then Finish.
 
Figure 64
 
When this Job completes you may start the VM, login via the VNC console or SSH and take the appropriate steps to create a filesystem and mount the filesystem. Use the case below as a starting point.
 
# fdisk -l
 
Disk /dev/xvda: 16.0 GB, 16000000000 bytes
255 heads, 63 sectors/track, 1945 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ccd59
 
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 64 1946 15111168 8e Linux LVM
 
Disk /dev/xvdb: 50.0 GB, 50000000000 bytes
255 heads, 63 sectors/track, 6078 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b3029
 
Device Boot Start End Blocks Id System
 
Disk /dev/mapper/VolGroup-lv_root: 13.4 GB, 13358858240 bytes
255 heads, 63 sectors/track, 1624 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
Disk /dev/mapper/VolGroup-lv_root doesn't contain a valid partition table
 
Disk /dev/mapper/VolGroup-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
Disk /dev/mapper/VolGroup-lv_swap doesn't contain a valid partition table
 
Here we see our newly created virtual disk /dev/xvdb, size 50GB.
 
# fdisk /dev/xvdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x51b17688.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
 
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
 
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
 
Command (m for help): p
 
Disk /dev/xvdb: 50.0 GB, 50000000000 bytes
255 heads, 63 sectors/track, 6078 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x51b17688
 
Device Boot Start End Blocks Id System
 
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-6078, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-6078, default 6078):
Using default value 6078
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
 
Create a partition using the fdisk tool. In this case we choose to use all of partition 1.
 
# pvcreate /dev/xvdb1
Physical volume "/dev/xvdb1" successfully created
# vgcreate vg0 /dev/xvdb1
Volume group "vg0" successfully created
# lvcreate -n lvol0 -l 100%FREE vg0
Logical volume "lvol0" created
# mkfs.ext4 /dev/vg0/lvol0
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
3055616 inodes, 12205056 blocks
610252 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
373 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
 
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mkdir /u01
# echo "/dev/vg0/lvol0 /u01 ext4 defaults 0 0" >> /etc/fstab
# mount /u01
# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/xvda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/mapper/vg0-lvol0 on /u01 type ext4 (rw)
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
13G 764M 11G 7% /
tmpfs 495M 0 495M 0% /dev/shm
/dev/xvda1 485M 48M 412M 11% /boot
/dev/mapper/vg0-lvol0
46G 180M 44G 1% /u01
 
Create the Physical Volume, Volume Group and Logical Volume. Make an ext4 filesystem on the logical volume. Add the filesystem to your /etc/fstab file so the newly created filesystem is mounted automatically on reboot. Create the mount point and finally, mount your new filesystem. Congratulations.
 
How to Add a Virtual Network Interface
 
From the VM Manager GUI, right-click on your VM and select Edit. Note: you cannot make changes to a running VM so shut it down before you begin this process.
 
From the Edit Virtual Machine screen, click next to access the Network Options screen. Select a free VNIC and click the Add button to move it to the Selected Value(s) window. Click Finish.
 
Figure 65
 
Now start your VM and then Console or SSH into it.
 
# cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-eth1
# vi ifcfg-eth1
# ifup eth1
 
Determining IP information for eth1... done.
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:F6:00:00:0F
inet addr:192.168.4.127 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::221:f6ff:fe00:f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1906 errors:0 dropped:0 overruns:0 frame:0
TX packets:1017 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:138940 (135.6 KiB) TX bytes:639453 (624.4 KiB)
Interrupt:243
 
eth1 Link encap:Ethernet HWaddr 00:21:F6:00:00:0A
inet addr:192.168.4.126 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::221:f6ff:fe00:a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3349 (3.2 KiB) TX bytes:1280 (1.2 KiB)
Interrupt:242
 
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 
When you edit the ifcfg-eth1 file make sure to update the MAC Address to reflect the new device, ie HWADDR="00:21:F6:00:00:0A", in this example.
 
Linux Patch Management with Free Updates and Errata from Oracle
In March 2012, Oracle announced that Oracle Linux 4, 5 and 6 latest RPM patches, updates and erratas are available at no cost from separate yum repositories on http://public-yum.oracle.com. To keep Oracle Linux and Red Hat Enterprise Linux system up to date to the latest update version, subscribe hosts to their respective "_latest" repository. The free Oracle Linux 4, 5 and 6 RPM patches, updates and erratas do not include  Oracle support or any of the benefits of the Oracle Linux Support program.

The Oracle Linux Support program offers the following benefits over and above the free Oracle Linux RPM patches, updates and erratas:
Full indemnification against intellectual property claims.  Remember the SCO lawsuits?
Use of the Oracle Enterprise Manager 12c Systems Management Plug-in for Linux for provisioning, patching, management and monitoring.  The Systems Management Plug-in for Linux has feature parity with Red Hat Satellite Server.
Access to additional Oracle software channels on the Unbreakable Linux Network (ULN).
The ability to create Support Requests with Oracle' World Class support organization.

The Oracle public yum server latest RPM channels include the base OS version installation RPM packages along with the latest software patches, updates and fixes. Patch jobs using the latest RPM channel update hosts to their respected latest version update with the latest software patches, updates and fixes. A patch job executed on a Oracle Linux 6 host would update the host from 6 to 6U2 with the latest latest software patches, updates and fixes. To keep a host at its respected update level, access to the Unbreakable Linux Network Rpm channels is required where it is possible to remove the default “el*/ol*_latest” RPM channel and select the el*/ol*_base along with the el*/ol*_patch RPM channel. When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM channels, the hosts are patched with the latest software patches, updates and fixes from their respected update channel, i.e. 6, 6U1, 6U2.

To configure an Oracle Linux, Red Hat Enterprise Linux 6 host to use Oracle's public yum repository, as root, change to the /etc/yum.repos.d/ directory and type “wget http://public-yum.oracle.com/public-yum-ol6.repo” to download the public-yum-ol6.repo file. Next, type “yum update” to patch the host.

The next example shows how to download the public-yum-ol6.repo file from Oracle and to update an Oracle Linux or Red hat Enterprise Linux host. Type the following commands as root:

# cd /etc/yum.repos.d/
# wget http://public-yum.oracle.com/public-yum-ol6.repo
# yum update

The next example shows the public-yum-ol6.repo file.

Tip: You can enable any of the repositories in the public-yum-ol6.repo file by changing enabled=0 to enabled=1.

# vi /etc/yum.repos.d/public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
 
[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
 
How to Delete a Virtual Machine
You can only delete a VM that is in Stop or Error state. If you're dead set on getting rid of a VM, simple right-click on the VM to remove and select Delete. Choose any Virtual Disks you also wish to delete and click OK. All files and properties associated with this VM should now be deleted.
 
Tip: We have seen it happen that the Virtual Machine is still seen inside the VM Manager GUI after deleting the Virtual Machine using the above process. As a workaround, we were finally able to delete the problem VM by right-clicking on the VM, selecting Edit and then clicking Next, removing all associated Vnic's, Boot Order devices and Virtual Disks manually, then clicking Save. At this point we were able to successfully delete the VM.
 
Document Created: 10/10/11
Last Update: 01/19/13
 
Copyright © 2015 Mokum Solutions, Inc. All rights reserved.
Distribution of the Oracle Cloud Cookbook or derivative of the work in any form is prohibited unless prior permission is obtained from the copyright holder.