You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Unhandled exception while executing module: Method invocation failed because [Microsoft.VirtualManager.Remoting.IVirtualManagerService] does not contain a method named 'GetType'."
I am executing a powershell script to create a VM on VMM.
- name: Create VM via VMM
ansible.windows.win_powershell:
script: "{{ lookup('ansible.builtin.template', 'create-vm.ps1') }}"
register: create_result
The script execute some cmdlets from virtualmachinemanager module and i think the following one rises the error
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
$uname -a
Linux 6.8.0-1015-azure
ACTUAL RESULTS
The full traceback is:
Method invocation failed because [Microsoft.VirtualManager.Remoting.IVirtualManagerService] does not contain a method named 'GetType'.
At line:383 char:39
+ ... rop.Name] = Convert-OutputObject -InputObject $prop.Value -Depth $chi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Convert-OutputObject], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound,Convert-OutputObject
ScriptStackTrace:
at Convert-OutputObject<Process>, <No file>: line 351
at Convert-OutputObject<Process>, <No file>: line 383
at Convert-OutputObject<Process>, <No file>: line 361
at <ScriptBlock>, <No file>: line 805
System.Management.Automation.RuntimeException: Method invocation failed because [Microsoft.VirtualManager.Remoting.IVirtualManagerService] does not contain a method named 'GetType'.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
fatal: [172.16.17.14]: FAILED! => {
"changed": false,
"msg": "Unhandled exception while executing module: Method invocation failed because [Microsoft.VirtualManager.Remoting.IVirtualManagerService] does not contain a method named 'GetType'."
}
The text was updated successfully, but these errors were encountered:
I don't have an environment setup to test the output object returned by New-SCVirtualMachine but I've hopefully fixed the issue by checking if GetType exists as a method on each object through #710. I don't fully know how an object doesn't have the GetType() method but hopefully that PR fixes this problem. It would be great if you could test it out to verify it solves your problem.
SUMMARY
Hi, I am getting this error:
I am executing a powershell script to create a VM on VMM.
The script execute some cmdlets from
virtualmachinemanager
module and i think the following one rises the errorISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
$uname -a
Linux 6.8.0-1015-azure
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: