Guo Lian Yun wrote:
libvirt-cim-bounces(a)redhat.com wrote on 2009-03-14 03:01:14:
> > > > + drasd = get_typed_class(options.virt,
> > > 'DiskResourceAllocationSettingData')
> > > > + drasd_id = '%s/%s' % (default_dom, nddev)
> > > > + dkeys = {'InstanceID' : drasd_id}
> > > > +
> > > > + nrasd = get_typed_class(options.virt,
> > > 'NetResourceAllocationSettingData')
> > > > + nrasd_id = '%s/%s' % (default_dom, nmac)
> > > > + nkeys = {'InstanceID' : nrasd_id}
> > >
> > > Instead of hand building the instances for the resources, use
the proper
> > > association calls to get the RASD instances. You know the
guest, so
> > > you can use SystemDevice to get the resource instance, and then
> > > SettingsDefineState to get the RASD instances.
> >
> > I'm working on a new patch to get the RASD instances by association.
> > But I can't remove "KVM_InputResourceAllocationSettingData"
which
output
> > the device "mouse:ps2" can not be found. Actually, I get it by
> > SettingsDefineState.
> > If I remove this device from the ResourceSettings, this method works
> > for me.
> >
>
> Sorry Daisy.. I'm not sure I understand the problem you're hitting.
>
> Are you seeing an error trying to remove an input device from a guest?
> What error message do you see?
Sorry for my confusion. I send out #2 patch. The problem is that I
can not remove InputRASD. Below is the report error:
VirtualSystemManagementService - 16_removeresource.py: FAIL
ERROR - 'CIMInstanceName' object has no attribute 'DeviceID'
No such instance (no device domain/mouse:ps2)
Which virtualization type are you seeing this issue on? I'm not seeing
an issue with KVM. I tried running on a Xen system, and I get the
following error:
VirtualSystemManagementService - 16_removeresource.py: FAIL
ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid
argument in virDomainDefineXML with return code 1
ERROR - Failed to define the dom: domain
InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain:
invalid argument in virDomainDefineXML
Can you paste the provider debug you're seeing?
So I Skip InputRASD together with MemRASD and ProcRASD in #2 patch.
The providers should be able to remove input devices, so you'll want to
include that in the test.
If you're seeing an error, it's either a test case issue or a provider
issue. It's better to resolve these issues before resending an updated
patch (it'll reduce the amount of churn in a given patch).
Thanks!
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com