Wednesday, June 3, 2020

How to Restore the Factory Default Configuration From the Service Processor

If you remove the Logical Domains Manager before restoring the factory default configuration, you can restore the factory default configuration from the service processor.

  1. Restore the factory default configuration from the service processor.
    -> set /HOST/bootmode config=factory-default
  2. Perform a power cycle of the system to load the factory default configuration.
    -> reset /SYS



How to Remove the Logical Domains Manager

After restoring the factory default configuration and disabling the Logical Domains Manager, you can remove the Logical Domains Manager software.


Note - If you remove the Logical Domains Manager before restoring the factory default configuration, you can restore the factory default configuration from the service processor as shown in the following procedure.


  • Remove the Logical Domains Manager software.
    • Remove the Oracle Solaris 10 SUNWldm and SUNWldmp2v packages.
      primary# pkgrm SUNWldm SUNWldmp2v
    • Remove the Oracle Solaris 11 ldomsmanager package.
      primary# pkg uninstall ldomsmanager

Factory Default Configuration and Disabling Logical Domains

How to Remove All Guest Domains

  1. Stop all domains by using the -a option.
    primary# ldm stop-domain -a
  2. Unbind all domains except for the primary domain.
    primary# ldm unbind-domain ldom

    Note - You might be unable to unbind an I/O domain if it is providing services required by the control domain. In this situation, skip this step.


  3. Destroy all domains except for the primary domain.
    primary# ldm remove-domain -a

How to Remove All Logical Domains Configurations

  1. List all the logical domain configurations that are stored on the service processor (SP).
    primary# ldm list-config
  2. Remove all configurations (config-name) previously saved to the SP except for the factory-default configuration.

    Use the following command for each such configuration:

    primary# ldm rm-config config-name

    After you remove all the configurations previously saved to the SP, the factory-default domain is the next domain to use when the control domain (primary) is rebooted.

How to Restore the Factory Default Configuration

  1. Select the factory default configuration.
    primary# ldm set-config factory-default
  2. Stop the control domain.
    primary# shutdown -i1 -g0 -y
  3. Perform a power cycle of the system to load the factory default configuration.
    -> stop /SYS
    -> start /SYS

How to Disable the Logical Domains Manager

  • Disable the Logical Domains Manager from the control domain.
    primary# svcadm disable ldmd

    Note - Disabling the Logical Domains Manager does not stop any running domains, but does disable the ability to create a new domains, change the configuration of existing domains, or monitor the state of the domains.


How to Enable the Logical Domains Manager Daemon

Use this procedure to enable the ldmd daemon if it has been disabled.

  1. Use the svcadm command to enable the Logical Domains Manager daemon, ldmd.

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

    # svcadm enable ldmd
  2. Use the ldm list command to verify that the Logical Domains Manager is running.

    The ldm list command should list all domains that are currently defined on the system. In particular, the primary domain should be listed and be in the active state. The following sample output shows that only the primary domain is defined on the system.

    # /opt/SUNWldm/bin/ldm list
    NAME             STATE    FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
    primary          active   ---c-   SP      64    3264M    0.3%  19d 9m

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) 


How to Install the Oracle Solaris OS on a Guest Domain From an Oracle Solaris ISO File

Stop and unbind the guest domain ( ldg1 ). primary# ldm stop ldg1 primary# ldm unbind ldg1 Add the Oracle Solaris ISO file as a secondary vo...