Useful Oracle VM Server Hypervisor XM Commands – Part 15


Basic information about the Oracle VM Server

[root@ovs01 ~]# xm info
host : ovs01.lab.local
release : 3.8.13-118.15.1.el6uek.x86_64
version : #2 SMP Fri Dec 2 09:07:34 PST 2016
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2591
hw_caps : 1fabfbff:2c100800:00000000:00003f00:f6fa3223:00000000:00000101:00000281
virt_caps : hvm
total_memory : 2047
free_memory : 685
free_cpus : 0
xen_major : 4
xen_minor : 3
xen_extra : .1OVM
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset :
xen_commandline : console=com1,vga com1=57600,8n1 dom0_mem=max:816M allowsuperpage
cc_compiler : gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
cc_compile_by : mockbuild
cc_compile_domain : us.oracle.com
cc_compile_date : Sun Dec 25 21:46:52 PST 2016
xend_config_format : 4

List all running domain details

[root@ovs01 ~]# xm list
Name ID Mem VCPUs State Time(s)
0004fb0000060000524f9d3e43fd71f3 2 515 2 -b---- 140.8
Domain-0 0 814 4 r----- 1032.5

To list details for particular VM

[root@ovs01 ~]# xm list 0004fb0000060000524f9d3e43fd71f3
Name ID Mem VCPUs State Time(s)
0004fb0000060000524f9d3e43fd71f3 2 515 2 -b---- 150.1

Detail information about the VM

[root@ovs01 ~]# xm list 0004fb0000060000524f9d3e43fd71f3 -l

VM Grace Shutdown

[root@ovs01 ~]# xm shutdown 0004fb0000060000524f9d3e43fd71f3

To start the VM

[root@ovs01 ~]# xm create /OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg
Using config file "/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg".
Started domain 0004fb0000060000524f9d3e43fd71f3 (id=3)

VM Kill/PowerOff and Reboot

[root@ovs01 ~]# xm destroy 0004fb0000060000524f9d3e43fd71f3
[root@ovs01 ~]# xm reboot 0004fb0000060000524f9d3e43fd71f3

To get the VM MAC details

[root@ovs01 ~]# xm network-list 0004fb0000060000524f9d3e43fd71f3
Idx BE MAC Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:21:f6:96:bf:12 0 1 -1 -1 /-1 /local/domain/0/backend/vif/4/0

To monitor the Xen Domain

[root@ovs01 ~]# xm top

VM current state

[root@ovs01 ~]# xm domstate 0004fb0000060000524f9d3e43fd71f3
idle

To list all domain CPU details

[root@ovs01 ~]# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb0000060000524f9d3e43fd71f3 4 0 1 -b- 70.9 0-1
0004fb0000060000524f9d3e43fd71f3 4 1 0 -b- 22.5 0-1
Domain-0 0 0 1 -b- 255.5 any cpu
Domain-0 0 1 3 -b- 385.1 any cpu
Domain-0 0 2 2 -b- 237.5 any cpu
Domain-0 0 3 0 r-- 335.8 any cpu

To see Domain uptime

[root@ovs01 ~]# xm uptime
Name ID Uptime
0004fb0000060000524f9d3e43fd71f3 4 0:05:21
Domain-0 0 1:31:59

DRY-RUN command to check whether domain is able to access the resources

[root@ovs01 ~]# xm dry-run /OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg
Using config file "/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualMachines/0004fb0000060000524f9d3e43fd71f3/vm.cfg".
Checking domain:
0004fb0000060000524f9d3e43fd71f3: PERMITTED
Checking resources:
file:/OVS/Repositories/0004fb000003000082b0d717e2f9871d/VirtualDisks/0004fb0000120000590b281ac02ac9b2.img: PERMITTED
file:/OVS/Repositories/0004fb000003000082b0d717e2f9871d/ISOs/0004fb0000150000006463c3fe40be43.iso: PERMITTED
Dry Run: PASSED

VM Live migration to other Oracle VM Server

[root@ovs01 ~]# xm migrate -l 0004fb0000060000524f9d3e43fd71f3 ovs02.lab.local

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

How to Restore Oracle VM Manager without Database Backup or Admin Password – Part 12


In our previous post (Part 8) we have discussed how to recover the Oracle VM Manager using MySQL database. For that we need MySQL backup and admin & weblogic user password. But sometimes we might have chance to forget the admin or weblogic user password and also no backup of Oracle VM Manager MySQL database. In that case, we need to follow the below steps to recover the Oracle VM Manager.

Before starting our VM manager installation we need the existing Manager UUID value. The Oracle VM Manager UUID is located in Oracle VM Manager server (/u01/app/oracle/ovm-manager-3/.config) file and as well as in each server pool’ .ovsrepo file (OVS_REPO_MGR_UUID=UUID) located in the pool file system.

[root@mgmtsrv ~]# cat /repo2/.ovsrepo
OVS_REPO_UUID=0004fb000003000082b0d717e2f9871d
OVS_REPO_VERSION=3.0
OVS_REPO_MGR_UUID=0004fb00000100009157557324ed168d
OVS_REPO_ALIAS=OraRepo

Step 1: Move the OVS agent db directory

This step is not required, however we need to perform if we get any ownership error or warning during discovering the Oracle Virtual Server.

[root@ovs01 ~]# /etc/init.d/ovs-agent stop
Stopping Oracle VM Agent: [ OK ]

[root@ovs01 ~]# mv /etc/ovs-agent/db /etc/ovs-agent/db_bak20171223

[root@ovs01 ~]# /etc/init.d/ovs-agent start
Starting Oracle VM Agent: [ OK ]

Step 2: 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 3: Discover one Oracle VM Server from each server pool

OVM> discoverServer ipaddress=ovs01.lab.local password=********** takeOwnership=Yes
Command: discoverServer ipaddress=ovs01.lab.local password=**** takeOwnership=Yes
Status: Success
Time: 2017-12-23 03:47:27,748 EST
JobId: 1514018774243

Step 4: Discover the storage that contains the server pool file system. Present it to the newly discovered Oracle VM Server. Refresh the storage.

OVM> create FileServer plugin="Oracle Generic Network File System" accessHost=mgmtsrv.lab.local adminServers="ovs01.lab.local" name=MYSANRec
Command: create FileServer plugin="Oracle Generic Network File System" accessHost=mgmtsrv.lab.local adminServers="ovs01.lab.local" name=MYSANRec
Status: Success
Time: 2017-12-23 03:50:08,007 EST
JobId: 1514019007499
Data:
id:0004fb0000090000371a9d6db792e728 name:MYSANRec

OVM> addAdminServer FileServer name=MYSANRec server=ovs01.lab.local
Command: addAdminServer FileServer name=MYSANRec server=ovs01.lab.local
Status: Success
Time: 2017-12-23 03:50:33,884 EST
JobId: 1514019033629

OVM> addRefreshServer FileServer name=MYSANRec server=ovs01.lab.local
Command: addRefreshServer FileServer name=MYSANRec server=ovs01.lab.local
Status: Success
Time: 2017-12-23 03:50:58,303 EST
JobId: 1514019058085

OVM> refresh FileServer name=MYSANRec
Command: refresh FileServer name=MYSANRec
Status: Success
Time: 2017-12-23 03:51:24,544 EST
JobId: 1514019082774

Step 5: Refresh the file systems or physical disks that contain the server pool file system

OVM> list FileSystem
Command: list FileSystem
Status: Success
Time: 2017-12-23 03:51:33,554 EST
Data:
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> refresh FileSystem name="nfs on mgmtsrv.lab.local://repo1"
Command: refresh FileSystem name="nfs on mgmtsrv.lab.local://repo1"
Status: Success
Time: 2017-12-23 03:52:49,786 EST
JobId: 1514019168044

Step 6: Refresh the file systems or physical disks that contain the repositories used by server pool

OVM> refresh FileSystem name="nfs on mgmtsrv.lab.local://repo2"
Command: refresh FileSystem name="nfs on mgmtsrv.lab.local://repo2"
Status: Success
Time: 2017-12-23 03:52:54,608 EST
JobId: 1514019173387

Step 7: Present the repositories to the Oracle VM Server

OVM> add Server name=ovs01.lab.local to ServerPool name=Pool_01
Command: add Server name=ovs01.lab.local to ServerPool name=Pool_01
Status: Success
Time: 2017-12-23 03:57:10,904 EST
JobId: 1514019424928

OVM> list ServerPool
Command: list ServerPool
Status: Success
Time: 2017-12-23 03:57:18,884 EST
Data:
id:0004fb00000200002d1d67487c79ed89 name:Pool_01

OVM> add ServerPool name=Pool_01 to Repository name=OraRepo
Command: add ServerPool name=Pool_01 to Repository name=OraRepo
Status: Success
Time: 2017-12-23 03:59:06,197 EST
JobId: 1514019545102

Step 8: Refresh the repositories

OVM> refresh Repository name=OraRepo
Command: refresh Repository name=OraRepo
Status: Success
Time: 2017-12-23 03:59:20,625 EST
JobId: 1514019559448

Step 9: Check the VM list

OVM> list vm
Command: list vm
Status: Success
Time: 2017-12-23 04:04:50,724 EST
Data:
id:0004fb0000060000524f9d3e43fd71f3 name:FirstVM

OVM> start vm name=FirstVM
Command: start vm name=FirstVM
Status: Failure
Time: 2017-12-23 04:05:36,388 EST
JobId: 1514019936121
Error Msg: Job failed on Core: OVMRU_005053E: Virtual Machine: FirstVM, is not associated with any server pool [Sat Dec 23 04:05:36 EST 2017]

In above command, I’m trying to start the Virtual Machine but it failed because the VM “FirstVM” is not associated with any server pool. So we need to move this VM to corresponding Server Pool.

OVM> migrate Vm name=FirstVM destServerPool=Pool_01
Command: migrate Vm name=FirstVM destServerPool=Pool_01
Status: Success
Time: 2017-12-23 04:13:31,390 EST
JobId: 1514020411131

OVM> start vm name=FirstVM
Command: start vm name=FirstVM
Status: Success
Time: 2017-12-23 04:13:45,270 EST
JobId: 1514020416903

Create new Oracle VM Manager user – Part 11


Step 1: Create new user

[root@ovm ~]# cd /u01/app/oracle/ovm-manager-3/bin/

[root@ovm bin]# ./ovm_admin --createuser

Oracle VM Manager Release 3.3.5 Admin tool

Please enter the username : john

Please enter the password for john (minimum 8 chars. with one numeric/special char.) :
Please re-enter the password :

Please enter the password for weblogic :##Enter weblogic user password ##

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to WebLogic server ...

Connected ...
Creating user 'john' ...
Created user 'john' successfully ...
Disconnected from weblogic server: AdminServer
Exiting...

Exiting WebLogic Scripting Tool.

Step 2: View list of users

[root@ovm bin]# ./ovm_admin --listusers

Oracle VM Manager Release 3.3.5 Admin tool

Please enter the password for weblogic : ##Enter weblogic user password ##

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to WebLogic server ...

Connected ...
Listing Oracle VM users ...
User : OracleSystemUser
User : weblogic
User : admin
User : john
Listed users successfully ...
Disconnected from weblogic server: AdminServer
Exiting...

Exiting WebLogic Scripting Tool.

Check whether new user able to login to Oracle VM Manager CLI & Console.

[root@mgmtsrv ~]# ssh -l john ovm.lab.local -p 10000
john@ovm.lab.local's password:
OVM>
OVM> list Server
Command: list Server
Status: Success
Time: 2017-12-19 08:09:21,175 EST
Data:
id:56:4d:88:59:8d:10:18:09:9d:1a:5d:a3:f2:8d:f7:97 name:ovs01.lab.local
OVM>
OVM> list ServerPool
Command: list ServerPool
Status: Success
Time: 2017-12-19 08:09:36,752 EST
Data:
id:0004fb000002000085056823cacce55e name:Pool_01
OVM> exit
Connection to ovm.lab.local closed.

Step 3: Changing the user password

[root@ovm bin]# ./ovm_admin --modifyuser

Oracle VM Manager Release 3.3.5 Admin tool

Please enter the username : john

Please enter the current password :

Please enter a new password for john (minimum 8 chars. with one numeric/special char.) :
Please re-enter the password :
Passwords did not match.

Please enter a new password for john (minimum 8 chars. with one numeric/special char.) :
Please re-enter the password :

Please enter the password for weblogic : ##Enter weblogic user password ##

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to WebLogic server ...

Connected ...
Modifying user 'john' ...
Modified user 'john' successfully ...
Disconnected from weblogic server: AdminServer
Exiting...

Exiting WebLogic Scripting Tool.

Step 4: Delete users

[root@ovm bin]# ./ovm_admin --deleteuser john

Oracle VM Manager Release 3.3.5 Admin tool

Please enter the password for weblogic : ##Enter weblogic user password ##

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to WebLogic server ...

Connected ...
Deleting user 'john' ...
Deleted user 'john' successfully ...
Disconnected from weblogic server: AdminServer
Exiting...

Exiting WebLogic Scripting Tool.