Cannot 'launch_vm_process' on 'machine' object in pyvbox

0

My environment is Ubuntu 16.04, Python3.5.2, pyvbox 2.0.0.

I'm trying to work through this introduction (package page on the 'cheese shop' site.) Even before the failed call in the title of this post, I run into a problem with vbox.find_machine ("windows"), my vbox instance doesn't have a find_machine method at all, but I was able to get the machine object from vbox.machines.

The real trouble is progress = machine.launch_vm_process(session, "gui", ""), I get the following lengthy error output:

---------------------------------------------------------------------------
VBoxError                                 Traceback (most recent call last)
<ipython-input-27-de73b705dd2c> in <module>()
----> 1 progress = machine.launch_vm_process(session, "gui", "")

/usr/local/lib/python3.5/dist-packages/virtualbox/library_ext/machine.py in launch_vm_process(self, session, type_p, environment)
    181             local_session = session
    182         p = super(IMachine, self).launch_vm_process(local_session,
--> 183                                                     type_p, environment)
    184         if session is None:
    185             p.wait_for_completion(-1)

/usr/local/lib/python3.5/dist-packages/virtualbox/library.py in launch_vm_process(self, session, name, environment)
  12799             raise TypeError("environment can only be an instance of type basestring")
  12800         progress = self._call("launchVMProcess",
> 12801                      in_p=[session, name, environment])
  12802         progress = IProgress(progress)
  12803         return progress

/usr/local/lib/python3.5/dist-packages/virtualbox/library_base.py in _call(self, name, in_p)
    190         method = self._search_attr(name)
    191         if inspect.isfunction(method) or inspect.ismethod(method):
--> 192             return self._call_method(method, in_p=in_p)
    193         else:
    194             return method

/usr/local/lib/python3.5/dist-packages/virtualbox/library_base.py in _call_method(self, method, in_p)
    218                 default_msg = getattr(exc, 'message', str(exc))
    219                 errobj.msg = getattr(exc, 'msg', default_msg)
--> 220             raise errobj
    221         return ret

VBoxError: 0xffffffff (internal error in PyXPCOM, parameter must be a bytes object)

How do I work around this? The details of the stack trace are beyond my knowledge of the package.


EDIT: I forgot to name the VirtualBox version, from Help > About: VirtualBox Graphical User Interface Version 5.1.38_Ubuntu r122592

python-3.x
virtualbox
asked on Stack Overflow Aug 13, 2019 by Drunken Master • edited Aug 13, 2019 by Drunken Master

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0