Wednesday Jun 29, 2016

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

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:

Tuesday Jun 28, 2016

Oracle VM 3.2.11 maintenance release now available!

Preamble: it's important to remember that today our latest Oracle VM 3.4 release has to be chosen while installing new environments and/or creating new architectures; that said, it's also important to know that we just released a maintenance update for Oracle VM 3.2 to deliver improved performance, security patches and to provide bug-fixes. 

Oracle VM 3.2.11 updates are available for download from My Oracle Support. Oracle VM Server packages are also available from the Oracle Unbreakable Linux Network (Oracle VM Server 3.2 Latest Channel). The patch updates include all the cumulative bug fixes that have been integrated since the base 3.2.1 release.  

Oracle VM 3.2.11 Download Information

· Oracle VM Server for x86 3.2.11 server ISO, search patch ID 16410428; and will also available from ULN - https://linux.oracle.com

· Oracle VM Manager 3.2.11 upgrade, search patch ID 16410417

· Oracle VM Agent 3.2.11 for SPARC, search patch ID 16694949

The software is also available from the Oracle Software Delivery Cloud

Review the download instructions at: http://www.oracle.com/technetwork/server-storage/vm/downloads/index.html

Additional Information

New customers are encouraged to use the latest Oracle VM 3.4, release that introduces further features, improved stability and performance.

Oracle VM documentation is available on the Oracle Technology Network (OTN):http://www.oracle.com/technetwork/server-storage/vm/documentation/index.html.

For the latest information, best practices white papers and webinars, please visit http://oracle.com/virtualization.

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. 

Friday May 20, 2016

Oracle VM 3.4: show VMs full or partially allocated on a repository (ShowRepoVm)

More than one time it could be required to know which VMs are on a specific repository; while it is an easy evaluation for all VMs with their configuration file, it could be much more time expensive to identify VMs that partially resides on a repository.

Even if it's suggested to have the entire VM on one unique repository (for convenience, not for technical limits), one VM can reside on more repositories and in this case it could need much more time to evaluate which VMs are, even partially, on a specific repository.

So, target of the script available here is to supply all the VMs that, completely or partially, reside on a specific repository.

The script is able to interact with Oracle VM 3.2, 3.3 and 3.4 releases and, itself, evaluates the correct release and commands needed.

The script loops on each component available on the repository and verify the ownership; for each line with "." you'll know that one component has been verified:

Here an example of the output of the script:

Feedback and comments are, obviously, appreciated.

Thursday May 12, 2016

Oracle VM 3.4 script: schedule and move VMs to a different repository

Moving VMs from one repository to an other can be something boring, mostly if your VM has many vdisks or if you have to move many vms.

On Oracle VM to completely move a VM you need to create a clone-customizer and specify target destination for each virtual-disk.

So, on activities like:

  • storage replacement (new repositories) ***
  • huge list of vms to move to a new repository
  • vms to move to a new repository with tens of virtual-disks
  • scheduled VM moving

a batch approach can help to address them with an automated script able to create the clone-customizer and move the entire vm (vm.cfg file and all virtual-disks) to the destination repository. 

*** In case of storage replacement this script does not manage the Oracle VM poolfs migration.

Moving a VM is a tricky operation and more checks are executed by the script before starting with it; these are all the checks executed by the script before starting the "move" operation:

  • Execute the first connection to the manager using "expect", needed in case of reboot of Oracle VM Manager or client host
  • Check VM Name is unique: you can have different VMs with the same name but we need to identify which one we have to move
  • Check Server-Pool name and VM membership: verify that VM we are going to move is part of the pool specified
  • Check target repository name: verify that target repository specified exists
  • Check OVS that guest the vm: verify which Oracle VM Server actually guest the VM and if this server has target repository presented
  • Check OVMCLI Release and features available: this script is compatible with Oracle VM 3.3 and 3.4
  • Check VM and all its components are not already on target repository: verify that everything is not already in place
  • Verify disk space available on target repository: verify that on target repository there is enough space to guest the VM
  • Check VM Status (running / stopped) and options specified (VM shutdown and VM restart)

Once all these checks are verified the script executes following steps:

  • Create Clone Customizer for VM moving
  • Prepare storage mappings for Clone Customizer created
  • Prepare network mappings for Clone Customizer created
  • Move VM to target repository and delete Clone Customizer
  • Verify VM moving completed successfully
  • Start the moved vm and verify it's started (optional)

Script "MoveVm.sh" v0.1 can be downloaded here.

"MoveVm.sh" script  has following characteristics:

  • Compatible with:
    • Oracle VM 3.3
    • Oracle VM 3.4
  • Requires
    • "expect" installed on the Linux system executing the script
    • able to reach port 10000 of Oracle VM Manager host

Script flowchart graphically is:

To see script syntax, just execute the script without any option:

The script won't move "Virtual Cd-Rom" (ISO files) and/or manage physical disks.

In the following example we have one VM (ol67test) where:

  • vm.cfg file is on repository named local_02
  • 3 virtual-disks are on repository named local_02
  • 1 virtual-cdrom is on repository named local_02
  • 1 physical-disk is owned by the guest
  • 2 vnic(s) are configured on two different networks

Following example will move the entire VM (vm configuration file and all virtual-disks) to repository named local_01.

Now the "moved" VM is configured with:

  • vm.cfg file is on repository named local_01
  • 3 virtual-disks are on repository named local_01
  • 1 virtual-cdrom remains on repository named local_02
  • 1 physical-disk is owned by the guest
  • 2 vnic(s) are configured as before

Log execution of this operation can be downloaded here

Obviously all this stuff can be scheduled and, thanks to this OVMCLI script, moving VMs won't be anymore a tedious operation.

Feedback and questions are obviously appreciated. 

About

Simon Coter is a Principal Product Manager for Oracle VM and VirtualBox.

Search

Categories
Archives
« June 2016
SunMonTueWedThuFriSat
   
1
2
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
30
  
       
Today