Wednesday, June 3, 2020

Installing Oracle VM Server for SPARC Software on a New System

SPARC platforms that support the Oracle VM Server for SPARC software come preinstalled with the Oracle Solaris 10 OS or the Oracle Solaris 11 OS. Initially, the platform appears as a single system hosting only one operating system. After the Oracle Solaris OS, system firmware, and Logical Domains Manager have been installed, the original system and instance of the Oracle Solaris OS become the control domain. That first domain of the platform is named primary, and you cannot change that name or destroy that domain. From there, the platform can be reconfigured to have multiple domains hosting different instances of the Oracle Solaris OS.

Downloading the Logical Domains Manager

You can obtain the latest packages for both the Oracle Solaris 10 OS and the Oracle Solaris 11 OS. Note that the Oracle VM Server for SPARC software is included by default with the Oracle Solaris 11 OS.

How to Download the Logical Domains Manager Software (Oracle Solaris 10)

  1. Download the zip file (OVM_Server_SPARC-3_0.zip).

    You can find the software at http://www.oracle.com/virtualization/index.html.

  2. Unzip the zip file.
    $ unzip OVM_Server_SPARC-3_0.zip
Automatically Installing the Logical Domains Manager Software

If you use the install-ldm installation script, you have several choices to specify how you want the script to run. Each choice is described in the procedures that follow.

  • Using the install-ldm script with no options does the following automatically:

    • Checks that the Oracle Solaris OS release is the Oracle Solaris 10 OS

    • Verifies that the package subdirectories SUNWldm/ and SUNWldmp2v/ are present

    • Verifies that the prerequisite Logical Domains driver packages, SUNWldomr and SUNWldomu, are present

    • Verifies that the SUNWldm and SUNWldmp2v packages have not been installed

    • Installs the Oracle VM Server for SPARC 3.0 software

    • Verifies that all packages are installed

    • If the SST (SUNWjass) is already installed, you are prompted to harden the Oracle Solaris OS on the control domain.

    • Determine whether to use the Oracle VM Server for SPARC Configuration Assistant (ldmconfig) to perform the installation.

  • Using the install-ldm script with the -c option automatically runs the Oracle VM Server for SPARC Configuration Assistant after the software is installed.

  • Using the install-ldm script with the -s option skips the running of the Oracle VM Server for SPARC Configuration Assistant.

  • Using the install-ldm script and the following options with the SST software enables you to do the following:

    • install-ldm -d. Allows you to specify a SST driver other than a driver ending with -secure.driver. This option automatically performs all the functions listed in the preceding choice and hardens the Oracle Solaris OS on the control domain with the SST customized driver that you specify; for example, the server-secure-myname.driver.

    • install-ldm -d none. Specifies that you do not want to harden the Oracle Solaris OS running on your control domain by using the SST. This option automatically performs all the functions except hardening listed in the preceding choices. Bypassing the use of the SST is not suggested and should only be done when you intend to harden your control domain using an alternate process.

    • install-ldm -p. Specifies that you only want to perform the post-installation actions of enabling the Logical Domains Manager daemon (ldmd) and running the SST. For example, you would use this option if the SUNWldm and SUNWjass packages are preinstalled on your server.

Manually Installing the Logical Domains Manager Software

The following procedure guides you through manually installing the Oracle VM Server for SPARC 3.0 software on the Oracle Solaris 10 OS.

When you install the Oracle Solaris 11 OS, the Oracle VM Server for SPARC 2.1 software is installed by default. If you want to install the Oracle VM Server for SPARC 3.0 software, see How to Upgrade to the Oracle VM Server for SPARC 3.0 Software (Oracle Solaris 11)

ownload the Oracle VM Server for SPARC 3.0 software (the SUNWldm and SUNWldmp2v packages). For instructions, see How to Download the Logical Domains Manager Software (Oracle Solaris 10).

  1. (Optional) Save your configuration to the service processor (SP), if necessary.

    Perform this step only is you are already running an earlier version of the Oracle VM Server for SPARC software.

    primary# ldm add-config config-name
  2. Install the SUNWldm.v and SUNWldmp2v packages.
    # pkgadd -Gd . SUNWldm.v SUNWldmp2v

    Answer y for yes to all questions in the interactive prompts.

    The -G option installs the package in the global zone only. The -d option specifies the path to the directory that contains the SUNWldm.vand SUNWldmp2v packages.

    For more information about the pkgadd command, see the pkgadd(1M) man page.

  3. Verify that the SUNWldm and SUNWldmp2v packages are installed.

    The following revision (REV) information is an example:

    # pkginfo -l SUNWldm | grep VERSION
    VERSION=3.0,REV=2012.11.01.10.20

    For more information about the pkginfo command, see the pkginfo(1) man page.


Monday, March 2, 2020

How To Access Guest Console In OVM 3 Using VNC Without Using OVM Manager


Earlier releases of OVM (2.x) documented manual configuration to enable access to virtual machine consoles through VNC without using the OVM 2.x manager:

E.3 Guest Console Access
However, such configuration is not possible with Oracle VM 3.


With OVM3 this is achieved by redirecting the remote port to a local port using the ssh(1) command.
To do this, first find the id of the vm (this can be done in the Manager UI by expanding the entry for the vm, or using the "list vm" command in the CLI).

Then on the OVM Server ("ovs", aka "dom0") the vm is running on, issue the xm list command to find its ID, e.g.:
# xm list

Name                             ID Mem VCPUs State  Time(s)
0004fb00000600005454e1ab286913be 2  4096    2 -b---- 424.6
Domain-0                         0  840     8 r----- 478278.2

In this example the ID is 2.

Then find the port the vm console is listening on:
# xm list -l 2 | grep 59
(uuid 3c787270-abad-9595-8258-d27f03fd928d)
(location 127.0.0.1:5900)

In this example the vnc port for the vm is 5900.

On the system where you wish to display the console, open an ssh session to the ovm server and redirect the port to it, e.g.:
$ ssh -L 12345:localhost:5900 root@olvm-ovs00009

The "5900" port on the ovs will be redirected to port "12345" of your local desktop.

Leave this session open for the duration of the vnc session.

Then vncviewer can be used to open the vm console, e.g. from another terminal issue:
$ vncviewer localhost:12345

 On a Windows system, you can use some other SSH client, e.g. PuTTY for the re-direct.


How To Regenerate The Oracle VM Manager 3.3.x/3.4.x DB



To regenerate the Oracle VM database you'll need to have access to the /u01/app/oracle/ovm-manager-3/.configfile.  This file has the parameters of your database that will be used for the regeneration. 

For Oracle VM 3.4. x release, please consider restoring a valid backup before regenerating the database.

The process for Regenerating your database should be:
  1.      Stop the ovm services
  2.      Delete the Manager Data Base   The ovm_upgrade.sh command is used to delete the current Oracle VM database.
  3.      Generate new certificates.
  4.      Start the services
  5.      Restart the ovm service for the certificate to be applied
  6.      Repopulate the DB by discovering and refreshing the repositories
  7.      To restore the simple names  Use KM article: Restore OVM Manager "Simple Names" After a Rebuild/Reinstall (Doc ID 2129616.1)
Note: Anything in <> should be replaced with the value appropriate to your environment or filename.
1. The Oracle VM manager services need to be shutdown, to delete the OVM manager database.
#service ovmm stop

2. Delete the current OVM database.  

(Use the dbuser and password, not the ovm admin user/passowrd.)
Using ovm_upgrade.sh from /u01/app/oracle/ovm-manager-3/ovm_upgrade/binand the values from the /u01/app/oracle/ovm-manager-3/.configfile, delete the bad database
Command syntax:
# sh ovm_upgrade.sh --deletedb --dbuser=<user> --dbpass=<password> --dbhost=localhost --dbport=<database-port> --dbsid=<your sid>

Obtain the values to substitute from the /u01/app/oracle/ovm-manager-3/.config on a management node:
# cat /u01/app/oracle/ovm-manager-3/.config
DBTYPE=MySQL
DBHOST=localhost
SID=ovs             < --dbsid
LSNR=1521           < --dbport
OVSSCHEMA=ovs       < --dbuser
APEX=8080
WLSADMIN=weblogic
OVSADMIN=admin
COREPORT=54321
UUID=0004fb00000100009bfa6a96c1303e32
BUILDID=3.2.11.775
default "--dbpass" is "Welcome1" - use appropriate value for your system.
 Sample delete command based on the above sample .config file: 
#sh /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovm_upgrade.sh --deletedb --dbuser=ovs --dbpass=Welcome1
--dbhost=localhost --dbport=1521 --dbsid=ovs 

  3. Start the OVM services and Generate  the replacement certificate

#service ovmm start
#export MW_HOME=/u01/app/oracle/Middleware
#/u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic

4. Activate the new certificate.


#sh /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

Stop then start the OVM service apply the new certificate.

#service ovmm stop
#service ovmm start

5. Repopulate the database

1) Login, the UI should be EMPTY of  any data. The OVM servers and VMs are still up and running, the poolFS and repos already exist

2) Repopulate the database by Rediscovering the environment using the Oracle OVM Manager UI.
The OVM database is rebuilt from the existing servers in the pool, so the relationships will already be established.  The Servers and VMs are up and running, the pool filesystem the storage repositories are on the servers.
a. Discover Server(s) -> Pool/OVM Server(s) will be visible again
        If your storage is network based, validate that your servers are listed under the storage tab.
        If not "Discover server" and enter the name and IP of the storage array.


b. Refresh Repository (right click each storage, and choose refresh

c. Rediscover Server(s) -> VM's will reappear under the OVM Server(s). Non running VM's can be found under "Unassigned Virtual Machines"

Note: NFS  and iSCSI repositories need to be re-discovered independently after "re-discover Oracle VM Servers" and "refresh-all on Server Pools",
because occasionally NFS repositories can not be re-discovered, and the regeneration does not recover iSCSI storage.

d. if one need more VNICS, Run VNIC Manager to recreate a range of MAC addresses, because only the MAC addresses in use will have been rediscovered

6.  Restore the simple names
This Database will be populated, but you will be missing items such as friendly disk names, display names for Vdisk, Vnics etc. (meta data)

Please refer to KM article: Restore OVM Manager "Simple Names" After a Rebuild/Reinstall (Doc ID 2129616.1)   to restore the friendly names. 

After the friendly names have been restored,  
Logout, and close the browser.
Open a browser, and login.

The data base should be up and working with the friendly names (meta data) 


Configure Secure TCP for Oracle VM Manager




The configuration of the TCPS service requires a certain amount of understanding about keystores and certificates. It is similar to the HTTPS configuration of Weblogic, so if you are involved in setting up overall Oracle VM security, this will be straightforward.

It's preferred to use the bundled scripts to create keystore and enable TCPS service for Oracle VM Manager.

Using Bundled Scripts
When you perform a fresh install of Oracle VM Manager 3.1.1, 3.2.x or 3.3.x, scripts are provided under /u01/app/oracle/ovm-manager-3/bin of the Oracle VM Manager server
·         secureOvmmTcpGenKeyStore.sh: create the keystore
·         secureOvmmTcp.sh: use the generated keystore to enable the TCPS service for Oracle VM Manager

For Oracle VM Manager 3.2.x and 3.3.x, the scripts are included as part of the default installation.
For detailed instructions how to use the scripts, please refer to the documentation:
After you follow the instructions to create keystore and enable TCPS service for Oracle VM Manager. Once Oracle VM Manager is restarted, you can verify the status to confirm that Oracle VM Manager is now listening for TCPS requests on port 54322 by default.

# netstat -a | grep  54322
tcp       0     0*:54322                    *:*                         LISTEN

Additional Resources
For more information, see the following links:



How to Create Virtual Disk without Oracle VM Manager




In some situations, it may be necessary to know how to create a Virtual Disk on OVM 2.2 without using OVM Manager, and attach it to a Virtual Machine.

This can be done in OVM 2.2 via the following process:

1. Log into the Oracle VM server where the VM is running.

2. Change the directory at which the repository is mounted, e.g.:
# cd /to/path/to/repo

3. Create the raw format .img disk image, e.g. initiating 4 GB Virtual Disk:
# dd if=/dev/zero of=newdisk.img bs=1M count=4096

4. Then add new disk image to disk = [ ] section of vm.cfg file of a Virtual Machine. Format:
disk = [ 'file:/mnt/el4u5_64_hvm//system.img,hda,w' ]

Note: Making any change to vm.cfg file effective requires a domain re-creation which is Virtual Machine shutdown then start (NOT restart.)

5. If an outage on the Virtual Machine is not possible, then hot plug read/write as /dev/xvdX by:
# xm block-attach [domain ID] /path/to/image /dev/xvdX w


To increase Virtual Machine Memory in the OVM Manager GUI ?




To increase Virtual Machine Memory in the OVM Manager GUI, Please follow the following steps 


1. Using Oracle VM Manager GUI:

2. Login to Oracle VM Manager (GUI).

3. Select the VM and click on edit.

4. Check the assigned "Max. Memory (MB):" and "Memory (MB):".

5. If the "Max. Memory (MB):" is the same as "Memory (MB):", then you have to shut down the VM to increase the "Max. Memory (MB):" and "Memory (MB):".

6. If the "Max. Memory (MB):" is higher than the "Memory (MB):", then you can increase the "Memory (MB):" till "Max. Memory (MB):".

7. Ensure the "Memory (MB):" should not be higher than "Max. Memory (MB):"

8. Click on Save.

Login to the VM and verify allocated memory. 

Memory allocated to the VM can be check by Oracle VM Manager either by going to the Server and 
VM tab or by going to Health tab in GUI  then selecting Server and VM statistics. 

How to Inject ESX 5.2.1 Host Drivers into VMware ESXi 5.0U1 Media


The procedure for PXE Booting or SAN Booting an ESXi 5.0U1 host is the same as for an ESXi 4.0 host, with the exception of creating the injecting the host drivers into the ESXi 5.0U1 bundle. The following text documents how to inject the host drivers. Use the following text instead of the text for the remaster-iso script in the XgOS Remote Booting Guide.
After completing the following procedure, you can use the SAN Boot procedure for ESXi 4.0 hosts document to configure the ESXi 5.0U1 host for SAN Booting.
 
Considerations:
Be aware of the following:
• Creating the custom ISO is accomplished through Microsoft Windows PowerShell—and specifically the VMware vSphere PowerCLI plug-in for PowerShell. The Windows server will need this tool installed
• Creating the custom ISO is supported on a Windows host server only. The server requirements are determined by the PowerShell application
• You use a pre-configured ESXi bundle as a baseline, then inject the Xsigo/Oracle bits into it. The OS file is available on the VMware website: update-from-esxi5.0-5.0_update01.zip
• You will need full administrative rights on the Windows server where you will be creating the custom ISO

Manually Injecting the Host Drivers into the ESXi 5.0U1 Bundle.

The following procedure assumes the working directory is: \images\New for the user “adminA”.
 
To inject the host drivers into the ESXi 5.0U1 bundle, follow this procedure:

Step 1 Install PowerShell on the Windows server if you have not done so already.

Step 2 Install the PowerCLI plug-in if you have not done so already.

Step 3 Download the update-from-esxi5.0-5.0_update01.zip file to the Windows server.

Step 4 Start PowerCLI.

Step 5 In PowerCLI, run the following commands to import the ESXi 5.0 bundle and the host drivers into PowerCLI:
 
Add-EsxSoftwareDepot -DepotUrl C:\<file directory>\update-from-esxi5.0-5.0_update01.zip
Add-EsxSoftwareDepot -DepotUrl C:\<file directory>\xsigo_5.2.1.ESX.1-1vmw.500.0.0.472560.zip


Step 6 Run the following command to specify the profile that you want to use when creating the output ISO:

New-EsxImageProfile -CloneProfile ESXi-5.0.0-20120302001-standard -Name ESXi-5.0.0-20120302001-standard-xsigo
Step 7 Run the following commands to add the IB stack and other dependencies to the depot:

Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-ib-core
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-mlx4-core
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-ib-mad
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-ib-sa
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-mlx4-ib
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-xscore
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-xsvnic
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage net-xve
Add-EsxSoftwarePackage -ImageProfile <profile name> -SoftwarePackage scsi-xsvhba

Step 8 Run the following commands to create single output ISO containing all required files from the depot. The following example assumes unsigned drivers to provide the most complete example:
 
Export-EsxImageProfile -ImageProfile ESXi-5.0.0-20120302001-standard-xsigo -ExportToIso -FilePath C:\<file directory>\ESXi-5.0U1-623860.xsigo-5.2.1.iso

NoSignatureCheck
Supported Host Drivers

This section documents information about the supported ESX host drivers and how to obtain them.
 
Downloading Supported Drivers

You need access to the support site to download the drivers. To get the drivers:
Step 1 Log in to the download portal (http://www.oracle.com/technetwork/server-storage/xsigo-1870185.html).
Step 2 Navigate to the binaries and download them.
VMware ESXi 5.0 Host Drivers

For this release, host drivers for VMware ESXi Server 5.0U1 are: update-from-esxi5.0-5.0_update01.zip
 
Both the InfiniBand and host drivers are contained in this bundle, which is a new packaging method for distributing Xsigo/Oracle host drivers. Due to this new packaging method, the method for installing the host drivers has changed. See: Installing 5.0.0-ESX Host Drivers Directly from the ESXi 5.0 Bundle


Question 8 Explanation

Compartments are the primary building blocks you use to organize your cloud resources. You use compartments to organize and isolate your res...