Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle VM Manager 3 CLI

Honglin Su-OracleMay 13 2015 — edited Jan 21 2016

Introduction

The page is captured for reference purpose. Beginning with Oracle VM Manager 3.2.1, CLI is a fully supported feature of the product. Please review the product documentation for details.

Oracle VM Manager 3 CLI provides a command line interface for the Oracle VM Manager 3. You can use the CLI to perform the same functions as the Oracle VM Manager Web Interface, such as managing all your server pools, servers and guests. The CLI commands can be scripted and run in conjunction with the Web Interface, thus bringing more flexibility to help you deploy and manage an Oracle VM environment.The CLI automatically starts and stops with the rest of Oracle VM Manager components via the /etc/init.d/ovmm script. When Oracle VM Manager starts up, it reads config/CLIConfigParams.xml which contains the ssh port (by default set to 10,000), etc. Then to access the CLI, start an ssh client to connect to port 10000 of the Oracle VM Manager server.There is an expect script within OVMCLI/expectscripts which should give you a pretty complete inventory of all the supported commands at this point. To customize the script for your setup, go into testscript with an editor and provide a name of a server (servername), pool (poolname), and VM (vmname) at the beginning of the file. This should be a server, pool and VM that you have already configured.Aside from reviewing the expect script please note some of the cool features:1. Use the up and down arrows for a history of commands (currently the last 50).
2. Use tab to complete tokens.
3. Use ? to get help or the command "help"; also use ? after a token to get the rest of the possible options
based on context.
4. You can have multiple clients connected concurrently.
5. You set to configure output mode and endline characters, e.g. if your ssh client adds on a
line feed (double spacing) you can set endline characters to "CR".
6. To close down the ssh session either close the ssh client or use the exit command.
Visit http://www.oracle.com/us/technologies/virtualization/oraclevm/index.html for more information about Oracle VM.

Login

You can login to the CLI via puTTY or ssh directly. You will be prompted for password, e.g., ssh --l admin --p 10000 oraclevm-manager-host
# ssh -l <management server username> -p 10000 <management server IP or DNS name>

login as: adminadmin@ovm-mgr-host's password:OVM>

Learning the CLI

The CLI is intended to be a self-learning tool.
help, showallcustomcmds, showobjtypes, and the context sensitive ? (e.g. show ?, clone ?), along w/ tab completion, up/down arrow history help a user learn the capabilities:

  • help
  • showallcustomcmds
  • showobjtypes
  • context sensitive ? (e.g. show ?, clone ?)
  • tab completion
  • up/down arrow history help a user learn the capabilities

For example say you don't know the format of the show server command.
Type "show ?" to see what object types are supported:

OVM> show ?          AccessGroup          Assembly          BondPort          EthernetNetwork          EthernetPort          FileServer          FileSystem          ISO          Job          LocalNetwork          PhysicalDisk          Repository          SanServer          Server          ServerPool          StorageInitiator          VirtualDisk          VlanGroup          VlanInterface          VlanSegment          Vm          VmDiskMapping          Vnic          VolumeGroup          YumConfig

Use up arrow to bring back the command (save you from typing again) and then add "server":

OVM> show server ?                 id=<object identifier> OR                 name=<object name>

Finally up arrow again and give the CLI the name of the server you are interested in, e.g., "name=ovs038" Be sure to use the tab to save typing, e.g. type "na <tab>" to get "name=".

OVM> show server name=ovs038Command: show server name=ovs038Status: SuccessTime: 2012-06-23 03:30:25.789Data:  Name = ovs038  Id = 44:45:4c:4c:35:00:10:4d:80:54:b5:c0:4f:51:47:31  Status = Running  Mgmt MAC Address = 00:1e:4f:3f:08:15  Processors = 4  Ethernet Ports = 4  iSCSI Ports = 1  Maintenance Mode = Off  IP Address = xx.xx.xx.xx  Processor Speed (GHz) = 2.500063  Memory (GB) = 7  Dom0 Memory (MB) = 522  FiberChannel Ports = 0  Network Failover Groups = 1  CPU Compatibility Group = Default_Intel_Family:6_Model:23  Server Architecture Type = x86-64b  Hypervisor Type = OVM/Xen  Manufacturer = Dell Inc.  Serial Number = 55MTQG1  Product Name = PowerEdge R300  Processor Family = GenuineIntel  Processor Model = Intel(R) Xeon(R) CPU X3323 @ 2.50GHz  L1 Cache Size = 0  L2 Cache Size = 3072 

Comments

François Degrelle
Do you mean ORA-06550 ?
Where is defined the B_CURSOR cursor ?

Francois
abladb
Yes, sorry, ORA-06550.

The Cursor is declared at the Definition DB Package like this:

-- Cursor Definition
TYPE B_CURSOR IS REF CURSOR;

-- Selector Block Procedure
PROCEDURE ID_QUERY (CUR IN OUT B_CURSOR,
PARAM IN NUMBER);
François Degrelle
You need to use a strongly defined REF CURSOR
  -- Record de type EMP --
  TYPE emp_rec IS RECORD(
    empno	emp.empno%TYPE,
    ename	emp.ename%TYPE,
    job		emp.job%TYPE,
    sal		emp.sal%TYPE,
    comm	emp.comm%TYPE);

  -- REF CURSOR --
  TYPE emp_cursor IS REF CURSOR RETURN emp_rec;
  ...
Francois
abladb
I'll try and I will tell you the results.

Thank you for the help!!

:)
abladb
I still have the ORA-06550 pop-up error.

:(

Any other suggestion to try?

:)

Edited by: abladb on Sep 7, 2010 3:15 PM
François Degrelle
What line ?
abladb
I can't tell you. The application uses Company's Standards so the error comes out with the following text:

"STD0004 - The System Message ORA-06550 doesn't exist in the DataBase" which announces me the form I am making has the ORA-06550 error.

Edited by: abladb on Sep 7, 2010 3:44 PM

Edited by: abladb on Sep 7, 2010 3:45 PM
François Degrelle
If you don't know the line number, how can you develop and debug properly ?
We can spend days on this until all errors are solved.

Francois
abladb
Using the head, asking people around, searching on the Internet... and... finally, asking you guys.

That's how.

:(

Thank you for your help anyways.

;)
CraigB
Antonio,
If I understand your post correctly, you are referencing the B_CURSOR type in the Procedure ID_QUERY. The B_CURSOR type exists in a seperate database package. If this is correct, the error you are encountering in your ID_QUERY procedure is caused by the way you reference the B_CURSOR type. Since this type exists in a seperate DB Package, you have to reference the type using the Package name. Referencing B_CURSOR as you are would require the type to exist as its own object in the database. Change your procedure definition as follows and let us know if this works:
/* Remove the << >> and just use the name of the database package. */
PROCEDURE ID_QUERY (CUR IN OUT <<DB_PKG_NAME_HERE>>.B_CURSOR, PARAM IN NUMBER) IS
BEGIN
The other option would be to move the definition of your B_CURSOR type out of your database package.
CREATE OR REPLACE TYPE b_cursor AS OBJECT (
    /* Type attributes/definition here */
);
Hope this helps,
Craig B-)

If someone's response is helpful or correct, please mark it accordingly.
796349
Hello!
I have a problems, i need learn oracle form and reports but i don't know!!!

please help me to get the tools and book online
where i can download the tool for oracle form??? what are the tools for it??

in wait your help!!!
abladb
Sorry if took me so long to answer.

Hi Craig, you understood correctly. However, I defined that correctly too as I said in the first post:

- Query Data Source Arguments: 2 argument names: a cursor (type: RefCursor, Type Name: PackageName.B_CURSOR, Mode: in out) and the parameter the user inserts to make the query (Type: Number, Mode: In; Value: :block.itemName)

I'll try to explain again: A have a form with a database block which is the one the final user executes. That block calls through its Properties, to a procedure to have all the data. The way I call the procedure is from the Query Data Source Name Property (at the Block's Properties), as PackageName.ProcedureName.

- All the parameters of the Procedure are in the Query Data Source Columns Property.
- And all the columns I've got with data after the procedure has run are in the Query Data Source Arguments Property.

It should be right, but an Ora-06550 error comes up.

Hey guys!!! I promess to continue with this tomorrow. Here, in Spain, its 7PM so I have to leave.

Thank you for your time, and... if anyone wants to propose anything to help me, be sure tomorrow in the morning I'll be here trying it.

Thank you.

:)

Edited by: abladb on Sep 7, 2010 6:11 PM
Andreas Weiden
Welcome to the forum.

The first thing you should do is to read the forum etiquette and open up your own thread whenever you have a question. Don't hijack other ones threads.

About software, check the forms-page here http://www.oracle.com/technetwork/developer-tools/forms/overview/index-098877.html

To start with Forms, you need an oracle database (XE-edition is enough for the beginning) and the developer suite (either version 10g or 11g, 10g is easier to install).
CraigB
Oh I see. You've based your datablock on a procedure. There are two basic methods for doing this. First is using a Ref_Cursor as you are and the second is using a PL/SQL Table of Records. Now that I fully understand, I have another question. Did you use the data block wizard to create the block or are you manually setting a block up to use your procedure?

As I recall, the first time I based a block on a procedure, I tried to do everything manually and had problems. As soon as I used the wizard everything work perfect. If this is what you are doing I strongly suggest you use the datablock wizard. Take a look at My Oracle Support document ID: 66887.1 *(Basing a Block on a Stored Procedure - Sample Code)*. If you don't have access to My Oracle Support, then check out Oracle Forms 10g release 2: Demos, Tips and Techniques and scroll down to section "2.3.2 Block based on stored procedures". You can also look at Forms: Procedure Based Block for a nice demo.

Hope this helps,
Craig B-)

If someone's response is helpful or correct, please mark it accordingly.

Edited by: CraigB on Sep 7, 2010 1:30 PM
abladb
Good Morning Craig,

Thank you for answering again!!!

I'll try what you say, and I'll answer back with the results.

Thank you!!!

PS: Actually, I think I started the block Manually. (!!!!)

;)

Thank you for the links!!!
abladb
Ok. That was it!!! To make it with the wizzard!!! However, now I have another problem related to it. When executing the query, it doesn't return anything having the error Query caused no records to be retrieved. (FRM-40301), but it should return one register.

I have tried to put the Param data (a number directly) at Query Data Source Arguments like:
- Argument name: PARAM
- Type: NUMBER
- Mode: IN
- Value: 1000000096

instead of
- Argument name: PARAM
- Type: NUMBER
- Mode: IN
- Value: :BlockName.ItemName

and it neither works!!!

Then, I've tried to put the Param data at the procedure (using Toad), and it works. Returns one register.

So, what now? Anything else to try??

Editing:
I'm realizing that when I create a Store Procedure using the Wizzard, the wizzard ask me to insert the procedure name I will use. When ''refreshing'' for comming up the colums to choose, a Forms Error comes up: FRM-10095: Assertion failed in iewbdbc_oracle_to_id, at C:\forms\101220\src\ie\iewbdb.c:724 twice, but after pressing OK, the columns come up, so I can choose the ones I need (all of them) and continue.

I have pressed the Help button on this pop-up, and this is what it shows:
- Cause:  An internal inconsistency was detected.
- Action:  Contact an Oracle support representative, and proceed with caution.

Could this be the answer of my new problem?

Edited by: abladb on Sep 8, 2010 12:00 PM
abladb
Finally!!! I've got it!!!

One of the columns I had was a TimeStamp Type, but forms do not recognize it, so it transformed it into Varchar2, and that was the final problem.

I've got it!!!

Thank you all for the help!!!

:D
abladb
Special thanks to Craig, and to everyone who tried to help me.

Read thread (2 pages) to have the answer.

^^
CraigB
Glad I could help! Thanks for posting the final solution so others can benefit from your experience!

Craig...
1 - 19

Post Details

Added on May 13 2015
0 comments
4,734 views