Fixing .pxe file errors for 6.1

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
Cefixen
Posts: 1
Joined: 20. Mar 2020, 11:29

Fixing .pxe file errors for 6.1

Post by Cefixen »

Now that 6.1 version is out I'm getting some errors when I'm running the .pxe file for creating new virtual machines. Hope someone could help me out, cause I'm stuck on this.

Exception setting "LaunchVMProcess": Cannot convert the "System.Object[]" value of type "Object[]" to type "array".
+ $vm.LaunchVMProcess($vsession, "", "") | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RuntimeException


This is what I'm getting and below are some of these variables opened for better understanding.

$vbox = New-Object -ComObject "VirtualBox.VirtualBox"
$vm = $vbox.CreateMachine($sname, $vmname, [string[]]@(""), "Ubuntu_64", "forceOverwrite=1")

$vsession = New-Object -ComObject "VirtualBox.Session"
Post Reply