Tuesday Jul 26, 2016

Oracle VM 3.4: export Oracle VM Pool informations into a csv report file

The target of this script is to build-up a report of all Oracle VM Servers (OVS) managed by an Oracle VM Manager on one or more Oracle VM Pools. Following script is compatible with Oracle VM 3.2, 3.3 and 3.4.

The output obtained is one csv file containing all the main informations related to all the OVS; the table will be composed of:

  • Oracle VM Pool Name
  • Oracle VM Server Name (hostname)
  • dom0 UUID (Unique identified of dom0)
  • Management IP (IP Address used on Management Network)
  • Status (Running/Stopped/Maintenance)
  • Memory (Amount of total Memory available on the physical system)
  • dom0 Memory (Amount of Memory dedicated to dom0)
  • Socket (number of Socket(s) enabled on the system)
  • Processors (number of CPUs available on the system - core/threads)
  • CPU Compatibility Group (Group to evaluate the possible live-migration of VMs between Host systems)
  • Oracle VM Release (detailed release of Oracle VM Server installed)
  • Manufacturer/Model (Manufacturer and model of the physical server)
  • Server Architecture (x86-64 or Sparc)
  • Hypervisor (OVM/Xen or LDOM)
  • Bios Release (Release of the BIOS installed on the system)
  • Bios Release Date (Release date of the BIOS installed)

Here you can find an example of output generated by this script:

At the same time, into the same package, you'll find an updated version of "ExportVmDetails" script (presented here on June, 29th 2016).

The script has been improved with following enhancements:

  • Status of VM added to the report
  • vDisk space used is now available also on Oracle VM 3.2 Release
  • vDisk space max is now available also on Oracle VM 3.2 Release
  • Physical Disk size is now available also on Oracle VM 3.2 Release

The updated package can be downloaded here.

Please pay attention of file "README_FIRST.txt" that will describe, step-by-step, how to install these scripts and have them configured in a couple of minutes.

As always, feedback and comments are really appreciated.

Wednesday Jun 29, 2016

Oracle VM 3.4: export VMs details into a csv report file (ExportVmDetails)

==> An updated release of this script is available here <==

The idea of this script came up more than one time in the past and target is to build-up a report of all VMs managed by an Oracle VM Manager on one or more Oracle VM Pools. Following script is compatible with Oracle VM 3.2, 3.3 and 3.4.

The output obtained is one csv file containing all the main informations related to all the VMs; the table will be composed of: 
  • Virtual Machine UUID (Unique ID)
  • Virtual Machine Name
  • Memory (amount of RAM allocated to the VM)
  • Max Memory (Max amount of RAM allocable to the VM without reboot)
  • Processors (Number of vCPUs)
  • Max Processors (Max number of vCPUs)
  • Processor Capacity (Increase or decrease the percentage to which the virtual CPUs can receive scheduled time)
  • Processor Priority (The higher the priority, the more physical CPU cycles are given to the virtual machine)
  • High Availability (H/A enabled or not for the VM)
  • Operating System (Descriptive field related to the OS installed on the VM)
  • VM Type (PVM, HVM or HVM with PV drivers)
  • Repository (Oracle VM Repository where vm.cfg file resides)
  • *vDisk Space Used (Disk space used by the vm - virtual-disks)
  • *vDisk Space Max (Disk space allocable by the vm - virtual-disks)
  • *Physical Disk size (Disk space used by the vm - physical-disks)

* = these options are only available on Oracle VM releases 3.3 and 3.4; on Oracle VM 3.2 release these three columns will be valued with "N/A".

The script, the install package and README file can be downloaded here

Installation process is pretty easy; just execute command "install.sh" and follow the interactive shell:

Last message of the installation package should be something similar to:

"OVMCLI Session successfully connected with key-based authentication!!!

like in the following picture:

The script "ExportVmDetails", available for default under path "/usr/local/bin" won't need any option and will supply an output similar to the following picture:

Obviously the same approach can be taken to generate further csv reports with all the informations related to an Oracle VM Pool.

As usually, feedback and comments are very welcome. 

If you need further informations, please visit:

Friday Jun 03, 2016

Oracle VM 3.4: identify orphan vdisks on repositories (find-vorph)

Identify orphan virtual-disks on repository can be a nightmare; mostly if you have more repositories and many virtual-disks to check.

  • What is it an orphan virtual-disk ?
==> An orphan virtual-disk is a virtual-device that is not associated to any virtual machine <==
  • Why do I need to identify them ?

==> Identify orphan virtual-disk can help to reclaim disk-space available on Oracle VM Repositories <==

So, like on many other examples, scripting with Oracle VM CLI can help us; here you can find a script able to identify all orphan virtual-disks; and you have two different options:

  • verify orphan virtual-disk on a specific repository
  • verify orphan virtual-disk on all repositories managed by Oracle VM Manager

The script is also able to supply the amount of disk-space recovered by deleting all orphan virtual-disks on a specific repository; output of the script will also present the Oracle VM CLI commands to execute to remove all orphan virtual-disks.

Script is compatible, able to interact and has been tested with:

  • Oracle VM 3.2
  • Oracle VM 3.3
  • Oracle VM 3.4 

Here you can find some execution examples:

  • Script executed on a specific repository (orphan virtual-disks identified and recoverable space specified)

  • Script executed on a specific repository (no orphan virtual-disks)

  • Script executed on all repositories (no repository specified)

To proceed to the setup pay attention to the README file attached to the download. 

Feedback and comments are, as always, appreciated. 

Wednesday Sep 11, 2013

Script: Know which dom(0) hold a dom(u)

More than one time we would like to know on which physical server our guest resides without open a new connection to our Oracle VM Manager.

So I created a little script that interact with Oracle VM Manager 3 CLI and supply us this information automatically.

Requirements:

- expect installed

- Oracle VM Manager network reachable

Executing the script:

########################################################
 While executing on Oracle VM Guest:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host>
 Example:
           whohost.sh Welcome1 ovm-mgr.oracle.local
########################################################
#####################################################################################
 If executed from a client and want to specify <guest id> or <guest name>:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest vmid(uuid)>
 Example <guest id>:
           whohost.sh Welcome1 ovm-mgr.oracle.local id=0004fb00000600006e13bfb3507a2f29
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest name>

 Example <guest name>:            whohost.sh Welcome1 ovm-mgr.oracle.local name=vmdb01 #####################################################################################

This little bash script could be executed on a client ( laptop ) or directly on a guest; when executed on a linux guest

we can evaluate to leave out the guest vmid or guest name ( the script automatically picks up the uuid of the guest ).

Execution examples:

From a laptop ( simple client ):

[scoter@area51: ~]# ./whohost.sh Welcome1 srvovmm.oracle.local name=srvtestdb01.oracle.local
 Name = srvtestdb01.oracle.local
 Id = 0004fb0000060000d84a68991ef40c69
 Operating System = Microsoft Windows Server 2008
 Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm04.oracle.local]

From an Oracle VM guest ( linux ):

 [root@srvlnx01 ~]# ./whohost.sh Welcome1 srvovmm.oracle.local
  Name = srvlnx01.oracle.local
  Id = 0004fb0000060000a8e1af6d58064b4f
  Operating System = Oracle Linux 5
  Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm02.oracle.local]

Here you can find the little script.

I would like to thank you my colleague Jerome Anten for the collaboration on building up this little but handy script.

Corrections, comments and enhancements are welcome.

Simon Coter

About

Simon Coter (@scoter80) is a Principal Product Manager for Oracle VM and VirtualBox.

Twitter

Search

Categories
Archives
« July 2016
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
21
22
23
24
25
27
28
29
30
31
      
Today