How to add Oracle VM Server to existing Server Pool – Part 14


Step 1: Login to Oracle VM Manager as admin

[root@mgmtsrv ~]# ssh -l admin ovm.lab.local -p 10000
admin@ovm.lab.local's password:
OVM>

Step 2: Discover the new Oracle VM Server

OVM> discoverServer ipaddress=ovs02.lab.local password=********** takeOwnership=Yes
Command: discoverServer ipaddress=ovs02.lab.local password=**** takeOwnership=Yes
Status: Success
Time: 2017-12-30 06:10:06,997 EST
JobId: 1514632190427

Step 3: Attach existing FileServer to new Oracle VM Server

OVM> list FileServer
Command: list FileServer
Status: Success
Time: 2017-12-30 06:10:39,887 EST
Data:
id:0004fb0000090000371a9d6db792e728 name:MYSANRec
id:0004fb000009000030d16d353855168b name:Local FS ovs01.lab.local
id:0004fb000009000031ef15ebfd64864b name:Local FS ovs02.lab.local

OVM> addAdminServer FileServer name=MYSANRec server=ovs02.lab.local
Command: addAdminServer FileServer name=MYSANRec server=ovs02.lab.local
Status: Success
Time: 2017-12-30 06:11:24,290 EST
JobId: 1514632283791

OVM> addRefreshServer FileServer name=MYSANRec server=ovs02.lab.local
Command: addRefreshServer FileServer name=MYSANRec server=ovs02.lab.local
Status: Success
Time: 2017-12-30 06:11:54,250 EST
JobId: 1514632314003

OVM> refresh FileServer name=MYSANRec
Command: refresh FileServer name=MYSANRec
Status: Success
Time: 2017-12-30 06:12:10,568 EST
JobId: 1514632328802

Step 4: Attach new Oracle VM server to existing VLAN interface

OVM> list Network
Command: list Network
Status: Success
Time: 2017-12-30 06:13:18,171 EST
Data:
id:0a0a0a00 name:10.10.10.0
id:10aafb998c name:VMNet

OVM> list Server
Command: list Server
Status: Success
Time: 2017-12-30 06:13:51,135 EST
Data:
id:56:4d:88:59:8d:10:18:09:9d:1a:5d:a3:f2:8d:f7:97 name:ovs01.lab.local
id:56:4d:d5:a4:e0:32:e8:f9:98:85:b6:db:16:56:aa:cc name:ovs02.lab.local

OVM> show Server name=ovs02.lab.local
Command: show Server name=ovs02.lab.local
Status: Success
Time: 2017-12-30 06:14:02,226 EST
Data:
Status = Running
........
Ethernet Port 1 = 0004fb00002000009484d6243391378c [eth0 on ovs02.lab.local]
Ethernet Port 2 = 0004fb0000200000baf56305d148910c [eth1 on ovs02.lab.local]
........

OVM> add Port id=0004fb0000200000baf56305d148910c to Network name=VMNet
Command: add Port id=0004fb0000200000baf56305d148910c to Network name=VMNet
Status: Success
Time: 2017-12-30 06:15:09,567 EST
JobId: 1514632505563

Step 5: Add new Oracle VM Server to existing Server Pool

OVM> list FileSystem
Command: list FileSystem
Status: Success
Time: 2017-12-30 06:20:28,899 EST
Data:
id:0004fb0000050000778bab4e27014113 name:Server Pool File System
id:9f4e1109-2c5b-4bae-834b-0ccc203e5ab6 name:nfs on mgmtsrv.lab.local:/repo2
id:f3834a16-6fcb-4f82-9a2a-b3d3ed936ae3 name:nfs on mgmtsrv.lab.local:/repo1

OVM> list ServerPool
Command: list ServerPool
Status: Success
Time: 2017-12-30 06:21:14,991 EST
Data:
id:0004fb00000200002d1d67487c79ed89 name:Pool_01

OVM> add Server name=ovs02.lab.local to ServerPool name=Pool_01
Command: add Server name=ovs02.lab.local to ServerPool name=Pool_01
Status: Success
Time: 2017-12-30 06:21:36,694 EST
JobId: 1514632896237

OVM> show ServerPool name=Pool_01
Command: show ServerPool name=Pool_01
Status: Success
Time: 2017-12-30 06:21:49,006 EST
Data:
Server 1 = 56:4d:88:59:8d:10:18:09:9d:1a:5d:a3:f2:8d:f7:97 [ovs01.lab.local]
Server 2 = 56:4d:d5:a4:e0:32:e8:f9:98:85:b6:db:16:56:aa:cc [ovs02.lab.local]

Cluster Enabled = Yes
Timeout for Cluster(seconds) = 120
Keymap Name = en-us
Virtual IP = 10.10.10.200
Vm Migrate SSL = No
Server Count = 2
Master Server = 56:4d:88:59:8d:10:18:09:9d:1a:5d:a3:f2:8d:f7:97 [ovs01.lab.local]
File System Type = Unknown
Vm 1 = 0004fb0000060000524f9d3e43fd71f3 [FirstVM]
StartPolicy = Current Server
Policy Mode = Off
Policy CPU Enabled = No
Policy Period (minutes) = 10
Policy CPU Threshold = 75
Id = 0004fb00000200002d1d67487c79ed89 [Pool_01]
Name = Pool_01
Description = First Oracle Server Cluster
Locked = false

Step 5: Attach the new OVS server to exisiting storage repository

OVM> list Repository
Command: list Repository
Status: Success
Time: 2017-12-30 06:24:22,864 EST
Data:
id:0004fb000003000082b0d717e2f9871d name:OraRepo

OVM> add Server name=ovs02.lab.local to Repository name=OraRepo
Command: add Server name=ovs02.lab.local to Repository name=OraRepo
Status: Success
Time: 2017-12-30 06:26:48,646 EST
JobId: 1514633207814

OVM> refresh Repository name=OraRepo
Command: refresh Repository name=OraRepo
Status: Success
Time: 2017-12-30 06:26:54,170 EST
JobId: 1514633213719

OVM> show Repository name=OraRepo
Command: show Repository name=OraRepo
Status: Success
Time: 2017-12-30 06:26:57,710 EST
Data:
File System = 9f4e1109-2c5b-4bae-834b-0ccc203e5ab6 [nfs on mgmtsrv.lab.local:/repo2]
Manager UUID = 0004fb00000100009157557324ed168d
File System Free (GiB) = 19.25
File System Total (GiB) = 24.48
File System Used (GiB) = 5.23
Used % = 21.0
Refreshed = Yes
Presented = Yes
Presented Server 1 = 56:4d:88:59:8d:10:18:09:9d:1a:5d:a3:f2:8d:f7:97 [ovs01.lab.local]
Presented Server 2 = 56:4d:d5:a4:e0:32:e8:f9:98:85:b6:db:16:56:aa:cc [ovs02.lab.local]
VirtualDisk 1 = 0004fb0000120000590b281ac02ac9b2.img [0004fb0000120000590b281ac02ac9b2.img]
VirtualCdrom 1 = 0004fb0000150000006463c3fe40be43.iso [0004fb0000150000006463c3fe40be43.iso]
Vm 1 = 0004fb0000060000524f9d3e43fd71f3 [FirstVM]
Id = 0004fb000003000082b0d717e2f9871d [OraRepo]
Name = OraRepo
Locked = false

Oracle VM Set CPU Pinning/Affinity – Part 13


Step 1: Login to Oracle VM server as root

[root@mgmtsrv ~]# ssh ovm.lab.local
root@ovm.lab.local's password:
Last login: Sun Dec 17 05:34:13 2017 from 10.10.10.1
[root@ovm ~]#

Step 2: Enable TCPS [Secure way to connect and perform the tasks]

[root@ovm ~]# cd /u01/app/oracle/ovm-manager-3/bin/
[root@ovm bin]# ./secureOvmmTcpGenKeyStore.sh
Generate OVMM TCP over SSL key store by following steps:
Enter keystore password: ## Enter the password ##
Re-enter new password: ## Re-enter the password ##
What is your first and last name?
[Unknown]: Ora Admin
What is the name of your organizational unit?
[Unknown]: LAB
What is the name of your organization?
[Unknown]: TEST
What is the name of your City or Locality?
[Unknown]: Chennai
What is the name of your State or Province?
[Unknown]: Tamil Nadu
What is the two-letter country code for this unit?
[Unknown]: IN
Is CN=Ora Admin, OU=LAB, O=TEST, L=Chennai, ST=Tamil Nadu, C=IN correct?
[no]: yes


Enter key password for
(RETURN if same as keystore password): ## Enter above given password ##
Re-enter new password: ## Re-enter above given password ##

[root@ovm bin]# ./secureOvmmTcp.sh
Enabling OVMM TCP over SSL service

Please enter the Oracle VM manager user name: admin

Please enter the Oracle VM manager user password: ## Enter Oracle VM Manager admin password ##

Please enter the password for TCPS key store : ## Enter above created key store password ##

The job of enabling OVMM TCPS service is committed, please restart OVMM to take effect.

Restart the OVMM daemon

[root@ovm bin]# /etc/init.d/ovmm restart
Stopping Oracle VM Manager [ OK ]
Starting Oracle VM Manager [ OK ]

Below netstat output show that TCPS port is listening in Oracle VM Manager.

[root@ovm ~]# netstat -antulp | grep 54322
tcp 0 0 :::54322 :::* LISTEN 9042/java

Step 3: Install the Oralce VM Utils

[root@ovm ~]# mkdir OVMM

Download the below zip file from Oracle Support site.

[root@ovm ~]# unzip -d OVMM p13602094_30_Linux-x86-64.zip
Archive: p13602094_30_Linux-x86-64.zip
inflating: OVMM/README.html
extracting: OVMM/ovm_util_3.4.99.10182.zip

[root@ovm ~]# cd OVMM/
[root@ovm OVMM]# ls
ovm_util_3.4.99.10182.zip README.html
[root@ovm OVMM]# unzip ovm_util_3.4.99.10182.zip
Archive: ovm_util_3.4.99.10182.zip
creating: ovm_util/
extracting: ovm_util/ovm-utils_2.1.zip
extracting: ovm_util/ovm_utils_2.0.1.zip
extracting: ovm_util/ovm-utils_1.0.2.zip
inflating: ovm_util/readme-2.0.1
inflating: ovm_util/readme-2.1.0
inflating: ovm_util/readme-1.0.2
[root@ovm OVMM]# cd ovm_util
[root@ovm ovm_util]# ls
ovm-utils_1.0.2.zip ovm-utils_2.1.zip readme-2.0.1
ovm_utils_2.0.1.zip readme-1.0.2 readme-2.1.0

Please use the readme file for the Oracle VM Manager version supported files. Here I’m using 3.3.3, so ovm_utils_2.0.1.zip file need to be used.

[root@ovm ovm_util]# less readme-2.0.1

[root@ovm ovm_util]# unzip -d /u01/app/oracle/ovm-manager-3 ovm_utils_2.0.1.zip Archive: ovm_utils_2.0.1.zip
creating: /u01/app/oracle/ovm-manager-3/ovm_utils/
creating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/
creating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/ovm_vmcontrol.8
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/ovm_vmhostd.8
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/ovm_vmdisks.8
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/ovm_reporestore.8
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/man/man8/ovm_vmmessage.8
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/ovm_vmdisks
creating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmMessage.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmRepoRestore.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmHostd.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmMessage$1.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmHostd$1.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmControl.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmHostd$InsecureTrustManager.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmDisks.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/class/OvmVmMessage$InsecureTrustManager.class
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/ovm_vmcontrol
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/ovm_vmhostd
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/vm-dump-metrics
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/ovm_reporestore
creating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/jython.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/log4j.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/OvmClient.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/OvmWsClient.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/ovm_shell.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/commons-logging-1.1.3.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/jline.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/lib/commons-logging.jar
inflating: /u01/app/oracle/ovm-manager-3/ovm_utils/ovm_vmmessage

[root@ovm ovm_util]# cd /u01/app/oracle/ovm-manager-3/ovm_utils


[root@ovm ovm_utils]# ls
class man ovm_vmcontrol ovm_vmhostd vm-dump-metrics
lib ovm_reporestore ovm_vmdisks ovm_vmmessage

Step 4: Verify the Oracle VM Server CPU topology and cpu list

Below command explains that Oracle VM Server has 2 Processors and 2 Cores per Processor, which means total 4 vcpu’s.

[root@ovs01 ~]# xenpm get-cpu-topology
CPU core socket node
CPU0 0 0 0
CPU1 1 0 0
CPU2 0 1 0
CPU3 1 1 0

Next I want to check which VM’s are using which CPUs. I have only one VM (0004fb0000060000524f9d3e43fd71f3) names as FirstVM which uses 2 vcpu threads. See CPU column (2,3).

[root@ovs01 ~]# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb0000060000524f9d3e43fd71f3 2 0 2 -b- 390.9 any cpu
0004fb0000060000524f9d3e43fd71f3 2 1 3 -b- 29.2 any cpu
Domain-0 0 0 1 -b- 237.7 any cpu
Domain-0 0 1 0 r-- 278.1 any cpu
Domain-0 0 2 3 -b- 152.5 any cpu
Domain-0 0 3 2 -b- 241.0 any cpu

Step 5: Check whether CPU’s are pinned for the new VM.

[root@ovm ovm_utils]# ./ovm_vmcontrol -u admin -p ************ -h ovm.lab.local -v FirstVM -c vcpuget
Oracle VM VM Control utility 2.0.1.
Connecting with a secure connection.
Connected.
Command : vcpuget
No vcpu's pinned for this Virtual Machine
.

Above output shows that CPU’s are not pinned for the VM.

Step 6: Pin both CPUs to core 0 and 1.

It is recommend to reboot the VMs after CPU pinning to get the changes effective.

[root@ovm ovm_utils]# ./ovm_vmcontrol -u admin -p ************ -h ovm.lab.local -v FirstVM -c vcpuset -s 0,1
Oracle VM VM Control utility 2.0.1.
Connecting with a secure connection.
Connected.
Command : vcpuset
Pinning virtual CPUs
Pinning of virtual CPUs to physical threads '0,1' 'FirstVM' completed.

[root@ovm ovm_utils]# ./ovm_vmcontrol -u admin -p ************ -h ovm.lab.local -v FirstVM -c vcpuget
Oracle VM VM Control utility 2.0.1.
Connecting with a secure connection.
Connected.
Command : vcpuget
Current pinning of virtual CPUs to physical threads : 0,1

Step 7: Confirm the CPU pinning by access and run the below command in the Oracle VM Server.

[root@ovs01 ~]# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb0000060000524f9d3e43fd71f3 2 0 0 -b- 401.6 0-1
0004fb0000060000524f9d3e43fd71f3 2 1 1 -b- 29.4 0-1
Domain-0 0 0 3 -b- 240.0 any cpu
Domain-0 0 1 3 r-- 282.2 any cpu
Domain-0 0 2 2 -b- 154.2 any cpu
Domain-0 0 3 0 -b- 244.2 any cpu

Step 8: Alternate method to set CPUs from Oracle VM server

[root@ovs01 ~]# xm vcpu-pin 2 all 2-3


[root@ovs01 ~]# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb0000060000524f9d3e43fd71f3 2 0 3 -b- 409.8 2-3
0004fb0000060000524f9d3e43fd71f3 2 1 3 -b- 29.5 2-3
Domain-0 0 0 0 -b- 242.3 any cpu
Domain-0 0 1 2 -b- 285.7 any cpu
Domain-0 0 2 1 r-- 155.6 any cpu
Domain-0 0 3 0 -b- 247.2 any cpu