12 Managing an Oracle Database Appliance Virtualized Platform

Review the concepts and procedures for Oracle Database Appliance Virtualized Platform.

These topics provides a conceptual overview of the Oracle Database Appliance Virtualized Platform architecture, and procedures for how to deploy a guest virtual machine, manage high availability, manage CPU pools, and configure network settings for Oracle Database Appliance Virtualized Platform. Learn about resizing your Oracle Database domain (ODA_BASE), a privileged virtual machine.

About Oracle Database Appliance Virtualized Platform

You can use Oracle VM to optimize your system resource use for databases and applications.

You can deploy a virtualized platform on Oracle Database Appliance. The virtual platform is based on Oracle VM. With Oracle Database Appliance Virtualized Platform, you can use the capabilities of Oracle VM to effectively allocate resources to databases and applications running on the same physical Oracle Database Appliance. Rather than simply disabling unnecessary server cores, you can use the excess capacity to host other workloads. This enables consolidation of both databases and applications, while retaining the ease of deployment and management associated with Oracle Database Appliance.

Oracle Database Appliance Virtualized Platform is supported on all versions of Oracle Database Appliance hardware. All templates and operating systems supported by Oracle VM are also supported on Oracle Database Appliance Virtualized Platform. Supported operating systems include Linux, Windows, and Solaris x86.

Note:

All new systems are currently shipped from the factory with the nonvirtualized ISO image

If you are currently on the nonvirtualized deployment of Oracle Database Appliance, and you want to use Oracle Database Appliance as a virtualized platform, then you must reimage the servers with the Oracle Database Appliance Virtualized Platform ISO image.

Why Virtualize?

Oracle Appliance Manager (oakcli) makes it easy to setup and manage the virtualized environment with little virtualization expertise. With the Virtualized Platform deployment, you can consolidate entire multi-tier environments within a single Oracle Database Appliance system.

The following are some of the advantages of deploying Oracle Database Appliance with the Virtualized Platform option:

  • Deploy database and applications in a single hardware environment.

  • Use the pre-configured VM application templates to rapidly deploy database and applications.

  • Run the database in a virtual machine (ODA_BASE) with direct access to storage (for native performance).

  • Control licensed CPUs by configuring ODA_BASE domain with the required number of CPU cores (and memory).

  • Use your CPU cores (and memory) efficiently. CPU cores not assigned to the ODA_BASE domain are not wasted and are available for use by other, non-database virtual machines.

  • Use virtual local area networks (VLANs) to provide separate networks to different virtual machines.

  • Use shared repository to grow storage for the virtual machine (VM) repository.

  • Improves data center efficiency by increasing space utilization and reducing energy consumption and cooling costs.

Oracle Database Appliance Virtualized Platform Architecture

Review these topics to understand Oracle Database Appliance Virtualized Platform, and how you can use it to optimize system resource use.

About Oracle Database Appliance Virtualized Platform Architecture

Review this topic to understand how Oracle Database Appliance Virtualized Platform works with Oracle Database Appliance hardware.

Oracle Database Appliance Virtualized Platform provides virtualization technology that enables multiple isolated databases and applications to share the same physical server. The Oracle Database Appliance Virtualized Platform ISO image is engineered specifically to leverage the Oracle Database Appliance hardware capabilities.

The Oracle Database Appliance Virtualized Platform architecture uses the virtual machine components shown in the following illustration:

Figure 10-1 Oracle Database Appliance Virtualized Platform Architecture

Description of Figure 10-1 follows
Description of "Figure 10-1 Oracle Database Appliance Virtualized Platform Architecture"
  • Oracle Database Appliance Base Domain (ODA_BASE): A privileged virtual machine domain, specifically for databases, that provides database performance similar to bare metal deployments. A PCI pass-through driver provides ODA_BASE direct access to the shared storage.

  • Domain 0 (Dom0): Default domain that initiates Oracle Database Appliance Virtualized Platform provisioning processes and hosts virtual machine templates. Most of the responsibility of hardware detection in an Oracle Database Appliance Virtualized Platform environment is passed to the management domain, referred to as domain zero (or Dom0). On x86-based servers, the Dom0 kernel is actually a small-footprint Linux kernel with support for a broad array of devices, file systems, and software RAID and volume management. In Oracle Database Appliance Virtualized Platform, Dom0 provides access to much of the system hardware, creating, deleting and controlling guest operating systems, and presenting those guests with a set of common virtual hardware.

  • Guest Domains (Domain U): Virtual machines that are provisioned to host non-database workloads, such as applications and middleware. Guest operating systems each have their own management domain, called a user domain, abbreviated to "Domain U". These domains are unprivileged domains that have no direct access to the hardware or to the device drivers. Each Domain U starts after Dom0 is running on Oracle Database Appliance Virtualized Platform.

About Virtual Machines and Oracle Database Appliance Virtualized Platforms

Oracle Database Appliance Virtualized Platform is designed to run and deploy virtual machines to manage system resources.

Configure virtual machines on Oracle Database Appliance Virtualized Platform to manage your application use of shared repository resources, such as the CPU pool, memory, and other shared resources.

Virtual Machine Templates

Virtual machines can be created from a template or assembly containing preconfigured virtual machines. The creation of a virtual machine from a template is based on cloning: the template is imported as an archive, unpacked, and stored as a virtual machine configuration file with disk images. These disk images are cloned to create a new instance in the form of a virtual machine. In the same way, an existing virtual machine can be cloned to create a new virtual machine, or cloned to create a new template.

Virtual Machine Assemblies

Virtual machine assemblies are often described as a template of a group of virtual machines, or a collection of virtual machine templates. An assembly can contain a single virtual machine or a collection of virtual machine templates.

Domains, Guests and Virtual Machines

The terms domain, guest, and virtual machine are often used interchangeably, but they have subtle differences. A domain is a configurable set of resources, including memory, virtual CPUs, network devices, and disk devices, in which virtual machines run. A guest is a virtualized operating system running within a domain. Multiple guests can run on the same instance of Oracle Database Appliance Virtualized Platform, each within its own domain. A virtual machine is granted virtual resources, and can be started, stopped, and restarted independently.

Virtual Disks

In addition to virtual machines, you can create virtual disks in shared repositories. Virtual disks provide additional storage options for virtual machines by enabling you to attach additional block storage to your virtual machines. Similarly, you can detach the storage if you no longer need the additional space. You can use virtual disks to expand existing file system storage inside the virtual machine by extending the storage volume onto a virtual disk, or by creating a new file system on a virtual disk. Your virtual disks can also share multiple virtual machines running on the same shared repository.

A driver domain is a user domain that has special privileges and responsibilities for a particular piece of hardware. When you use the driver domain option, the newly created virtual disks are mounted directly from ODA_BASE to a guest virtual machine. The option improves performance by enabling guest virtual machines to use ODA_BASE instead of Dom0 to access virtual disks. The driver domain option is available beginning with release 12.1.2.7.0 and is supported with Oracle Linux, Windows, and Oracle Solaris x86 guest operating systems. Live migration of driver domain virtual machines is not supported.

Shared Repositories

A shared repository is a central location for storing resources that are essential to creating and managing virtual machines. These resources include virtual machine templates and assemblies, ISO files (virtual DVD images), virtual machine configuration files, and virtual disks. Shared repositories are configured on an Oracle Automatic Storage Management Cluster File System (Oracle ACFS) and then presented to the Oracle Database Appliance nodes that need access to those resources. Oracle Database Appliance Virtualized Platform uses shared repositories to optimize available disk space usage in the environment, and for easy reallocation of virtual machines if a physical server fails. The virtual machine files can be stored on shared disks, providing shared storage for the virtual machines. Additionally, you can configure CPU pools and a resizeable Oracle Database domain (ODA_BASE) to ensure that the virtual machines do not consume cycles from each other or from your assigned database CPU cores.

  • The shared disks on Oracle Database Appliance Virtualized Platform are connected directly to ODA_BASE.

  • ODA_BASE contains three shared repositories named fs1, fs2, and fs3.

  • Each shared repository is an Oracle ACFS in ODA_BASE created on top of the Oracle Automatic Storage Management (Oracle ASM) disk group (DATA or RECO) chosen by the user when creating the shared repository.

  • The process that creates a shared repository also performs a network file system (NFS) export of the shared repository to the respective Dom0 by using the private network.

  • The export enables shared storage for the virtual machine files.

Figure 10-2 Architecture Overview of Oracle Database Appliance Virtualized Platform Shared Repositories

Description of Figure 10-2 follows
Description of "Figure 10-2 Architecture Overview of Oracle Database Appliance Virtualized Platform Shared Repositories"

With the configuration shown in the illustration, you can:

  • Create multiple repositories.

  • Mount these repositories either on the nodes where the virtual machine needs to run (such as fs2 and fs3 in the illustration), or on both the nodes (such as fs1 in the illustration).

  • Create one or more virtual machines or virtual machine templates on the shared repositories.

  • Use OAKCLI commands to create and manage shared repositories, virtual disks, and their virtual machines, and the underlying architecture shown in the illustration.

Note:

Virtual machine (VM) repositories on Oracle Database Appliance can only be on the boot drives or an Oracle Database Appliance shared storage shelf. External storage cannot be used for VM shared repositories on Oracle Database Appliance.

About Network Infrastructure and VLANs on Oracle Database Appliance Virtualized Platform

Oracle Database Appliance Virtualized Platform supports multiple VLANs on the same network port or bond.

Virtual local area networks (VLANs) are multiple logical networks that are created from a single physical network switch port. VLANs provide network security isolation for multiple workloads that share a common network. For example, application, backup, and management networks. Each VLAN acts as an independent logical network operating with other VLANs over the same physical connection. This means that virtual machines deployed on different networks, connected through the same Oracle VM Server port (or bond), can have traffic directed to different VLANs.

The physical ports in the system at deployment (either copper or fiber) are bonded as bond0 in single node platforms and bond1 in high-availability platforms. The VLAN is created on bond0 or bond1 to bond6, if they are available.

The network interfaces differ, depending on your Oracle Database Appliance hardware. In all cases, connections to user domains are through the selected interfaces. A switch that supports tagged VLANs uses VLAN IDs to identify the packet, including to which network the packet belongs.

Configuration Overview of Oracle Database Appliance Virtual Machine Local Area Networks

To specify which network you want to use to access a virtual machine, you employ network infrastructure components of Oracle Database Appliance Virtualized Platform. Oracle Database Appliance Virtualized Platform manages all of the high-level network infrastructure components for you by pre-creating the bridges for all networks. The front-end point for accessing a virtual machine is one of the bridges defined for Dom0.

When you configure a virtual machine, you define which network the virtual machine should use by identifying the related bridge.

For example, to connect a virtual machine named myvm1 to the net1 network, you would use the following command:

oakcli modify vm myvm1 -addnetwork net1

The illustration “Basic Virtual Machine Local Area Network" shows a typical Oracle Database Appliance local area network configuration that results from this virtual machine network configuration:

Figure 10-3 Basic Virtual Machine Local Area Network

Description of Figure 10-3 follows
Description of "Figure 10-3 Basic Virtual Machine Local Area Network"

You assign default VLANs to ODA_BASE during the installation and configuration of Oracle Database Appliance Virtualized Platform. The figure "Oracle Database Appliance Virtualized Platform with Virtual Local Area Networks" shows a typical Oracle Database Appliance configuration using VLANs. The illustration shows the same configuration as in "Basic Virtual Machine Local Area Networks," but with three tagged VLANs added for backups (backup), for applications (application), and for management (mgnt).

Figure 10-4 Oracle Database Appliance Virtualized Platform with Virtual Local Area Networks

Description of Figure 10-4 follows
Description of "Figure 10-4 Oracle Database Appliance Virtualized Platform with Virtual Local Area Networks"

Configuring Additional Networks on Virtualized Platform

Use the oakcli configure additionalnet command to create additional networks.

The oakcli configure additionalnet command runs an interactive script that requires you to provide the interface name, DHCP [Y/N], IP address, and netmask.

Example of Creating an Additional Network

When you run the command on Dom0, the interface name expects a net name. If you run the command on Dom1, then the interface name expects an eth name.

oakcli configure additionalnet

How to Create and Manage Shared Repositories

These topics describe how to use OAKCLI to create and manage shared repositories on Oracle Database Appliance Virtualized Platform.

Creating a Shared Repository

Use the oakcli create repo command to create a shared repository on Oracle Database Appliance Virtualized Platforms.

When you run the oakcli create repo command, you identify the repository name using the option repo, you identify the disk group that you want to use for its storage (DATA or RECO) using the option -dg, and you identify the size of the repository in gigabytes or megabytes (the default size unit is gigabytes) using the -size option.

Other Oracle Appliance Manager shared repository commands, including commands to show and to stop (dismount) existing repositories, are similar to those used for nonshared repositories. Unlike the default repositories, which are permanent, you can delete a shared repository that has no active (mounted) virtual machines.

Example of Creating a Shared Repository

The following command creates a shared repository named repo1 in the ASM DATA disk group (data) with 30 gigabytes of available storage:

oakcli create repo repo1 -dg data -size 30

Showing the Status of Shared Repositories

Use the oakcli show repo command to display information about virtual machine repositories on Oracle Database Appliance Virtualized Platforms.

To see all repositories, omit the repository name and node number. To see a specific shared repository, include the repository name and node number.

Example 10-1 Example of Showing the Status of All Shared Repositories

To show the status of all shared repositories, use the oakcli show repo command:

oakcli show repo
      NAME                      TYPE          NODENUM  FREE SPACE     STATE
      ----                      ----          -------  ---------      -----
      odarepo1                  local          0              N/A     N/A
      odarepo2                  local          1              N/A     N/A
      repo1                     shared         0           68.25%     ONLINE
      repo1                     shared         1           68.25%     ONLINE
      repo2                     shared         0              N/A     OFFLINE
      repo2                     shared         1           89.83%     ONLINE

Example 10-2 Example of Showing the Status of a Selected Shared Repository

To display information for a particular node in a shared repository, specify the repository name and node number as part of the command syntax. In the following example, information is displayed for Node 1 in the repo1 shared repository:

oakcli show repo repo1 -node 1

Resource: repo1_1
        AutoStart       :       restore       
        DG              :       DATA          
        Device          :       /dev/asm/repo1-286
        ExpectedState   :       Online        
        FreeSpace       :       87.703125M        
        MountPoint      :       /u01/app/repo1
        Name            :       repo1_0       
        Node            :       all           
        RepoType        :       shared        
        Size            :       30720         
        State           :       Online
        Version         :       2

Starting a Shared Repository

Use the oakcli start repo command to start a virtual machine and assign it to a shared repository on Oracle Database Appliance Virtualized Platforms

Before you can assign a virtual machine to a shared repository, use the oakcli start repo command to start the repository and make the storage available. Note that the oakcli start repo command will also start any virtual machines assigned to the repository that are defined to be automatically started.

You must have a repository already configured. Identify the repository that you start by using the option repo name, where name is the repository name. Identify the name of the node on which the repository is located by using the option -node nodename, where nodename is the name of the node on which the repository is located.

Example 10-3 Example of Starting a Shared Repository

This command starts the shared repository named repo1 on Node 1:

oakcli start repo repo1 -node 1

Stopping a Shared Repository

Use the oakcli stop repo command to command to stop a shared repository on a node on Oracle Database Appliance Virtualized Platforms.

Identify the repository that you want to stop by using the repo reponame option, where reponame identifies the repository that you want to stop. Identify the node on which the repository that you want to stop is running by using the -node number option where number is the node number that you want to stop.

Note:

Do not issue an oakcli stop repo command while virtual machines are still active in the repository for the selected node.

Example 10-4 Example of Stopping a Shared Repository

The following example stops the shared repository named repo1 on Node 0:

oakcli stop repo repo1 -node 0

Deleting a Shared Repository

Use the oakcli delete repo command to delete a shared repository on Oracle Database Appliance Virtualized Platforms.

Identify the repository that you want to delete by using the repo reponame option, where reponame identifies the repository that you want to delete.

Note:

The shared repository that you want to delete must be offline (stopped) on both nodes before you attempt to delete it.

Example 10-5 Example of Deleting a Shared Repository

The following command deletes the shared repository named repo1 on both nodes:

oakcli delete repo repo1

Increasing the Size of a Shared Repository

Use the oakcli configure repo command to increase the size of a shared repository on Oracle Database Appliance Virtualized Platforms.

Identify the repository that you want to expand by using the -repo reponame option, where reponame identifies the repository that you want to expand. Use the option -incsize size to specify the size of the increase that you want to configure, where size is the size (in gigabytes) that you want to add to the configured size.

Example 10-6 Example of Increasing the Size of a Shared Repository

The following command increases the size of the shared repository repo1 by 2 gigabytes:

# oakcli configure repo repo1 -incsize 2G

Configured Shared Repo : repo1 with new size 3712.0.

How to Manage Virtual Disks in Shared Repositories

These topics describe how to use OAKCLI to create, view, clone, attach, and delete virtual disks on Oracle Database Appliance Virtualized Platform.

Creating a Virtual Disk for Use in a Shared Repository

Use the command oakcli create vdisk to create a virtual disk within a shared repository on Oracle Database Appliance Virtualized Platforms.

The command oakcli create vdisk defines the size of the virtual disk, the shared repository in which that disk is created, defines the unique name for that disk within that shared repository, and defines if the disk is used for one virtual machine, or can be shared by multiple virtual machines.

The name of the vdisk you create is defined by the command oakcli create vdisk name, where name is the name of the vdisk you create. Identify the repository in which you create the vdisk by using the -repo reponame option, where reponame identifies the repository where you want to create the vdisk. Use the option -size sizeG to specify the vdisk size (in gigabytes), where sizeG is the size (in gigabytes) that you want to add to the configured size. If you want to configure the vdisk as a shared disk, then use the option -type shared to designate the vdisk as a shared disk.

Example 10-7 Example of Creating a Shared Virtual Disk

This example creates a virtual disk named sdisk1 in the repo2 shared repository that is 1 gigabyte in size, and that virtual machines can share:

oakcli create vdisk sdisk1 -repo repo2 -size 1G -type shared

Viewing Information About Virtual Disks

Use the command oakcli show vdisk to view information about virtual disks on Oracle Database Appliance Virtualized Platforms.

You can use oakcli show vdisk by itself to see information about all of your configured virtual disks. To see information about an individual virtual disk, enter the command oakcli show vdisk diskname -repo reponame, where diskname is the name of the disk that you want to check, and reponame is the name of the shared repository where the virtual disk is located.

Example 10-8 Example of Displaying the Information for All Vdisks

This example displays information about all virtual disks configured on an Oracle Database Appliance:

# oakcli show vdisk

    NAME                         SIZE     TYPE    REPOSITORY
    ----                         ----     ----    ----------
    myvdisk                      10G      local   vdiskrepo
    newv                         1G       local   vdiskrepo

Example 10-9 Example of Displaying Information for a Single Vdisk

This example displays information for the virtual disk named myvdisk1:

# oakcli show vdisk myvdisk1
Resource: myvdisk_vdiskrepo
        Name         :     myvdisk_vdiskrepo
        RepoName     :     vdiskrepo
        Size         :     10G
        Type         :     local
        VmAttached   :     0

Cloning Virtual Disks

Use the oakcli clone vdisk command to create clones of virtual disks on Oracle Database Appliance Virtualized Platforms.

The command oakcli clone vdisk defines the size of the virtual disk, the shared repository in which that disk is created, defines the unique name for that disk within that shared repository, and defines if the disk is used for one virtual machine, or can be shared by multiple virtual machines.

The name of the vdisk you create is defined by the command oakcli clone vdisk name, where name is the name of the vdisk you create. Identify the repository in which you create the vdisk by using the -repo reponame option, where reponame is the name of the repository where the original vdisk is located. Use the option -src sourcevdiskname, where sourcevdiskname is the name of the virtual disk that you are cloning. Add the option -h to display help for this command.

Note:

Once the virtual disk is attached to a virtual machine, the system administrator should perform normal disk addition tasks for the given operating system to make the newly added storage available to the virtual machine.

Syntax

oakcli clone vdisk name -repo reponame -src sourcevdiskname [-h]

Example 10-10 Example of Cloning a Virtual Disk

This example clones a virtual disk named my_vdisk2 from an existing virtual disk named vdisk1 that is stored in the repository named vrepo1:

oakcli clone vdisk my_vdisk2 -repo vrepo1 -src vdisk1

Attaching a Virtual Disk to a Virtual Machine

Use the oakcli modify vm command to attach a virtual disk to a virtual machine on Oracle Database Appliance Virtualized Platforms.

The command oakcli modify vm name enables you to modify a virtual machine, where name is the name of the virtual machine that you want to modify. To attach a disk to a virtual machine, use the option -attachvdisk vdiskname, where vdiskname is the name of the virtual disk that you want to attach to the virtual machine.

Example 10-11 Example of Attaching a Virtual Disk To a Virtual Machine

This example attaches the virtual disk named sdisk1 to the virtual machine named myol6u_test:

oakcli modify vm myo16u_test -attachvdisk sdisk1

Deleting a Virtual Disk

Use the oakcli delete vdisk command to remove a virtual disk from a shared repository on Oracle Database Appliance Virtualized Platforms.

The command oakcli delete vdisk vdiskname removes a virtual disk, where vdiskname is the name of the virtual disk that you want to remove. The option -repo reponame indicates the shared repository on which the virtual disk is located, where reponame is the name of the shared repository.

Example 10-12 Example of Deleting a Virtual Disk from a Shared Repository

This example removes a virtual disk named t2g from the shared repository named repoprod1:

oakcli delete vdisk t2g -repo repoprod1

How to Manage Virtual Machine Templates

These topics describe how to use OAKCLI to import, configure, modify and check virtual machine templates on Oracle Database Appliance Virtualized Platform.

About Managing Virtual Machine Templates

Import and configure virtual machine templates as the source for the virtual machines deployed on Oracle Database Appliance Virtualized Platform.

If you have created shared repositories, then import templates into one of those shared repositories. If you have not created shared repositories, then import templates into the local repository on one of the local nodes.

You can import assemblies that contain one or more templates. When you import a template or assembly into a shared repository, select a node that you want to perform the operation. Select the node carefully to avoid overloading the node. After you create the repository, the repository becomes available to both nodes, regardless of which node performs the import.

Templates imported into local nodes use the repository name supplied in the import command to identify the node that completes the import, and that provides the storage. On Node 0, the local repository is named odarepo1 and on Node 1, the local repository is named odarepo2. If you want to import a template to both local repositories, then you must provide a different template name when you import the template into the second node.

Note:

You cannot create or clone templates directly on Oracle Database Appliance Virtualized Platform, you must use the Oracle VM templates that are available in Oracle Software Delivery.

If you import an assembly that contains more than one template, then the command automatically modifies the template name that you provide, so that all template names remain unique. The first template you import has the number "1" appended to the name. The second template as the number "2" appended, and additional templates have 3, 4, 5 and so on appended in sequence.

After you import a virtual machine template, you can customize the template using OAKCLI commands.

Note:

Find virtual machine templates at the following URL:

http://edelivery.oracle.com/linux.

Listing Virtual Machine Templates

Use the oakcli show vmtemplate command to display virtual machine template details.

The oakcli show vmtemplate command displays the name and repository for each virtual machine template as well as the default number of CPUs and default amount of memory that Oracle Database Appliance Virtualized Platform would assign to a virtual machine created from the template.

Example

Display information about the sample1_odarepo1 virtual template:

oakcli show vmtemplate sample_odarepo1
Resource: sample1_odarepo1
        CPUPriority     :       100           
        Disks           :       |file:/OVS/Repositories/odarepo1/Te
                                mplates/otml_sample1_odarepo1/Syste
                                m.img,xvda,w||file:/OVS/Repositorie
                                s/odarepo1/Templates/otml_sample1_o
                                darepo1/u01.img,xvdb,w|
        Domain          :       XEN_PVM       
        Keyboard        :       en-us         
        MaxMemory       :       2048          
        MaxVcpu         :       2             
        Memory          :       2048          
        Mouse           :       OS_DEFAULT    
        Name            :       sample1_odarepo1
        Networks        :       |bridge=priv1||bridge=net1||bridge=
                                net2|         
        NodeNum         :       0             
        OS              :       OL_5          
        ProcessorCap    :       100           
        RepoName        :       odarepo1      
        Vcpu            :       2 

Importing Virtual Machine Templates

Use the oakcli import vmtemplate command to import virtual machine templates and assemblies on Oracle Database Appliance Virtualized Platforms.

You import virtual machine templates and assemblies contained in an external repository assembly file. Use the name of the shared repository and include a clause to identify the node where you want to import a template or an assembly.

You can import virtual machine templates and assemblies directly from a remote repository using a URL to identify the source of the files. You can choose to use a remote copy command to copy files from the remote repository into your Dom0 /OVS directory, and then import the files using the path and names to identify the downloaded files.

Note:

When importing templates or assemblies to a local repository, do not use the -node option. The target node is implicit in the name of the repository.

Syntax

oakcli import vmtemplate vmtemplatename -files image_files | -assembly assembly_file -repo repo_name [- node 0 | 1 ]

Example 10-13 Example of Importing Virtual Machine Templates from an External Repository Assembly File

Use the oakcli import vmteplate vmtemplatename -assembly assembly_file -repo repo_name command to import virtual machine templates contained in an external template repository assembly file.

This example imports the template in an external template repository assembly file located at the URL 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.ova' to a new template named OL6U1 in a new repository named odarepo1:

oakcli import vmtemplate OL6U1 -assembly 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.ova' -repo odarepo1

Note the single quotation marks that enclose the URL.

Example 10-14 Example of Importing a Virtual Machine Template from Dom0

Use this command syntax to import a virtual machine template from the /OVS file system on Dom0:

oakcli import vmtemplate vmtemplatename -files image_files -repo repo_name

This example imports the virtual machine template named OVM_OL5U7_X86_64_PVM_10GB.tgz from the /OVS directory in Dom0 into the odarepo1 repository. The template is assigned the name OL5U7:

oakcli import vmtemplate OL5U7 -files /OVS/OVM_OL5U7_X86_64_PVM_10GB.tgz -repo odarepo1

Example 10-15 Example of Importing a Virtual Machine Template Using an External Repository URL

Use the command oakcli import vmtemplate vmtemplatename -files image_files -repo repo_name to import a virtual machine template file from an external template repository.

This example imports a virtual machine template named OVM_OL5U7_X86_64_PVM_10GB.tgz from an external template repository at the URL 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.tgz'. Note the single quotation marks that enclose the URL. The template is assigned the name OL5U7, and is imported into the odarpo1 repository:

oakcli import vmtemplate OL5U7 -files 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.tgz'-repo odarepo1

Configuring a Virtual Machine Template

Use the oakcli configure vmtemplate command to configure a virtual machine template on Oracle Database Appliance Virtualized Platform.

The values become the default values for any virtual machine cloned from this template. You can change any or all of them later with the oakcli configure vm command.

Example

Set values for the virtual machine template named myol5u7_10gb:

oakcli configure vmtemplate myol5u7_10gb -vcpu 2 -maxvcpu 4 -cpucap 40
-memory 1536M -maxmemory 2G -os OTHER_LINUX
  • -vcpu 2 sets the number of CPUs to be assigned when the virtual machine starts up to 2.

  • -maxvcpu 4 sets the maximum number of CPUs that can be assigned to the virtual machine to 4.

  • -cpucap 40 sets the maximum percentage of a CPU's capacity that can be assigned to the virtual machine to 40%.

  • -memory 1536M sets the amount of memory to be assigned when the virtual machine starts up to 1536 MB.

  • -maxmemory 2G sets the maximum amount of memory that can be assigned to the virtual machine to 2 GB.

  • -os OTHER_LINUX sets OTHER_LINUX as the operating system used by the virtual machine.

Showing Configured Values for a Virtual Machine Template

Use the oakcli show vmtemplate command to show values for the configurable options in a virtual machine template.

Example

Display information about the sample1_odarepo1 virtual template:

oakcli show vmtemplate sample_odarepo1
Resource: sample1_odarepo1
        CPUPriority     :       100           
        Disks           :       |file:/OVS/Repositories/odarepo1/Te
                                mplates/otml_sample1_odarepo1/Syste
                                m.img,xvda,w||file:/OVS/Repositorie
                                s/odarepo1/Templates/otml_sample1_o
                                darepo1/u01.img,xvdb,w|
        Domain          :       XEN_PVM       
        Keyboard        :       en-us         
        MaxMemory       :       2048          
        MaxVcpu         :       2             
        Memory          :       2048          
        Mouse           :       OS_DEFAULT    
        Name            :       sample1_odarepo1
        Networks        :       |bridge=priv1||bridge=net1||bridge=
                                net2|         
        NodeNum         :       0             
        OS              :       OL_5          
        ProcessorCap    :       100           
        RepoName        :       odarepo1      
        Vcpu            :       2 

Modifying a Virtual Machine Template Configuration

Use the oakcli modify vmtemplate command to modify a virtual machine template.

After you import a virtual machine template to a storage repository, examine the template configuration parameters with the oakcli show vmtemplate command. If you need to reconfigure the template for specific requirements, then use the oakcli configure vmtemplate command. This is useful if you plan to deploy multiple virtual machines with the same characteristics from a single template. If you will be deploying only one virtual machine or many virtual machines but with different characteristics, then set required values in the virtual machines with the oakcli configure vm command after you deploy the template.

When you are satisfied with the configuration of your virtual machine template, use the oakcli modify command to assign a new network to the virtual machine template.

Example

Replace the network assigned to the gc_11g virtual machine template with the net1 network:

oakcli modify vmtemplate gc_11g -addnetwork net1

Removing a Virtual Machine Template

Use the oakcli delete vmtemplate command to remove a virtual machine template.

If you no longer need a template that you previously stored, then you can remove the template from the repository.

Example

Remove the virtual machine template named myol6u_15gb3 from Oracle Database Appliance Virtualized Platform:

oakcli delete vmtemplate my0l6u_15gb3

How to Create Clones and Snap Clones of a Template

Review these topics for an overview of clones and snap clones, and for procedures to use to create clones.

About Creating Clones and Snap Clones of a Template

You can create, or clone, virtual machines from imported templates (or assemblies) or from an existing virtual machine on Oracle Database Appliance Virtualized Platforms.

Clones and snap clones can be an effective way to provision and clone new databases for test and development systems. They are much more efficient to create than using RMAN scripts, or other cloning approaches.

You can create virtual machines that are a complete clone of the template or assembly, or you can create virtual machines that are snap clones. Snap clones contain only the metadata defined for the virtual machine.

Creating snap clones is a very fast operation compared to cloning the entire template or assembly. However, if you update the contents of a snap clone, then review your space requirements. Unless your changes to the snap clone are carried out on shared virtual disks, you require additional storage on your system for the clone to retain both the original content, as well as changed content.

Cloning a Template With OAKCLI

Use the oakcli clone vm command to clone virtual machines that have attached virtual disks on Oracle Database Appliance Virtualized Platforms.

When you clone virtual machines with attached virtual disks, a clone of a virtual machine contains the contents of virtual disks attached locally, but does not contain contents of virtual disks attached in shared mode. If needed, you can clone the virtual disks required by a cloned virtual machine in a separate step.

Use the command oakcli clone vm to create a virtual machine from a virtual machine template. Use the -repo name option to provide the name of the shared repository, where name is the name of the repository. Use the -node number option to identify clause to identify the node on which you want to perform the cloning process, where number is the number of the node.

Note:

The -node option identifies the node where the cloning activity is carried out. The node value does not assign the default startup node for the virtual machine. You can set the startup assignment with the command oakcli configure vm.

Example 10-16 Example of Creating a Virtual Machine Clone from a Virtual Machine Template

This example creates a virtual machine named myol6u_test from the virtual machine template named myol6u_15gb1, which is located in a shared repository named repo2 on Node 0:

oakcli clone vm myol6u_test -vmtemplate myol6u_15gb1 -repo repo2 -node 0

Creating a Snap Clone from a Template With OAKCLI

Use the oakcli clone vm command to create a snap clone of a virtual machine template on Oracle Database Appliance Virtualized Platforms.

Use the -vmtemplate name option to provide the name of the virtual machine template that you want to clone, where name is the name of the template. Use the -snap option to designate that you want to create a snap clone.

Example 10-17 Example of Creating a Snap Clone From a Virtual Machine Template

This example creates a snap clone named myol15u_snap from the virtual machine template named myol5u:

oakcli clone vm myol15u_snap -vmtemplate myol5u -snap

Creating a Snap Clone of an Existing Virtual Machine With OAKCLI

Use the oakcli clone vm command to create a snap clone of an existing virtual machine on Oracle Database Appliance Virtualized Platforms.

Use the -vm name option to provide the name of the virtual machine that you want to clone, where name is the name of the virtual machine. Use the -snap option to designate that you want to create a snap clone.

Example 10-18 Example of Creating a Snap Clone From an Existing Virtual Machine

This example creates a snap clone named myol15u_test1 from a virtual machine named myol15u_test:

oakcli clone vm myol15u_test1 -vm myol15u_test1 -snap

How to Manage Virtual Machines on Oracle Database Appliance Virtualized Platform

Review these topics for an overview of virtual machines, and for procedures to create and manage virtual machines.

About Managing Virtual Machines on Oracle Database Appliance Virtualized Platform

Deploy virtual machines on Oracle Database Appliance Virtualized Platform to run other workloads that are independent of databases running in ODA_BASE

Use OAKCLI commands to create and manage virtual machines, including starting and stopping them, and opening consoles for graphical user interface (GUI) access.

Note:

You can use a Virtual Network Computing (VNC) session to open a GUI console for a virtual machine.

You can reconfigure an active virtual machine. However, your changes do not take effect until you stop and restart the virtual machine. You can display high-level information about all of your virtual machines, or display detailed information about the configuration of single virtual machines. When you no longer have use for a particular virtual machine, delete the virtual machine to regain storage.

Note:

Do not modify the default settings for the following parameters in the guest virtual machine:

  • xen_blkfront.max: Max Indirect Descriptors, default 32

  • xen_blkback.max_ring_page_order: Shared Ring Page Order, default 0

Listing the Virtual Machines in Your Repositories

Use the oakcli show vm command to display details for all of your existing virtual machines or to display details of a specific virtual machine.

The command displays the name, the repository, and the current state (online or offline) for each virtual machine. The output also contains the default number of CPUs and default amount of memory that Oracle Database Appliance Virtualized Platform will assign to each virtual machine.

  • Use the oakcli show vm command to display the virtual machine names, memory and vCPU allocations, status, virtual disks, and repository name for all virtual machines.
    oakcli show vm
    
    NAME                    MEMORY          VCPU         STATE           REPOSITORY
    ----                    ------          ----         -----           ----------
    sample5_odarepo1          2048             2         OFFLINE         odarepo1      
    sample6_odarepo1          2048             2         OFFLINE         odarepo2      
    test1_odarepo1            2048             2         OFFLINE         odarepo1      
    test2_odarepo2            2048             2         OFFLINE         odarepo2      
    vm1_odarepo1              4096             4         ONLINE          odarepo1      
    vm2_odarepo2              2048             2         OFFLINE         odarepo2      
    win_vm1                   1500             1         ONLINE          odarepo1
  • Use the oakcli show vm virtual machine name command to display information about a specific virtual machine.

    For example, use the following command to display details about the vm1_odarepo1 virtual machine:

    oakcli show vm vm1_odarepo1
    Resource: vm1_odarepo1
            AutoStart       :       restore       
            CPUPriority     :       100           
            Disks           :       |file:/OVS/Repositories/odarepo1/Vi
                                    rtualMachines/vm1_odarepo1/System.i
                                    mg,xvda,w||file:/OVS/Repositories/o
                                    darepo1/VirtualMachines/vm1_odarepo
                                    1/u01.img,xvdb,w|
            Domain          :       XEN_PVM       
            ExpectedState   :       online       
            FailOver        :       false
            IsSharedRepo    :       false
            Keyboard        :       en-us         
            MaxMemory       :       3000           
            MaxVcpu         :       4             
            Memory          :       4096          
            Mouse           :       OS_DEFAULT    
            Name            :       vm1_odarepo1  
            Networks        :       |mac=00:21:F6:00:00:E4|         
            NodeNum         :       0             
            NodeNumStart    :       
            OS              :       OL_5          
            PrivateIP       :       None          
            ProcessorCap    :       100           
            RepoName        :       odarepo1      
            State           :       Online        
            TemplateName    :       otml_sample1_odarepo1
            Vcpu            :       4             
            cpupool         :       twocpu        
            vncport         :       5901              

Creating a Virtual Machine

Create a virtual machine by cloning an imported template, cloning an assembly that contains configured virtual machines, or cloning an existing virtual machine.

A virtual machine is a software emulation of a computer system that is granted virtual resources, and can be started, stopped, and restarted independently.

When you clone a template, the template is imported as an archive, unpacked, and stored as a virtual machine configuration file with disk images. The disk images are cloned to create a new instance in the form of a virtual machine.

Instead of creating a complete clone of a template or assembly, you can create a snap clone, which contains only the metadata defined for the virtual machine.

Configuring a Virtual Machine

Use the oakcli configure vm command to configure a virtual machine on Oracle Database Appliance Virtualized Platform.

Include a -prefnode clause, to identify the node where you want the virtual machine to run by default and a -failover clause to indicate if you want the virtual machine to use the other node when the preferred node is not available (either at startup or while already active).

If you reconfigure a virtual machine that is currently running, then your changes do not take effect until you stop and restart the virtual machine.

Table 10-1 Parameters Available for Configuring a Virtual Machine

Parameter Description

-vcpu 2

Sets two (2) as the number of CPUs to be assigned to the virtual machine when started

-cpuprio 150

Sets the CPU access priority to 150

-cpucap 20

Sets the maximum percentage of a CPU's capacity that will be assigned to the virtual machine to 20%

-memory 1G

Sets the amount of memory assigned when the virtual machine starts to 1 GB

-cpupool linpool

Specifies linpool as the CPU pool to be assigned to the virtual machine

-keyboard en-us

Defines the keyboard type used to access the virtual machine as en-us

-mouse USB_MOUSE

Defines the mouse type used to access the virtual machine as a USB mouse

These values will override values assigned to these same parameters in the virtual machine template from which this virtual machine was derived. The virtual machine will use default values for parameters that are not defined in either the parent template or in a configuration command.

Note:

CPU capacity is controlled by the CPU pool assigned to a virtual machine by either the -cpupool parameter or by the default_unpinned_pool (if the virtual machine is not configured with a -cpupool parameter). Values for -vcpu and -maxvcpu parameters that are larger than the number of CPUs in the assigned CPU pool are ignored.

Use the oakcli configure command and parameters to configure the virtual machine:

# oakcli modify vm  vmname parameters

Example 10-19 Example of Configuring a Virtual Machine

Set values for specific resources in the virtual machine named myol15u:

oakcli configure vm myol5u
-vcpu 2 -cpuprio 150 -cpucap 20 -memory 1G 
-cpupool linpool -keyboard en-us -mouse USB_MOUSE

Starting and Stopping a Virtual Machine

Use the oakcli start vm command to start a virtual machine on Oracle Database Appliance Virtualized Platform and use the oakcli stop vm command to stop a virtual machine.

Note:

If you reconfigure a virtual machine that is currently running, then your changes will not be effective until you stop and restart the virtual machine.

Externally Configuring a Virtual Machine

You can initially configure your virtual machines externally without connecting to the virtual machine console by using Oracle VM Guest Additions by passing key-value pairs to the virtual machine.

Use the oakcli modify vm -s command to pass parameters to the virtual machine:

# oakcli modify vm  vmname -s 'key1:value1;key2:value2...'

The following example has two value pairs:

oakcli modify vm vmo16u3 -s 'com.oracle.linux.network.device.0:eth0;com.oracle.linux.network.ipaddr.0:192.1.2.18'

Note:

Opening a Virtual Machine Console for a Virtual Machine

Use the oakcli show vmconsole command to open a virtual machine console window for an active virtual machine

If the console does not display correctly, then close the console, set the DISPLAY environment variable to an appropriate value for your monitor, and then rerun the oakcli show vmconsole command.

You can also configure your virtual machine (using oakcli modify vm command with the -s parameter) to allow access from the OAKCLI command line instead of a graphical user interface (GUI) virtual machine console.

Use the oakcli show vmconsole vm name to open a console for a virtual machine.Open a For example, use the following command to open a console for the virtual machine named vm1_odarepo1:
oakcli show vmconsole vm1_odarepo1

Creating an Image for a New Virtual Machine

Use the oakcli clone vm command to create an image for a new virtual machine on Oracle Database Appliance Virtualized Platform.

By default, the image inherits the content and configuration information from the template or from the virtual machine that you are cloning and resides in the same repository as the source. Unless you are using local repositories for your virtual machines, include the-node clause in the oakcli clone command to identify the node that should run the cloning process. To create a snap clone, which will only contain the configuration metadata, include the -snap clause in the oakcli clone command.

Setting Up a Virtual Machine for Access from eth0 Using an IP Address

Configure a network device (eth0) with an IP address for a virtual machine.

The following set of commands configures the virtual machine vmol6u3 (which has ovmd) with the IP address 192.168.16.51 for the eth0 interface and sets the root password.

oakcli clone vm vmol6u3 -vmtemplate ol6u3 -repo shrepo -node 0
oakcli modify vm vmol6u3 -addnetwork priv1
oakcli start vm vmol6u3
oakcli modify vm vmol6u3 -s 'com.oracle.linux.network.device.0:eth0'
oakcli modify vm vmol6u3 -s 'com.oracle.linux.network.onboot.0:yes'
oakcli modify vm vmol6u3 -s 'com.oracle.linux.network.bootproto.0:static'
oakcli modify vm vmol6u3 -s 'com.oracle.linux.network.ipaddr.0:192.168.16.51'
oakcli modify vm vmol6u3 -s 'com.oracle.linux.network.netmask.0:255.255.255.0'
oakcli modify vm vmol6u3 -s 'com.oracle.linux.root-password:password'

Adding or Removing a Virtual Disk to or from a Virtual Machine

Use the oakcli modify vm command to add or remove a virtual disk (vdisk) from a virtual machine.

Do not use the -attachvdisk or the -detachvdisk option with the -addnetwork, -deletenetwork, or -s key:value pair parameters.

  • To attach a virtual disk to a virtual machine, use the oakcli modify vm vm_name command with the -attachvdisk clause that names the virtual disk.
    oakcli modify vm vm_name -attachvdisk vdisk_name
  • To detach a virtual disk from a virtual machine, use the oakcli modify vm vm_name command with the -detachvdisk clause that names the virtual disk.
    oakcli modify vm vm_name -detachvdisk vdisk_name

Removing a Virtual Machine from a Shared Repository

Use the oakcli delete vm command to delete the virtual machine and reclaim its storage and resources.

When you no longer have use for a particular virtual machine, delete the machine. When deleting the machine, you can specify the Oracle Database Appliance node from which you want to remove the virtual machine. If this optional parameter is not included, then the virtual machine is removed from both nodes.

  • Delete the virtual machine from Node 1.
    For example, run the following command to delete the ovu22 virtual machine from Node 1.
    oakcli delete vm ovu22 -server 1
  • Delete the virtual machine from both nodes.
    For example, run the following command to delete the ovu22 virtual machine from both nodes.
    oakcli delete vm ovu22

Performing a Live Migration for an Oracle Database Appliance Virtual Machine

If your system meets requirements for live migration, then you can use the oakcli migrate vm command to migrate a virtual machine from the currently running node to another node.

Live Migration refers to the process of moving a running virtual machine between physical machines without disconnecting the client or application running in the virtual machine. Memory, storage, and network connectivity of the virtual machine are transferred from the original host machine to the destination.

You must meet the following requirements before performing a live migration:

  • The virtual machine must be on a shared repository and the repository must be online on both nodes.

  • The virtual machine must be running.

  • The destination host must have the required resources (memory, CPUs and so on) for successful migration.

  • The destination host must have a CPU pool with the same name as the CPU pool of the virtual machine that is being migrated.

Use the oakcli migrate vm vmname command to migrate a virtual machine from the currently running node to another node. vmname is the name of the virtual machine to be migrated.

When you run this command, the virtual machine must be online and corresponding, and the shared repository must be online on both nodes. If a virtual machine is in the migration process, then OAKCLI will display the virtual machine state as MIGRATING.

Example 10-20 Example of Migrating a Virtual Machine from the Currently Running Node to Another Node

This example migrates a virtual machine named myvm1

# oakcli migrate vm myvm1 

How to Create Driver Domain Virtual Machines

Use driver domain virtual machines to improve performance.

About Driver Domain Virtual Machines

Use driver domain virtual machines to improve performance by enabling guest virtual machines (VMs) to use ODA_BASE instead of Dom0 to access virtual disks.

A driver domain is a user domain that has special privileges and responsibilities for a particular piece of hardware. When you use the driver domain option, the newly created virtual disks are mounted directly from ODA_BASE to a guest virtual machine. The option improves I/O performance by enabling guest virtual machines to use ODA_BASE instead of Dom0 to access virtual disks.

The driver domain functionality applies to non-system disks. Once a virtual machine is created in driver domain mode, any new vDisks are added in driver domain mode. Newly created virtual disks are mounted directly from ODA_BASE to a guest virtual machine. To determine if a virtual machine is configured in driver domain mode, use the oakcli show vm vmname command. When the virtual machine is in driver mode, the output for the DriverDomain attribute is TRUE.

The virtual disk and vm.cfg files are stored in the following directories:

  • Dom0 /Repositories/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

  • ODA_BASE/app/sharedrepo/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

The driver domain only works when you add virtual disks to a guest virtual machine. When a virtual machine is in driver domain mode, the corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

 When -driverdomain is specified, the cloned virtual machine is configured with the driver domain. The corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

disk = [u'file:/OVS/Repositories/repo5/.ACFS/snaps/vm10/VirtualMachines/

vm10/System.img,xvda,w',

u'file:/u01/app/sharedrepo/repo5/.ACFS/snaps/

vm10/VirtualMachines/vm10/u01.img,xvdb,w,oakDom1']

All disks, with the exception of the xvda boot disk, have the path from oakDom1, that is odabase.

The following guest operating systems are supported for driver domain virtual machines:

  • Oracle Linux with the latest Unbreakable Enterprise Kernel 2 (UEK2) or Unbreakable Enterprise Kernel 3 (UEK3).

  • Microsoft Windows with Oracle VM Windows PV Driver 3.4.2. Oracle VM Windows PV Driver 3.4.2 release is available for download on My Oracle Support as patch number 23346086.

  • Oracle Solaris 11.3 or higher x86.

Creating a Driver Domain Virtual Machine from a Template

Create a driver domain virtual machine from a virtual machine template.

Several options are available to create, or import, a template that you will use to create the clone. Determine the virtual machine template you want, the method to import the template, and the naming convention for the template.

This example imports a virtual machine template from Dom0 and uses the template to create a driver domain virtual machine. The virtual machine image is named myol6u_test myol6u_ ol5u7_vm_alpha from the virtual machine template named myol6u_15gb1 (OL5U7), which is stored in the shared repository named repo2 (odarepo1)on Node 0 in driver domain mode.

  1. Use the oakcli import vmtemplate command to import a virtual machine template and name the template.

    For example, import virtual machine template OVM_OL5U7_X86_64_PVM_10GB.tgz from the /OVS directory in Dom0 into the odarepo1 shared repository on Node 0 in driver domain mode and name the template file OL5U7.

    oakcli import vmtemplate OL5U7 -files /OVS/OVM_OL5U7_X86_64_PVM_10GB.tgz -repo odarepo1
  2. Use the oakcli clone vm command to create a clone that uses the driver domain.

    For example, create a virtual machine image named vm1_ol5u7 from the virtual machine template named OL5U7, which is stored in the shared repository named odarepo1 on Node 0:

    clone virtual machine
    oakcli clone vm vm1_ol5u7 -vmtemplate OL5U7 -repo odarepo1 -node 0 -driverdomain
  3. Run the oakcli show vm command to confirm that the virtual machine is configured in driver domain mode.
    When the virtual machine is in driver mode, the output for the DriverDomain attribute is TRUE.
    oakcli show vm vm1_ol5u7
  4. Use the oakcli start vm command to start the virtual machine.

    For example, start the virtual machine named vm1_ol5u7 on Node 0.

    oakcli start vm vm1_ol5u7 -node 0

Converting a Virtual Machine to a Driver Domain Virtual Machine

Convert a guest virtual machine to a driver domain virtual machine to improve performance.

You can clone an existing virtual machine that uses Dom0 to create a clone virtual machine that uses the driver domain ODA_BASE instead of Dom0.

In this example, virtual machine vm–dom0_ol5u7 is on Dom0 and is not a driver domain virtual machine. The example creates a clone virtual machine named vm–dd1_ol5u7 that uses the driver domain ODA_BASE.

  1. Use the oakcli stop command to shut down the virtual machine.
    For example, stop the virtual machine named vm–dom0_ol5u7. Shutting down the virtual machine ensures that there is consistent data from the virtual machine (vm) and virtual disks (vdisks)
    oakcli stop vm vm2_ol5u7 -force
  2. Detach the virtual disk (vdisk) from  vm–dom0_ol5u7
  3. Use the oakcli clone vm command to clone a new virtual machine from the original.
    Create a new virtual machine named vm–dd1_ol5u7 from the original virtual machine named vm–dom0_ol5u7. Use the -snap option to create a snapshot of the source virtual machine. Because the original virtual machine is not a driver domain machine, use the -force and -driverdomain options to create a clone virtual machine that does use the driver domain.
    oakcli clone vm vm–dd1_ol5u7 -vm vm–dom0_ol5u7 -snap -force -driverdomain
  4. Attach the virtual disk (vdisk) that you detached from the source virtual machine in Step 2 to the new driver domain virtual machine.
    Attaching the vdisk ensures that the vm.cfg has the disk information with the driver domain feature.
  5. Verify that oakDom1is the vdisk  in the new vm.cfg.
  6. Run the oakcli show vm to confirm that the newly created virtual machine is configured in driver domain mode.
    When the virtual machine, vm–dd1_ol5u7, is in driver domain mode, the output for the DriverDomain attribute is TRUE .
    oakcli show vm vm–dd1_ol5u7
  7. Use the oakcli start vm command to start the virtual machine.

    For example, start the virtual machine named vm–dd1_ol5u7 on Node 0.

    oakcli start vm vm–dd1_ol5u7 -node 0

Converting a Root Disk to a Driver Domain Disk

Set up your guest virtual machine (guest VM) root disk as a driver domain and create a new disk as the boot driver.

This example clones an existing guest virtual machine as a driver domain guest VM and then uses the OL6U7_x86_64_PVHVM template to create a guest VM and create a new disk for the boot driver.

Using the driver domain improves the guest VM disk IO performance; however, the driver domain is not applicable for a guest VM virtual disk that is a boot disk. Because the boot disk is generally the root disk, you must create a new disk to be the boot driver.

You can create a guest virtual machine by cloning an existing guest, or use one of the templates, such as OL6U7_x86_64_PVHVM or OVM_OL5U7_X86_64_PVM_10GB.tgz, that are available in the /OVS directory in Dom0.

Using driver domains requires at least Oracle Database Appliance version 12.1.2.7.0.

In this example, the following is the layout of disks in the original OL6U7 virtual machine:

- boot/root disk '/dev/xvda' (echo -e "p" | fdisk /dev/xvda):
Device Boot Start End Blocks Id System
/dev/xvda1 * 2 503 514048 83 Linux
/dev/xvda2 504 11264 11019264 83 Linux
/dev/xvda3 11265 15360 4194304 82 Linux swap / Solaris
- u01 disk '/dev/xvdb' (echo -e "p" | fdisk /dev/xvdb):
Device Boot Start End Blocks Id System
/dev/xvdb1 1 13054 104856223+ 83 Linux

The /etc/fstab is as follows:

# cat /etc/fstab
UUID=b072e1e9-05a9-4544-a4dd-b15ba49cea2f / ext4 defaults 1 1
UUID=301e09e2-78e4-47d6-b501-d4f1098b419d /boot ext4 defaults 1 2
UUID=39e5a125-a1d8-48f4-9e81-f9e89b4dd51b swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=770078eb-c083-4d52-81bf-e026ab3f3fa7 /u01 ext4 defaults 1 2

The df -h is as follows:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 11G 814M 8.9G 9% 
/tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/xvda1 479M 51M 399M 12% /boot
/dev/xvdb1 92G 55G 33G 63% /u01
  1. Clone a guest VM as a driver domain guest VM.
    You can use one of the following commands to clone a virtual machine:
    • oakcli clone vm vm_name -vmtemplate template_name -repo repo_name [-node 0|1] [-driverdomain]
    • oakcli clone vm vm_name -vmtemplate src_vmtempl_name -snap [-driverdomain]
    • oakcli clone vm vm_name -vm src_vm_name -snap [-force] [-driverdomain]

    Note:

    You must stop the virtual machine before taking a snapshot.

    For example, create a driver domain guest VM named OL6U7 from the OL6U7_x86_64_PVHVM source VM template. Use the -snap option to designate that you want to create a snapshot of the source virtual machine and the –driverdomain option to indicate that the new virtual machine will use the driver domain.

    oakcli clone vm OL6U7 -vm OL6U7_x86_64_PVHVM -snap -driverdomain
  2. Create a new boot virtual disk.
    dd if=/dev/zero of=/u01/app/sharedrepo/repo name/.ACFS/snaps/vm_name/VirtualMachines/vm_name/virtual diskfile name.img oflag=direct count=0 bs=1M seek=new size in MB

    For example, create a 500 MB boot virtual disk named newboot for the OL6U7 virtual machine that is in the odarepo1 repository:

    # dd if=/dev/zero of=/u01/app/sharedrepo/odarepo1/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img oflag=direct count=0 bs=1M seek=500
  3. Edit the vm.cfg file to attach the new boot disk to your guest VM.
    1. Navigate to the vm.cfg file.
      /u01/app/sharedrepo/vm repo/.ACFS/snaps/vm name/VirtualMachines/vm name/vm.cfg

      For example, the OL6U7 virtual machine is in the odarepo1 repository:

      /u01/app/sharedrepo/odarepo1/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/vm.cfg
    2. Add the new disk entry on the disk parameter.
      disk = ['file:virtual disk file path,virtual device,r/w option']

      For example, add the newboot virtual disk for the OL6U7 virtual machine, which is in the odarepo1 repository.

      disk =
      [u'file:/OVS/Repositories/odarepo1/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/15f96d92a66c4b808035116ab6348d0d.img,xvda,w',
      u'file:/u01/app/sharedrepo/odarepo1/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdb,w,oakDom1',
      u'file:/u01/app/sharedrepo/odarepo1/.ACFS/snaps/oakvdk_ol6u7_bootdsk/VirtualDisks/oakvdk_ol6u7_bootdsk,xvdc,w,oakDom1']
      (...)
      

      The following example shows the newboot virtual disk:

      disk =
      [u'file:/OVS/Repositories/odarepo1/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/15f96d92a66c4b808035116ab6348d0d.img,xvda,w',
      u'file:/u01/app/sharedrepo/odarepo1/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdb,w,oakDom1',
      u'file:/OVS/Repositories/odarepo1/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img,xvdc,w']
      (...)
  4. Stop and restart your guest VM.
    oakcli stop vm vm_name
    oakcli start vm vm_name

    For example, stop and restart the OL6U7 guest.

    oakcli stop vm OL6U7oakcli start vm OL6U7

    The new disks are available to the guest VM after the restart.

  5. Create a disk partition on the new boot driver.

    A new empty virtual disk appears as an /dev/xvdc device.

    # dmesg |grep xvdc
    blkfront: xvdc: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled;
    xvdc: unknown partition table

    Use the fdisk command to partition the disk and make the partition bootable.

    echo -e "n\np\n1\n\n\nt\n83\na\n1\nw" | fdisk /dev/xvdc
    Device     Boot Start End Blocks Id System
    /dev/xvdc1 *         1  63  506016 83 Linux
  6. Format the new boot disk partition /dev/xvdc1.
    mkfs.ext4 /dev/xvdc1
  7. Setup and mount the new boot disk partition and get the single blockID.
    mkdir /virtual diskfile namemount /dev/xvdc1 /virtual diskfile name
    1. Setup and mount the new boot disk.
      mkdir /virtual diskfile namemount /dev/xvdc1 /virtual diskfile name

      For example, make a directory and mount the newboot boot disk:

      mkdir /newbootmount /dev/xvdc1 /newboot
    2. Get the single blockID.
      # blkid /dev/xvdc1/dev/xvdc1: UUID="3d7a177b-0fa0-4212-9c0c-c5554bb1817a" TYPE="ext4"
  8. Copy the original boot content to the new boot disk.
    cp -dpR /boot/* /virtual diskfile name

    For example, for the disk named newboot:

    cp -dpR /boot/* /newboot
  9. Make the new boot partition the active boot partition
    umount /virtual diskfile nameumount /bootmount /dev/xvdc1 /boot
    umount /newbootumount /bootmount /dev/xvdc1 /boot
  10. Setup Grub in the new boot disk.
    Use the grub or grub2 command, where /dev/xvdc is the new boot disk device.
    • If you are using Oracle Linux 6U7, use grub:
      # grub
      grub> device (hd0) /dev/xvdc
      grub> root (hd0,0)
      grub> setup (hd0)
      
    • If you are using Oracle Linux 7u2, use grub2:
      # grub2-mkconfig -o /boot/grub2/grub.cfg 
      # grub2-install /dev/xvdc

    The following example uses grub:

    # grub
    Probing devices to guess BIOS drives. This may take a long time.
    GNU GRUB version 0.97 (640K lower / 3072K upper memory)
    [ Minimal BASH-like line editing is supported. For the first word, TAB
    lists possible command completions. Anywhere else TAB lists the possible
    completions of a device/filename.]
    grub> device (hd0) /dev/xvdc
    device (hd0) /dev/xvdc
    grub> root (hd0,0)
    root (hd0,0)
    Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    setup (hd0)
    Checking if "/boot/grub/stage1" exists... no
    Checking if "/grub/stage1" exists... yes
    Checking if "/grub/stage2" exists... yes
    Checking if "/grub/e2fs_stage1_5" exists... yes
    Running "embed /grub/e2fs_stage1_5 (hd0)"... 27 sectors are embedded.
    succeeded
    Running "install /grub/stage1 (hd0) (hd0)1+27 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
    Done.
    grub> quit
    quit

    The following example uses grub2:

    # grub2-mkconfig -o /boot/grub2/grub.cfg 
    Generating grub configuration file ... 
    Found linux image: /boot/vmlinuz-3.10.0-327.3.1.el7.x86_64 
    Found initrd image: /boot/initramfs-3.10.0-327.3.1.el7.x86_64.img 
    Found linux image: /boot/vmlinuz-3.8.13-118.2.1.el7uek.x86_64 
    Found initrd image: /boot/initramfs-3.8.13-118.2.1.el7uek.x86_64.img 
    Found linux image: /boot/vmlinuz-0-rescue-8f9df86c6d4c4640a01315a3aa93790e 
    Found initrd image: /boot/initramfs-0-rescue-8f9df86c6d4c4640a01315a3aa93790e.img 
    done
    
    # grub2-install /dev/xvdc 
    Installing for i386-pc platform. 
    Installation finished. 
    No error reported.
  11. Edit /etc/fstab with the new boot device.
    UUID=b072e1e9-05a9-4544-a4dd-b15ba49cea2f / ext4 defaults 1 1
    #UUID=301e09e2-78e4-47d6-b501-d4f1098b419d /boot ext4 defaults 1 2 <<--- Original boot device
    UUID=3d7a177b-0fa0-4212-9c0c-c5554bb1817a /boot ext4 defaults 1 2
    
    UUID=39e5a125-a1d8-48f4-9e81-f9e89b4dd51b swap swap defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    
    UUID=770078eb-c083-4d52-81bf-e026ab3f3fa7 /u01 ext4 defaults 1 2
  12. Edit the vm.cfg file and make the new boot virtual disk the first disk on the list.

    Note:

    The driver domain device use the following root path /u01/app/sharedrepo. The boot disk root path is /OVS/Repositories.

    The entries in the disk section of the vm.cfg file will look something like the following:

    u'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/15f96d92a66c4b808035116ab6348d0d.img,xvda,w',
    <<-- original boot/root disk
    u'file:/u01/app/sharedrepo/rcrepo/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdb,w,oakDom1',
    <<-- original u01 disku'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img,xvdc,w'
    <<-- new boot disk

    Move the new boot virtual disk, newboot, to the first disk on the list.

    u'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img,xvda,w'
    <<-- new boot disk
    u'file:/u01/app/sharedrepo/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/15f96d92a66c4b808035116ab6348d0d.img,xvdb,w,oakDom1
    <<-- original boot/root disku'file:/u01/app/sharedrepo/rcrepo/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdc,w,oakDom1'
    <<-original u01 disk

    The new boot device (xvdc) becomes the first device (not driver domain) and xvda is the second domain driver device.

    The following is an example of the vm.cfg before the edit:

    # cat vm.cfg
    vif = ['type=netfront,bridge=net1']
    name = 'OL6U7'
    extra = 'NODENAME=OL6U7'
    builder = 'hvm'
    cpus =
    '24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,6
    vcpus = 2
    memory = 8192
    cpu_cap = 0
    vnc = 1
    serial = 'pty'
    disk =
    [u'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/15f96d92a66c4b808035116ab6348d0d.img,xvda,w',
    u'file:/u01/app/sharedrepo/rcrepo/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdb,w,oakDom1',
    u'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img,xvdc,w']
    maxvcpus = 2
    maxmem = 8192

    The following is an example of the vm.cfg after the edit, where the new boot device (xvdc) is the first device and xvda is the driver domain device:

    # cat vm.cfg
    vif = ['type=netfront,bridge=net1']
    name = 'OL6U7'
    extra = 'NODENAME=OL6U7'
    builder = 'hvm'
    cpus =
    '24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,6
    vcpus = 2
    memory = 8192
    cpu_cap = 0
    vnc = 1
    serial = 'pty'
    disk =[
    [u'file:/OVS/Repositories/rcrepo/.ACFS/snaps/OL6U7/VirtualMachines/OL6U7/newboot.img,xvda,w',
    u'file:/u01/app/sharedrepo/u'file:/u01/app/sharedrepo/rcrepo/.ACFS/snaps/oakvdk_ol6u7_u01/VirtualDisks/oakvdk_ol6u7_u01,xvdc,w,oakDom1']
    maxvcpus = 2
    maxmem = 8192
  13. Stop and restart the guest VM
    oakcli stop vm vm_name
    oakcli start vm vm_name
    oakcli stop vm OL6U7
    oakcli start vm OL6U7
  14. Check the layout of the new disks.
    The layout should be similar to the following:
    # df -h
    Filesystem Size Used Avail Use% Mounted on/dev/xvdb2 11G 814M 8.9G 9% /
    tmpfs 3.9G 0 3.9G 0% /dev/shm
    /dev/xvda1 471M 51M 391M 12% /boot
    /dev/xvdc1 92G 55G 33G 63% /u01

    The swap device is now under the driver domain: /dev/xvdb

    # swapon -s
    Filename    Type      Size    Used Priority
    /dev/xvdb3  partition 4194300 0    -1
  15. (Optional) Synchronize the oakcli virtual machine inventory with the vm.cfg file.

    When you edit the vm.cfg file, the oakcli show vm vm name output displays incorrect information about the disk. You can create a temporary duplicate (snapshot) of the virtual machine to fix the output.

    oakcli stop vm vm_name
    oakcli clone vm tmp_vm_name -vm vm_name -snap -driverdomain
    oakcli delete vm vm_name
    oakcli clone vm vm_name -vm tmp_vm_name -snap -driverdomain
    oakcli delete vm tmp_vm_name

    Note:

    Stop the virtual machine before taking a snapshot.

    For example, create a temporary clone called tmp_OL6U7 of the virtual machine OL6U7 using the -snap and -driverdomain options. Delete the virtual machine OL6U7, and then use the temporary clone to create a new clone. Delete the temporary virtual machine.

    oakcli stop vm OL6U7
    oakcli clone vm tmp_OL6U7 -vm OL6U7 -snap -driverdomain
    oakcli delete vm OL6U7
    oakcli clone vm OL6U7 -vm tmp_OL6U7 -snap -driverdomain
    oakcli delete vm tmp_OL6U7
    

    Note:

    The oakcli clone vm command creates a duplicate (snapshot) of the VDisks that are attached to the guest VM. Use the oakcli delete vdisk command to remove the orphan VDisks.

    Run the oakcli show vm vm_name command to verify that the oakcli virtual machine inventory is in sync with the vm.cfg file.

    # oakcli show vm OL6U7
    The Resource is : OL6U7
    AutoStart : restore
    CPUPriority : 100
    Disks : |file:/OVS/Repositories/rcrepo/.ACF
    S/snaps/OL6U7/VirtualMachines/OL6U7
    /newboot.img,xvda,w||file:/u01/app/
    sharedrepo/rcrepo/.ACFS/snaps/OL6U7
    /VirtualMachines/OL6U7/15f96d92a66c
    4b808035116ab6348d0d.img,xvdb,w,oak
    Dom1|
    Domain : XEN_PVM
    DriverDomain : True
    ExpectedState : offline
    FailOver : false
    IsSharedRepo : true
    Keyboard : en-us
    MaxMemory : 8192M
    MaxVcpu : 2
    Memory : 8192M
    Mouse : OS_DEFAULT
    Name : OL6U7
    Networks : |type=netfront,bridge=net1|
    NodeNumStart : 0
    OS : OL_5
    PrefNodeNum : 0
    PrivateIP : None
    ProcessorCap : 0
    RepoName : rcrepo
    State : Offline
    TemplateName : tmp_OL6U7
    VDisks : |oakvdk_snap_3_ol6u7_u01_rcrepo|
    Vcpu : 2
    cpupool : default-unpinned-pool

How to Manage High Availability on Oracle Database Appliance Virtualized Platform

Use the oakcli configure vm command to configure high availability services for your virtual machines.

A system that is highly available is designed to provide uninterrupted computing services during essential time periods, during most hours of the day, and during most days of the week throughout the year. Reliability, recoverability, timely error detection, and continuous operations are primary characteristics of a highly available solution. Two essential parts of high availability are automatic restart and failover.

Unless you are using local repositories, you can set high availability options for your virtual machines. High availability options identify the node where the virtual machine should be started by default and whether the virtual machine should be failed over to the other node. Failover can occur if the node where the virtual machine is already running fails or if the preferred node is not available when the virtual machines attempt to start.

Configuring Automatic Restart for High Availability

A virtual machine automatically restarts after a hardware or software failure or whenever your database host computer restarts. Use the oakcli configure vm command to start a virtual machine on a preferred node by using the-prefnode option.

Configuring Failover for High Availability

Configuring failover provides high availability by enabling a virtual machine to restart on the other node after an unplanned failure, without requiring manual intervention. Use the command oakcli configure vm with the -failover option to configure fail over from one node to another.

How to Manage CPU Pools on Oracle Database Appliance Virtualized Platform

These topics describe how to use OAKCLI to create and manage CPU pools on Oracle Database Appliance Virtualized Platform.

About Managing CPU Pools for Resource Allocation

Use CPU pools to cage and manage resource allocations to workloads for virtual machines on Oracle Database Appliance Virtualized Platforms.

Workloads are isolated by creating CPU pools and assigning (pinning) virtual machines to a specific CPU pool. When you pin a virtual machine to a CPU pool, you ensure that the virtual machine uses CPUs in only that CPU pool.

When you initially configure Oracle Database Appliance Virtualized Platform, a default-unpinned-pool is created on each node. The size of this pool depends on the hardware model.

When you create the ODA_BASE domain, a new CPU pool is created on both nodes. The pool is named odaBaseCpuPool. The CPUs required for this pool are removed from the default-unpinned-pool. ODA_BASE is the only domain allowed to use the CPUs in the odaBaseCpuPool. When you start other virtual machines, the virtual machines run on CPUs that are left in the default-unpinned-pool, effectively removing ODA_BASE from the work being done by other virtual machines.

You can also cage groups of virtual machines by creating additional CPU pools. These additional pools enable you to pin a virtual machine, or a set of virtual machines, to its own CPU pool. Virtual machines running in a specific CPU pool do not share CPU cycles with virtual machines running in other CPU pools. Define as many CPU pools as you want, up to the number of available CPUs on your system.

If your application requirements change over time, then Oracle recommends that you resize, add, or drop CPU pools as needed to make the best use of your resources. You may also want to resize ODA_BASE. However, if you want to resize ODA_BASE, then you must use a special command that also updates your Oracle Database Appliance Virtualized Platform license.

Example 10-21 Example of Showing CPU Pools on a Node

A CPU pool can have a different size on each node (except for the odaBaseCpuPool), as shown by the following oakcli show cpupool commands, one for each node:

oakcli show cpupool -node 0
                 Pool                         Cpu List
default-unpinned-pool   [14, 15, 16, 17, 18, 19, 20, 2
                                            1, 22, 23]
               twocpu                         [12, 13]
       odaBaseCpuPool   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
                                               10, 11]

oakcli show cpupool -node 1
                 Pool                         Cpu List
default-unpinned-pool   [12, 13, 14, 15, 16, 17, 18, 1
                                    9, 20, 21, 22, 23]
       odaBaseCpuPool   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
                                                10,11]

About Over-Subscribed CPU Pools

Configure virtual machines so that they do not subscribe to more CPU resources than the resources available in CPU pools.

A CPU resource can belong to one, and only one, CPU pool. You can assign multiple virtual machines to a CPU pool. A CPU pool becomes oversubscribed when the virtual machines that are active in the pool require more CPUs than you configured for the pool. For example, if a CPU pool has four CPUs, then you can start two virtual machines that are defined to use four CPUs each. In this case, the CPU pool is oversubscribed, because each of the four CPUs is supporting two virtual machines.

If you stop one of those virtual machines, but start another one that requires two CPUs, then the CPU pool is still oversubscribed. This is because two of the CPUs are supporting both virtual machines. When oversubscribing a CPU pool, assess the performance of the virtual machines in that pool. Reassign one or more virtual machines to a different CPU pool if sharing an oversubscribed pool degrades performance to unacceptable levels.

Creating a New CPU Pool on Oracle Database Appliance Virtualized Platform Nodes

Use the command oakcli create cpupool to create a CPU pool.

Manage resource use by creating CPU pools, and then assign these resources to virtual machines.

Example 10-22 Example of Creating a New CPU Pool on Oracle Database Appliance Virtualized Platform Nodes

This example creates a CPU pool named winpool that is allocated 4 CPUs on Node 0:

oakcli create cpupool winpool -numcpu 4 -node 0

Showing the CPU Pools Configured on Oracle Database Appliance Virtualized Platform Nodes

Use the command oakcli show cpupool command to display the CPUs assigned to each defined CPU pool.

You can use oakcli show cpupool to display any virtual machines assigned to each CPU pool.

Example 10-23 Example of Showing CPUs Assigned to Defined CPU Pools on Oracle Database Appliance Virtualized Platform Nodes

This oakcli show cpupool example shows the CPUs assigned to each defined CPU pool on Node 0:

oakcli show cpupool -node 0

Changing the Number of CPUs Assigned to a CPU Pool on Oracle Database Appliance Virtualized Platform Nodes

Use the oakcli configure cpupool command to change the number of CPUs assigned to a CPU pool.

An Oracle VM Server can belong to only one virtual pool. However, you can change the resources allocated to a virtual pool to increase the CPU resources available to the virtual machine.

Example 10-24 Example of Changing the Number of CPUs Assigned to a CPU Pool on Oracle Database Appliance Virtualized Platform Nodes

This oakcli configure cpupool example changes the number of CPUs assigned to the CPU pool named linpool on Node 1. After the command runs, the new number of CPU resources assigned to the CPU are six.

oakcli configure cpupool linpool -numcpu 6 -node 1

Assigning a Virtual Machine to a CPU Pool on Oracle Database Appliance Virtualized Platform

Use the command oakcli configure vm to assign a virtual machine to a CPU pool.

Review the availability of CPU pools on nodes as part of your placement policy for virtual machines on Oracle Database Appliance Virtualized Platforms.

If your virtual machine is assigned to a specific CPU pool, and the virtual machine is allowed to fail over, then the virtual machine attempts to use the same CPU pool on the secondary node. If the CPU pool exists on the other node, but the CPU pool is a different size, then the performance of your virtual machine can be affected when it runs on the secondary node. If the assigned CPU pool does not exist on the secondary node, then the virtual machine cannot fail over.

Note:

Do not manage odaBaseCpuPool by using oakcli cpupool commands. Instead, use commands that configure ODA_BASE, as discussed in "How to Resize ODA_BASE."

Example 10-25 Example of Assigning a Virtual Machine to a CPU Pool on Oracle Database Appliance Virtualized Platform

This oakcli configure vm example pins the virtual machine named wintest to the CPU pool named winpool:

oakcli configure vm wintest -cpupool winpool