Main Menu

Search

Showing posts with label Oracle Virtual Server. Show all posts
Showing posts with label Oracle Virtual Server. Show all posts

Oracle Virtual Server (OVS): How To Pin Virtual Machine (VM) To Specific VCPUs

Oracle Virtual Server (OVS): How To Pin Virtual Machine (VM) To Specific VCPUs

For a running VM instance, to pin it to specific VCPUs on the Dom0 Node, following command can be used.


xm vcpu-pin <VM UUID> all <range>


For e.g. if you want to pin the VM to use range 44-56 CPUs on the Dom0 node, your command will look like below.


xm vcpu-pin <VM UUID> all 44-87

Oracle VM Manager: How to check and troubleshoot communication issues between OVM Manager and OVS Dom0 nodes

Following are steps to check and troubleshoot communication issues between OVM Manager and OVS Dom0 nodes.

1) Run below command on Host running OVM Manager.

netstat -an | grep 7002

When running above command you should see TCP WAIT or LISTEN connections to all Dom0 Nodes IPs (using which they were discovered in OVMM).

2) Run below command on Dom0 nodes and check if the ovs-agent is up and running.

service ovs-agent status

3) Run below command on Dom0 nodes to check if OVM Manager URL is shown.

ovs-agent-db dump_db server

In above command output check for manager_core_api_url and see if you see https URL for OVM Manager URL and 7002 port. URL will be like "'https://XXXX:YYYY@:7002/ovm/core/OVMManagerCoreServlet'"

4) Run below tcpdump command on Dom0 node and check if the communication is happening between Dom0 compute node and OVM Manager. In below command replace the IP with the IP of OVM Manager.

tcpdump -i any host <IP> and port 7002 

5) Do Ping tests between the Dom0 Nodes and OVM Manager host using over IPs (used to discover OVS nodes from OVMM) both the ways.

 

Products to which Article Applies

Oracle VM Manager, OVS - All versions.

 

Article Author: Tarun Boyella

Oracle Virtual Server: How To Check If CPU Oversubscription Is Being Used on OVS Dom0 Node Where Multiple VMs Are Sharing One Physical CPU? (xm/xen command)

Below xm command be used to check if CPU over subsription is being used.
xm vcpu-list
Below is example snippet of above command. Refer to CPU column in below output. If no CPU over subscription is not being used, no one CPU should be shared among multiple VM's. If CPU over subscription it is expected to see one physical CPU being shared by multiple Guest Virtual Machines.
# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb00000600001ec36fa6da3a1473 4 0 87 r-- 55646.3 44-87
0004fb00000600001ec36fa6da3a1473 4 1 63 -b- 81204.9 44-87
0004fb00000600001ec36fa6da3a1473 4 2 59 -b- 85852.2 44-87
0004fb00000600001ec36fa6da3a1473 4 3 51 -b- 91959.9 44-87
0004fb00000600001ec36fa6da3a1473 4 4 67 r-- 91004.3 44-87
0004fb00000600001ec36fa6da3a1473 4 5 65 -b- 100265.6 44-87
0004fb00000600001ec36fa6da3a1473 4 6 69 -b- 68955.0 44-87
0004fb00000600001ec36fa6da3a1473 4 7 61 -b- 80699.3 44-87
0004fb00000600001ec36fa6da3a1473 4 8 70 -b- 73943.4 44-87
0004fb00000600001ec36fa6da3a1473 4 9 46 -b- 55776.7 44-87
0004fb00000600001ec36fa6da3a1473 4 10 52 -b- 57619.8 44-87
0004fb00000600001ec36fa6da3a1473 4 11 57 -b- 51450.2 44-87
0004fb000006000064112543536d3fcb 5 0 83 r-- 47772.5 44-87
0004fb000006000064112543536d3fcb 5 1 45 -b- 41886.0 44-87
0004fb0000060000373cd5d8c9a42827 1 0 85 -b- 829.2 44-87
0004fb0000060000373cd5d8c9a42827 1 1 49 -b- 830.5 44-87
0004fb0000060000373cd5d8c9a42827 1 2 55 -b- 1058.6 44-87
0004fb0000060000373cd5d8c9a42827 1 3 81 -b- 825.6 44-87
Domain-0 0 0 0 -b- 9573.5 0
Domain-0 0 1 1 -b- 5905.3 1
Domain-0 0 2 2 -b- 9971.7 2
Domain-0 0 3 3 r-- 6694.2 3
Domain-0 0 4 4 -b- 9278.9 4
Domain-0 0 5 5 -b- 4992.5 5
Domain-0 0 6 6 -b- 9654.8 6
Domain-0 0 7 7 -b- 5390.5 7
Domain-0 0 8 8 -b- 9806.7 8

Products to which Article Applies
Oracle Virtual Server - All versions
Article Author: Tarun Boyella

Oracle Virtual Server: How To Check NUMA Settings (NR CPUs, Nodes, Cores, Socket) On Dom0 OVS Node?

Below command can be used to to check NUMA settings (CPUs, Nodes, Cores, Socket) on Dom0 OVS Node.

xm info -n

Below is example output of above command.

host : XXXXcn01.YYY.ZZZ.MMM 
release : 2.6.39-300.22.2.el5uek
version : #1 SMP Fri Jan 4 12:40:29 PST 2013
machine : x86_64
nr_cpus : 48
nr_nodes : 2
cores_per_socket : 12
threads_per_core : 2

 

Products to which Article Applies

Oracle Virtual Server - All Versions

 

Article Author: Tarun Boyella

Oracle Virtual Server: Command To Force Reload O2CB Cluster (How To Doc)

Below is command to force reload O2CB Cluster.

service o2cb force-reload 

 

Products to which Article Applies

Oracle Virtual Server - All versions.

 

Article Author: Tarun Boyella

Oracle Virtual Server: ovs-agent Process Log PID File Location

Below file on Dom0 Node shows ovs-agent process log PID file.
/var/run/ovs-agent/log.pid 
“service ovs-agent- status” command also shows ova-agent log PID details. Below is example snippet of the command which shows ovs-agent log PID details (highlighted) in bold.
# service ovs-agent status
log server (pid 21683) is running...
notification server (pid 21689) is running...
remaster server (pid 21702) is running...
monitor server (pid 21704) is running...
ha server (pid 21705) is running...
stats server (pid 21708) is running...
xmlrpc server (pid 21710) is running…

Products to which Article Applies
Oracle Virtual Server All versions
Article Author: Tarun Boyella

Oracle Virtual Server (OVS): Command To Check All Servers Part of OVS Pool and Which Server is Master (How To Doc)

Below command can be used to check all Servers part of OVS pool and which Server is Master.
ovs-agent-db dump_db -c server_pool_servers

Below is example output of above command.

# ovs-agent-db dump_db -c server_pool_servers
{'ovm-server-01.test.com': {'node_number': 0,
                               'registered_ip': '10.10.10.1',
                               'roles': set(['master', 'utility', 'xen'])},
 'ovm-server-02.test.com': {'node_number': 1,
                               'registered_ip': '10.10.10.2',
                               'roles': set(['utility', 'xen'])},
 'ovm-server-03.test.com': {'node_number': 2,
                               'registered_ip': '10.10.10.3',
                               'roles': set(['utility', 'xen'])},
 'ovm-server-04.test.com': {'node_number': 3,
                               'registered_ip': '10.10.10.4',
                               'roles': set(['utility', 'xen'])}}

Products to which Article Applies

Oracle Virtual Server (OVS), Oracle VM Manager environments.


Oracle Virtual Server (OVS): SHELL SCRIPT for printing Memory (in GB) & CPU of Running Guest VM's on Dom0 Hypervisor

Create shell script .sh extension with below content. For e.g. lets assume shell script name is printMemCPU.sh inside /tmp.
#!/bin/bash
#set -x

USAGE="usage: $0 [-t (print total values only)] [-m <additional Memory in GB/MB (see -m)>] [-c <additional cpus>] [-m (print mem in MB instead of GB)]"

ADDCPU=0
ADDMEM=0
VMS_USED_MEM=0
VMS_USED_CPU=0
TOTALSONLY=0
UNITMB=0
MEMDIVISOR=1024
MEMUNIT="GB"
while getopts tma:c: name
do
     case $name in
     t)      TOTALSONLY=1;;
     a)      ADDMEM="$OPTARG";;
     m)      MEMUNIT="MB"
         MEMDIVISOR=1;;
     c)      ADDCPU="$OPTARG";;
     ?)     echo  $USAGE;
            exit 1;;
     esac
done
shift $(($OPTIND - 1))

#test -n "$1" && ADDMEM=$1
#test -n "$2" && ADDCPU=$2

export MEM CPU VMS_USED_MEM VMS_USED_CPU
TOTALCPU=`xm info | awk '/^nr_cpus/{print $3}'`
let TOTALMEM=`xm info | awk '/^total_memory/{print $3}'`/$MEMDIVISOR
let FREEMEM=`xm info | awk '/^free_memory/{print $3}'`/$MEMDIVISOR
#echo "TOTALCPU: $TOTALCPU, TOTALMEM: $TOTALMEM, FREEMEM: $FRMEM"
#echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

while read line
do
   set $line
   UUID=$1
   MEM=$3
   CPU=$4
   let MEM_IN_UNITS=$MEM/$MEMDIVISOR
   let VMS_USED_MEM=VMS_USED_MEM+$MEM_IN_UNITS
   let VMS_USED_CPU=VMS_USED_CPU+$CPU
   VMNAME=`grep -i OVM_simple_name /OVS/Repositories/*/VirtualMachines/$UUID/vm.cfg | cut -d "'" -f 2`

   test $TOTALSONLY -eq 0 && echo "$VMNAME: $UUID, $MEM_IN_UNITS $MEMUNIT, $CPU cpus"
   #echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

done < <(xm list | grep 004)
#set -x
let DOM0_MEM=`xm list | awk '/^Domain-0/{print $3}'`/$MEMDIVISOR
let VMS_USED_MEM=VMS_USED_MEM+DOM0_MEM
#echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

let USED_MEM=$TOTALMEM-$FREEMEM
#echo "USED_MEM: $USED_MEM"
let PCT_USED_MEM=$USED_MEM*100/$TOTALMEM
let PCT_CPUUTIL=$VMS_USED_CPU*100/$TOTALCPU

#TOTALS_TEXT="utilization totals: $USED_MEM $MEMUNIT (${PCT_USED_MEM}%), $VMS_USED_CPU cpus (${PCT_CPUUTIL}%)"
#echo "current $TOTALS_TEXT"
#
let FREECPU=$TOTALCPU-$VMS_USED_CPU
echo "current utilization totals: $USED_MEM $MEMUNIT (${PCT_USED_MEM}%), $VMS_USED_CPU cpus (${PCT_CPUUTIL}%). Free: $FREEMEM $MEMUNIT, $FREECPU cpus"

if [ $ADDMEM -ne 0 -o $ADDCPU -ne 0 ]
then
    let ADDMEM=$ADDMEM/$MEMDIVISOR
    let FUTURMEM=$USED_MEM+$ADDMEM
    let FUTURFREEMEM=$FREEMEM-$ADDMEM
    let FUTURCPU=$VMS_USED_CPU+$ADDCPU
    let FUTURFREECPU=$TOTALCPU-$FUTURCPU
        let PCT_USED_MEM=$FUTURMEM*100/$TOTALMEM
        let PCT_CPUUTIL=$FUTURCPU*100/$TOTALCPU
        echo "future utilization totals: $FUTURMEM $MEMUNIT (${PCT_USED_MEM}%), $FUTURCPU cpus (${PCT_CPUUTIL}%). Free: $FUTURFREEMEM $MEMUNIT, $FUTURFREECPU cpus"
fi

Execute shell script. In example listed in this article
/tmp/printMemCPU.sh

Below is sample output we see when running the script. As we can see below we see each running VM and memory & CPU allocated for that VM.
testvm-1: 0004fb00000600000dc80091c7f16169, 4 GB, 1 cpus
testvm-OL7: 0004fb00000600001e84a1ecd1663757, 4 GB, 1 cpus
AppControl: 0004fb00000600001ec36fa6da3a1473, 32 GB, 12 cpus

Oracle Virtual Server (OVS): How To check Exact OVS Version On the Machine?

Below command can be used to find the exact OVS version on the node.
cat /etc/ovs-release

Below is example snippet of above command.

# cat /etc/ovs-release
Oracle VM server release 3.4.4

Products to which Article Applies



Oracle Virtual Server

Oracle Virtual Server (OVS): Command To Verify OVM Repository Name, Storage File System Name and Mount Point Name On Dom0 OVS Node (How To Doc)

In Standalone OVM Deployment or in Engineered Systems like Exalogic or Private Cloud Appliance the Dom0 OVS Compute Nodes are part of OVS Repository Pool File System. In order to check the Servers / Nodes part of OVS Pool File system below command can be used.

Below command can be used in order to check verify the OVM Repository name, Storage File system name name and mount point name on the OVS Dom0 compute node.


ovs-agent-db dump_db server

Below is snippet of above command.


{'0004fbZZZZZZZZZZZZZZZZZZZd09c': {'alias': u'exlcontrol_repo',
                                      'filesystem': 'nfs',
                                      'fs_location': '10.10.21.5:/export/reposhare',
                                      'manager_uuid': u'0004fb00ZZZZZZZZZZZZZZZZ6f',
                                      'mount_point': '/OVS/Repositories/0004fZZZZZZZZZZZZZZZZbd09c',
                                      'version': u'3.0'}}


Products to which Article Applies

Any environment using Oracle VM Manager (OVMM) and OVS (Oracle Virtual Server)

Oracle Virtual Server (OVS): Command To Check Nodes / Servers Part of OVS Pool? (How To Doc)

In Standalone OVM Deployment or in Engineered Systems like Exalogic or Private Cloud Appliance the Dom0 OVS Compute Nodes are part of OVS Repository Pool File System. In order to check the Servers / Nodes part of OVS Pool File system below command can be used.


ovs-agent-db dump_db server

Below is snippet of above command.



{'cluster_state': 'DLM_Ready',
 'clustered': True,
 'is_master': True,
 'manager_core_api_url': 'https://e00f5b540010ffffffffffffff200008:897c7fce6cf5404d8e3757ba4c63cd2f@10.10.23.6:7002/ovm/core/OVMManagerCoreServlet',
 'manager_uuid': '0004fTTTTTTTTTTTTTTTTTTTTTT7496f',
 'node_number': 0,
 'pool_alias': 'ovstestpool',
 'pool_member_ip_list': ['10.10.23.1',
                         '10.10.23.2',
                         '10.10.23.4',
                         '10.10.23.3'],
 'pool_uuid': '0004fb00ZZZZZZZZZZZZZZZZ1815c026a4',
 'pool_virtual_ip': '10.10.23.5',
 'poolfs_nfsbase_uuid': 'ZZZZZZZZZZZ-c4b3-ZZZZZZ-8ff3-TTTTTT',
 'poolfs_target': '10.10.21.5:/export/ExalogicPool1',
 'poolfs_type': 'nfs',
 'poolfs_uuid': '0004fb0000050000e816324cc39e4825',
 'registered_hostname': 'node1.test.com',
 'registered_ip': '10.10.23.1',
 'roles': set(['xen', 'utility'])}


Products to which Article Applies

Any environment using Oracle VM Manager (OVMM) and OVS (Oracle Virtual Server)

Exalogic: OVS: Command To Check The Health Status of OVS Dom0 Compute Node In Exalogic Virtual Racks (How To Doc)

In Exalogic Engineered Systems with Exalogic Virtual PSU running, there may be a need to validate the health status of Dom0 Compute Nodes.

For Exalogic Virtual racks, following has to be validated in terms of Dom0 HealthCheck perspective.
  1. Both the IB Ports are UP
  2. /OVS/Repositories OVM repo is mounted.
  3. Poolfs file system is mounted.
  4. All the OVS services - ovs-agent, xend, o2cb, ocfs2 are UP and running.
  5. There are no D State processes running on the dom0 compute node.
For validating Dom0 compute node healthcheck following command can be executed on the Dom0 compute node. This one command will validate the health status of Dom0 compute node.


echo "";echo "";echo "====== df -H Output ======";echo "";df -H;echo "";echo "====== D State Processes ======";echo "";ps -elfy ww | grep ^D; echo "";echo "====== ovs-agent status ======";echo "";service ovs-agent status;echo "";echo "====== O2CB Status ======";echo "";service o2cb status;echo "";echo "====== XEND Status ======";echo "";service xend status;echo "";echo "====== OCFS2 Status";echo "";service ocfs2 status;echo "";echo "====== IB PORTS Status ======";echo "";ibstat


Below is snippet of above command.


Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda5              3.2G   2.7G   318M  90% /
/dev/sda3              379G   205M   359G   1% /ssd
/dev/sda2              4.3G   310M   4.0G   8% /OVS
/dev/sda1              104M    41M    58M  42% /boot
tmpfs                  3.3G   4.1k   3.3G   1% /dev/shm
none                   3.3G   148k   3.3G   1% /var/lib/xenstored
192.168.21.5:/export/ExalogicPool1
                        68T   155M    68T   1% /nfsmnt/XXYYZZ-9294-XXYYZZ-a29e-7cd46bdb71be
/dev/mapper/ovspoolfs
                        11G   276M    11G   3% /poolfsmnt/0004fbZZZZZZZZZZZZ3d44a7fa647
192.168.21.5:/export/ExalogicRepo
                        69T   793G    68T   2% /OVS/Repositories/0004ZZZZZZZZZ6b369c095

====== D State Processes ======


====== ovs-agent status ======

log server (pid 11750) is running...
notification server (pid 12034) is running...
remaster server (pid 12050) is running...
monitor server (pid 12052) is running...
ha server (pid 12053) is running...
stats server (pid 12056) is running...
xmlrpc server (pid 12058) is running...

====== O2CB Status ======

Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Stack glue driver: Loaded
Stack plugin "o2cb": Loaded
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster "3fXXXXXXXXX375": Online
  Heartbeat dead threshold: 43201
  Network idle timeout: 150000
  Network keepalive delay: 2000
  Network reconnect delay: 2000
  Heartbeat mode: Global
Checking O2CB heartbeat: Active
  0004FB00XXXXXXXXXXA7FA647 /dev/dm-0
Nodes in O2CB cluster: 0 1 2 3
Active userdlm domains:  ovm
Debug file system at /sys/kernel/debug: mounted

====== XEND Status ======

xend daemon (pid 11262) is running...

====== OCFS2 Status

Configured OCFS2 mountpoints:  /OVS
Active OCFS2 mountpoints:  /OVS /poolfsmnt/0004fbXXXXXXXXXXXXXXX3d44a7fa647

====== IB PORTS Status ======

CA 'mlx4_0'
        CA type: MT4099
        Number of ports: 2
        Firmware version: 2.11.3030
        Hardware version: 0
        Node GUID: 0x00TTTTTTTTTTTfd0
        System image GUID: 0x00TTTTTTTTTTTfd3
        Port 1:
                State: Active
                Physical state: LinkUp
                Rate: 40
                Base lid: 19
                LMC: 0
                SM lid: 27
                Capability mask: 0x02514868
                Port GUID: 0x00TTTTTTTTTTTfd1
                Link layer: IB
        Port 2:
                State: Active
                Physical state: LinkUp
                Rate: 40
                Base lid: 20
                LMC: 0
                SM lid: 27
                Capability mask: 0x02514868
                Port GUID: 0x00TTTTTTTTTTTfd2
                Link layer: IB


Products to which Article Applies

Exalogic Engineered Systems running Exalogic Virtual releases.

OVS: How to Validate If Dom0 Oracle Virtual Server Hypervisor Is Healthy?

Below are commands which can be executed to check the health status of Dom0 Oracle Virtual Server Hypervisor is healthy.
Verify Xend Status

service xend status
xend should be shown as running in above command output as shown below.
xend daemon (pid 11702) is running...
 Verify ovs-agent Status

service ovs-agent status
 ovs-agent service should be UP as shown below. 
log server (pid 12222) is running...
notification server (pid 12549) is running...
remaster server (pid 12581) is running...
monitor server (pid 12583) is running...
ha server (pid 12585) is running...
stats server (pid 12586) is running...
xmlrpc server (pid 12589) is running...
Verify O2CB Status

service o2cb status
O2CB Cluster status should be shown as Online and O2CB heartbeat status should be "Active" as seen below.

Driver for "configfs": LoadedFilesystem "configfs": Mounted
Stack glue driver: Loaded
Stack plugin "o2cb": Loaded
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster "ZZZZZZZZZZZ": Online
  Heartbeat dead threshold: 43201
  Network idle timeout: 150000
  Network keepalive delay: 2000
  Network reconnect delay: 2000
  Heartbeat mode: Global
Checking O2CB heartbeat: Active
  0004ZZZZZZZZZZZZZZZZ /dev/dm-0
Nodes in O2CB cluster: 0 1 2 3 4 5 6 7
Active userdlm domains:  ovm
Verify OCFS2 Status

service ocfs2 status
OVS Repository and poolfs mount should be seen from this command as seen below.
Configured OCFS2 mountpoints:  /OVS
Active OCFS2 mountpoints:  /OVS /poolfsmnt/ZZZZZZZZZZZZZZZZZZZZZZZZ
Verify the NFS mounts
df -H
OVS Repository and poolfs mount should be seen from df command output.
/dev/mapper/ovspoolfs
                       10G  369M  9.7G   12% /poolfsmnt/ZZZZZZZZZZZZZZZZZZZZZZ
192.ZZ.ZZ.ZZ:/export/OVSRepo
                       31T  1.5T   29T   6% /OVS/Repositories/000ZZZZZZZZZZZZZZ

Products to which Article Applies


Oracle VM Manager.



Additional Reference

https://docs.oracle.com/cd/E64076_01/E64083/html/vmadm-preface.html