1 message in com.xensource.lists.xen-cim[Xen-cim] Python script problems, par...| From | Sent On | Attachments |
|---|---|---|
| Szymanski, Lukasz K | 03 Jul 2007 08:18 | .py, .py |
| Subject: | [Xen-cim] Python script problems, part 2 - known good scripts![]() |
|---|---|
| From: | Szymanski, Lukasz K (Luka...@unisys.com) |
| Date: | 07/03/2007 08:18:31 AM |
| List: | com.xensource.lists.xen-cim |
| Attachments: |
-----Original Message----- From: Jim Fehlig Sent: Thursday, June 14, 2007 3:04 PM To: Szymanski, Lukasz K Subject: Re: Some updates
I tried both python scripts with success. The scripts have been tweaked a little so here they are for your viewing pleasure :-). I'm using a xen 3.1.0 based system with latest provider code. The xen code has patches that were sent to xen-devel, but don't think any of them would prevent these scripts from working.
We'll have to dig in if you're still having problems.
Jim
Szymanski, Lukasz K wrote:
Jim -
So here is an update: I have two problems, possibly related.
1) I applied the patch you emailed I applied the latest from CIM
As a result I get a request that starts, but never finishes executing.
The RequestStateChange starts with no errors, but the script just sits
there. Xm list shows the vm at a 'bp' state. If I crtl-C the script and try to run it again, I cannot get past the initial EnumerateInstanceNames at the beginning of the script. I have to ctrl-C openwbem. It's as if there's a locking/spinning issue somewhere.
2) In a possibly related story, I cannot get the embedded instance script
to work either. The setting he is looking for is CMPI_string or CMPI_instance, but not getting it (see ERROR)
If I use the pywbem which comes with my SUSE, I get this in the openwbem output CMPIMethodProviderProxy::invokeMethod() [INFO] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(749) : Entering InvokeMethod() [WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(750) : --- self="methodXen_VirtualSystemManagementService"
[WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(751) : --- context="** Object not
recognized (0x0x43002310) **"
[WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(752) : --- reference="/root/cimv2:Xen_VirtualSystemManagementService.CreationClas sName="Xen_VirtualSystemManagementService",SystemName="1089",Name="Xen Hypervisor",SystemCreationClassName="CIM_ComputerSystem""
[WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(753) : --- methodname="DefineSystem" [WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(754) : --- namespace="root/cimv2" [WARNING] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(762) : --- # argsin=3 [ERROR] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(827) : --- Invalid setting type -
UNKNOWN [INFO] [06/13/2007 12:18:18] 17404 --- Xen_VirtualSystemManagementService.c(1076) : Exiting InvokeMethod()=Failed [1124096320] XMLExecute::processSimpleReq caught
CIM exception: Code: 4 File: OW_CMPIMethodProviderProxy.cpp Line: 106 Message: invalid parameter passed to method (Invalid setting type)
I thought maybe this was an outdated pywbem. If I go to the latest from sourceforge, this is the output I get from the embedded script.
Calling DefineSystem to create a new VM ... Traceback (most recent call last): File "inst_embed_test.py", line 66, in ? (rval, out_params) = conn.InvokeMethod('DefineSystem', vsms[0], **in_params) File "/usr/local/lib64/python2.4/site-packages/pywbem/cim_operations.py", line 763, in InvokeMethod result = self.methodcall(MethodName, obj, **params) File "/usr/local/lib64/python2.4/site-packages/pywbem/cim_operations.py", line 262, in methodcall plist = [cim_xml.PARAMVALUE(x[0], paramvalue(x[1]), paramtype(x[1])) File "/usr/local/lib64/python2.4/site-packages/pywbem/cim_operations.py", line 260, in paramvalue raise TypeError('Unsupported parameter type "%s"' % type(obj)) TypeError: Unsupported parameter type "<type 'instance'>"
-------------------------------
If you have seen any of this before and have a fix, then please let me
know. What version is your Xen, SUSE, python, etc.? Maybe I can work
backwords from something that works.
Thanks, Luke





.py, .py