Closed amazpyel closed 7 years ago
Hi Alex,
I just tested this out against a 5.0.0 VirtualBox stable with the 1.0.0 branch (which is not stable or complete) and the following sequence worked:
import virtualbox
vbox = virtualbox.VirtualBox()
vm = vbox.find_machine('win7')
vm.launch_vm_process()
session = vm.create_session()
h, w, _, _, _, _ = session.console.display.get_screen_resolution(0)
png = session.console.display.take_screen_shot_to_array(0, h, w, virtualbox.library.BitmapFormat.png)
open('test.png', 'wb').write(png)
!open test.png
Note: VirtualBox API 5x get_screen_resolution now returns an extra parameter.
What if you tried to get a session after you've launched the vm process?
Regards, Mick
Hi Mick,
What if you tried to get a session after you've launched the vm process?
Session state is locked in this case and I can work with it (get screenshot in this case). So, do I need to run VM manually because launch_vm_process
does not work with Virtual Box 4.3.30?
Thank you.
Closing this issue as stale. If you are having this issue with the latest version of pyvbox w/ VirtualBox 5.1.x @amazpyel ping this issue and I'll re-open.
Environment: -Python 2.7.3 -Ubuntu 12.04.5 -pyvbox-0.2.2 -Virtual Box 4.3.30
I'm trying to launch virtual machine by means virtualbox python api but VM does not launch. Here is the log:
Thank you, Alex