I'd like to control a VirtualBox 6.1 VM from LabVIEW, on Win10, using the COM interface.
Since I always get an error when calling launchVMProcess, I tried the Python example in chapter 2.3.1 Python COM API" of the "Programming Guide and Reference itself, which was my template for LabVIEW.
But even the Python example fails with an error "type conflict". The exact message is german (Typenkonflikt), which means it comes either from Windows or VBox, not Python.
I've added two lines to print state and snapshot folder of the VM. Since this data is correct, the API at least finds my VM...
So, what's wrong?
Code: Select all
>>> import win32com.client
>>> vbox = win32com.client.Dispatch("VirtualBox.VirtualBox")
>>> session = win32com.client.Dispatch("VirtualBox.Session")
>>> mach = vbox.findMachine("Win8.1")
>>> mach.State
1
>>> mach.SnapshotFolder
u'C:\\VMs\\Win8.1\\Snapshots'
>>> progress = mach.launchVMProcess(session, "gui", "")
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
progress = mach.launchVMProcess(session, "gui", "")
File "<COMObject <unknown>>", line 2, in launchVMProcess
com_error: (-2147352571, 'Typenkonflikt.', None, 3)