sethmlarson / virtualbox-python

Complete implementation of VirtualBox's COM API with a Pythonic interface.
https://pypi.org/project/virtualbox
Apache License 2.0
354 stars 75 forks source link

Issue with Callee RC: NS_ERROR_CALL_FAILED (0x800706BE) #117

Closed gmatano closed 1 year ago

gmatano commented 6 years ago
ENVIRONMENT
SUMMARY

I've been trying to launch virtualbox with the script on pyxbox's site below:

import virtualbox

vbox = virtualbox.VirtualBox() print("VM(s):\n + %s" % "\n + ".join([vm.name for vm in vbox.machines])) session = virtualbox.Session() vm = vbox.find_machine('U') progress = vm.launch_vm_process(session, 'gui', '')

Every time I do that I get "Callee RC: NS_ERROR_CALL_FAILED (0x800706BE)" in the virtualbox menu. The interesting thing is that I can launch the vm fine within the virtualbox manager menu but not with the pyvbox launch script. My virtualbox software is currently running the most recent update as well. Any assistance on this will be greatly appreciated.

sethmlarson commented 6 years ago

You may want to try creating a Session and locking the machine, then using the session.machine.launch_vm_process()?

gmatano commented 6 years ago

I'm not sure what you mean by this. Do you mean launching the virtualbox within the virtual box manager and then run the python script to with session.machine.launch_vm_process()?

On Fri, Sep 14, 2018 at 6:46 AM Seth M. Larson notifications@github.com wrote:

You may want to try creating a Session and locking the machine, then using the session.machine.launch_vm_process()?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SethMichaelLarson/virtualbox-python/issues/117#issuecomment-421363554, or mute the thread https://github.com/notifications/unsubscribe-auth/AZGFddeg0WVCn9EilDhat04olaEE9uRSks5ua7NGgaJpZM4WoaZ3 .

sethmlarson commented 6 years ago

I'll play around with this when I get time and give you a better answer. Typically when you have a machine that you want to lock you use the session.machine object rather than the original machine instance you used to lock with the session. It's confusing I know.

gmatano commented 6 years ago

Ran this:

import virtualbox

vbox = virtualbox.VirtualBox() print("VM(s):\n + %s" % "\n + ".join([vm.name for vm in vbox.machines])) session = virtualbox.Session() vm = vbox.find_machine('U') progress = session.machine.launch_vm_process()

Got this traceback: VM(s):

How do you lock the machine as you said prior to running the above script?

Thanks for the help on this.

On Fri, Sep 14, 2018 at 10:19 AM Seth M. Larson notifications@github.com wrote:

I'll play around with this when I get time and give you a better answer. Typically when you have a machine that you want to lock you use the session.machine object rather than the original machine instance you used to lock with the session. It's confusing I know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SethMichaelLarson/virtualbox-python/issues/117#issuecomment-421426509, or mute the thread https://github.com/notifications/unsubscribe-auth/AZGFdYom1AmnRSoHYkGdk_PIEqzSNrlHks5ua-UXgaJpZM4WoaZ3 .

sethmlarson commented 6 years ago

Look at the documentation for Session.lock_machine().

gmatano commented 6 years ago

Ran this:

import virtualbox

vbox = virtualbox.VirtualBox() print("VM(s):\n + %s" % "\n + ".join([vm.name for vm in vbox.machines])) s = virtualbox.Session() vm.lock_machine(s, virtualbox.library.LockType.shared) vm = vbox.find_machine('U') progress = s.machine.launch_vm_process()

Got this:

VM(s):

Not sure if I structured the above script correctly.

sethmlarson commented 1 year ago

I no longer have time to maintain this library, so am closing this issue.